AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
CreateRuleRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/waf/WAFRequest.h>
10#include <aws/waf/WAF_EXPORTS.h>
11#include <aws/waf/model/Tag.h>
12
13#include <utility>
14
15namespace Aws {
16namespace WAF {
17namespace Model {
18
22 public:
23 AWS_WAF_API CreateRuleRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
30
31 AWS_WAF_API Aws::String SerializePayload() const override;
32
34
36
40 inline const Aws::String& GetName() const { return m_name; }
41 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
42 template <typename NameT = Aws::String>
43 void SetName(NameT&& value) {
44 m_nameHasBeenSet = true;
45 m_name = std::forward<NameT>(value);
46 }
47 template <typename NameT = Aws::String>
48 CreateRuleRequest& WithName(NameT&& value) {
49 SetName(std::forward<NameT>(value));
50 return *this;
51 }
53
55
62 inline const Aws::String& GetMetricName() const { return m_metricName; }
63 inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
64 template <typename MetricNameT = Aws::String>
65 void SetMetricName(MetricNameT&& value) {
66 m_metricNameHasBeenSet = true;
67 m_metricName = std::forward<MetricNameT>(value);
68 }
69 template <typename MetricNameT = Aws::String>
70 CreateRuleRequest& WithMetricName(MetricNameT&& value) {
71 SetMetricName(std::forward<MetricNameT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::String& GetChangeToken() const { return m_changeToken; }
81 inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; }
82 template <typename ChangeTokenT = Aws::String>
83 void SetChangeToken(ChangeTokenT&& value) {
84 m_changeTokenHasBeenSet = true;
85 m_changeToken = std::forward<ChangeTokenT>(value);
86 }
87 template <typename ChangeTokenT = Aws::String>
88 CreateRuleRequest& WithChangeToken(ChangeTokenT&& value) {
89 SetChangeToken(std::forward<ChangeTokenT>(value));
90 return *this;
91 }
93
95
98 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
99 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
100 template <typename TagsT = Aws::Vector<Tag>>
101 void SetTags(TagsT&& value) {
102 m_tagsHasBeenSet = true;
103 m_tags = std::forward<TagsT>(value);
104 }
105 template <typename TagsT = Aws::Vector<Tag>>
106 CreateRuleRequest& WithTags(TagsT&& value) {
107 SetTags(std::forward<TagsT>(value));
108 return *this;
109 }
110 template <typename TagsT = Tag>
111 CreateRuleRequest& AddTags(TagsT&& value) {
112 m_tagsHasBeenSet = true;
113 m_tags.emplace_back(std::forward<TagsT>(value));
114 return *this;
115 }
117 private:
118 Aws::String m_name;
119
120 Aws::String m_metricName;
121
122 Aws::String m_changeToken;
123
124 Aws::Vector<Tag> m_tags;
125 bool m_nameHasBeenSet = false;
126 bool m_metricNameHasBeenSet = false;
127 bool m_changeTokenHasBeenSet = false;
128 bool m_tagsHasBeenSet = false;
129};
130
131} // namespace Model
132} // namespace WAF
133} // namespace Aws
void SetChangeToken(ChangeTokenT &&value)
const Aws::String & GetMetricName() const
CreateRuleRequest & WithChangeToken(ChangeTokenT &&value)
const Aws::String & GetChangeToken() const
virtual const char * GetServiceRequestName() const override
CreateRuleRequest & WithMetricName(MetricNameT &&value)
AWS_WAF_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_WAF_API CreateRuleRequest()=default
AWS_WAF_API Aws::String SerializePayload() const override
const Aws::Vector< Tag > & GetTags() const
CreateRuleRequest & AddTags(TagsT &&value)
CreateRuleRequest & WithTags(TagsT &&value)
CreateRuleRequest & WithName(NameT &&value)
const Aws::String & GetName() const
void SetMetricName(MetricNameT &&value)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector