/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace WAF { namespace Model { /** */ class CreateRuleRequest : public WAFRequest { public: AWS_WAF_API CreateRuleRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; } AWS_WAF_API Aws::String SerializePayload() const override; AWS_WAF_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline CreateRuleRequest& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline CreateRuleRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

A friendly name or description of the Rule. You can't change the name * of a Rule after you create it.

*/ inline CreateRuleRequest& WithName(const char* value) { SetName(value); return *this;} /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline CreateRuleRequest& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline CreateRuleRequest& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *

A friendly name or description for the metrics for this Rule. * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum * length 128 and minimum length one. It can't contain whitespace or metric names * reserved for AWS WAF, including "All" and "Default_Action." You can't change the * name of the metric after you create the Rule.

*/ inline CreateRuleRequest& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *

The value returned by the most recent call to GetChangeToken.

*/ inline const Aws::String& GetChangeToken() const{ return m_changeToken; } /** *

The value returned by the most recent call to GetChangeToken.

*/ inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; } /** *

The value returned by the most recent call to GetChangeToken.

*/ inline void SetChangeToken(const Aws::String& value) { m_changeTokenHasBeenSet = true; m_changeToken = value; } /** *

The value returned by the most recent call to GetChangeToken.

*/ inline void SetChangeToken(Aws::String&& value) { m_changeTokenHasBeenSet = true; m_changeToken = std::move(value); } /** *

The value returned by the most recent call to GetChangeToken.

*/ inline void SetChangeToken(const char* value) { m_changeTokenHasBeenSet = true; m_changeToken.assign(value); } /** *

The value returned by the most recent call to GetChangeToken.

*/ inline CreateRuleRequest& WithChangeToken(const Aws::String& value) { SetChangeToken(value); return *this;} /** *

The value returned by the most recent call to GetChangeToken.

*/ inline CreateRuleRequest& WithChangeToken(Aws::String&& value) { SetChangeToken(std::move(value)); return *this;} /** *

The value returned by the most recent call to GetChangeToken.

*/ inline CreateRuleRequest& WithChangeToken(const char* value) { SetChangeToken(value); return *this;} /** *

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

*/ inline CreateRuleRequest& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

*/ inline CreateRuleRequest& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

*/ inline CreateRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

*/ inline CreateRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_changeToken; bool m_changeTokenHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace WAF } // namespace Aws