AWS SDK for C++  1.9.71
AWS SDK for C++
CreateRuleRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/waf/WAF_EXPORTS.h>
8 #include <aws/waf/WAFRequest.h>
11 #include <aws/waf/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace WAF
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "CreateRule"; }
33 
34  Aws::String SerializePayload() const override;
35 
37 
38 
43  inline const Aws::String& GetName() const{ return m_name; }
44 
49  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
50 
55  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
56 
61  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
62 
67  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
68 
73  inline CreateRuleRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
74 
79  inline CreateRuleRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
80 
85  inline CreateRuleRequest& WithName(const char* value) { SetName(value); return *this;}
86 
87 
95  inline const Aws::String& GetMetricName() const{ return m_metricName; }
96 
104  inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
105 
113  inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
114 
122  inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
123 
131  inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
132 
140  inline CreateRuleRequest& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
141 
149  inline CreateRuleRequest& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
150 
158  inline CreateRuleRequest& WithMetricName(const char* value) { SetMetricName(value); return *this;}
159 
160 
164  inline const Aws::String& GetChangeToken() const{ return m_changeToken; }
165 
169  inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; }
170 
174  inline void SetChangeToken(const Aws::String& value) { m_changeTokenHasBeenSet = true; m_changeToken = value; }
175 
179  inline void SetChangeToken(Aws::String&& value) { m_changeTokenHasBeenSet = true; m_changeToken = std::move(value); }
180 
184  inline void SetChangeToken(const char* value) { m_changeTokenHasBeenSet = true; m_changeToken.assign(value); }
185 
189  inline CreateRuleRequest& WithChangeToken(const Aws::String& value) { SetChangeToken(value); return *this;}
190 
194  inline CreateRuleRequest& WithChangeToken(Aws::String&& value) { SetChangeToken(std::move(value)); return *this;}
195 
199  inline CreateRuleRequest& WithChangeToken(const char* value) { SetChangeToken(value); return *this;}
200 
201 
205  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
206 
210  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
211 
215  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
216 
220  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
221 
225  inline CreateRuleRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
226 
230  inline CreateRuleRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
231 
235  inline CreateRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
236 
240  inline CreateRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
241 
242  private:
243 
244  Aws::String m_name;
245  bool m_nameHasBeenSet;
246 
247  Aws::String m_metricName;
248  bool m_metricNameHasBeenSet;
249 
250  Aws::String m_changeToken;
251  bool m_changeTokenHasBeenSet;
252 
253  Aws::Vector<Tag> m_tags;
254  bool m_tagsHasBeenSet;
255  };
256 
257 } // namespace Model
258 } // namespace WAF
259 } // namespace Aws
Aws::WAF::Model::CreateRuleRequest::SetName
void SetName(const char *value)
Definition: CreateRuleRequest.h:67
Aws::WAF::Model::CreateRuleRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateRuleRequest.h:210
Aws::WAF::Model::CreateRuleRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::WAF::Model::CreateRuleRequest::WithName
CreateRuleRequest & WithName(const Aws::String &value)
Definition: CreateRuleRequest.h:73
Aws::WAF::Model::CreateRuleRequest::SetChangeToken
void SetChangeToken(const Aws::String &value)
Definition: CreateRuleRequest.h:174
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::WAF::Model::CreateRuleRequest::ChangeTokenHasBeenSet
bool ChangeTokenHasBeenSet() const
Definition: CreateRuleRequest.h:169
Aws::WAF::Model::CreateRuleRequest::WithMetricName
CreateRuleRequest & WithMetricName(Aws::String &&value)
Definition: CreateRuleRequest.h:149
Aws::WAF::Model::CreateRuleRequest::GetName
const Aws::String & GetName() const
Definition: CreateRuleRequest.h:43
Aws::WAF::Model::CreateRuleRequest
Definition: CreateRuleRequest.h:24
Aws::WAF::Model::CreateRuleRequest::GetMetricName
const Aws::String & GetMetricName() const
Definition: CreateRuleRequest.h:95
AWS_WAF_API
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:28
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::WAF::Model::CreateRuleRequest::WithChangeToken
CreateRuleRequest & WithChangeToken(const Aws::String &value)
Definition: CreateRuleRequest.h:189
Aws::WAF::Model::CreateRuleRequest::SetChangeToken
void SetChangeToken(const char *value)
Definition: CreateRuleRequest.h:184
AWSVector.h
Aws::WAF::Model::CreateRuleRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::WAF::Model::CreateRuleRequest::WithChangeToken
CreateRuleRequest & WithChangeToken(const char *value)
Definition: CreateRuleRequest.h:199
Aws::WAF::Model::CreateRuleRequest::NameHasBeenSet
bool NameHasBeenSet() const
Definition: CreateRuleRequest.h:49
Aws::WAF::Model::CreateRuleRequest::WithTags
CreateRuleRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateRuleRequest.h:225
Aws::WAF::Model::Tag
Definition: Tag.h:47
Aws::WAF::Model::CreateRuleRequest::WithMetricName
CreateRuleRequest & WithMetricName(const Aws::String &value)
Definition: CreateRuleRequest.h:140
Aws::WAF::Model::CreateRuleRequest::GetChangeToken
const Aws::String & GetChangeToken() const
Definition: CreateRuleRequest.h:164
Aws::WAF::Model::CreateRuleRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateRuleRequest.h:205
Aws::WAF::Model::CreateRuleRequest::SetName
void SetName(const Aws::String &value)
Definition: CreateRuleRequest.h:55
Aws::WAF::Model::CreateRuleRequest::CreateRuleRequest
CreateRuleRequest()
Aws::WAF::Model::CreateRuleRequest::SetChangeToken
void SetChangeToken(Aws::String &&value)
Definition: CreateRuleRequest.h:179
Aws::WAF::Model::CreateRuleRequest::WithMetricName
CreateRuleRequest & WithMetricName(const char *value)
Definition: CreateRuleRequest.h:158
Aws::WAF::Model::CreateRuleRequest::WithName
CreateRuleRequest & WithName(const char *value)
Definition: CreateRuleRequest.h:85
Tag.h
AWSString.h
Aws::WAF::Model::CreateRuleRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateRuleRequest.h:32
Aws::WAF::Model::CreateRuleRequest::MetricNameHasBeenSet
bool MetricNameHasBeenSet() const
Definition: CreateRuleRequest.h:104
WAF_EXPORTS.h
Aws::WAF::Model::CreateRuleRequest::SetMetricName
void SetMetricName(Aws::String &&value)
Definition: CreateRuleRequest.h:122
Aws::WAF::Model::CreateRuleRequest::SetName
void SetName(Aws::String &&value)
Definition: CreateRuleRequest.h:61
WAFRequest.h
Aws::WAF::Model::CreateRuleRequest::AddTags
CreateRuleRequest & AddTags(const Tag &value)
Definition: CreateRuleRequest.h:235
Aws
Definition: AccessManagementClient.h:15
Aws::WAF::Model::CreateRuleRequest::SetMetricName
void SetMetricName(const Aws::String &value)
Definition: CreateRuleRequest.h:113
Aws::WAF::Model::CreateRuleRequest::WithName
CreateRuleRequest & WithName(Aws::String &&value)
Definition: CreateRuleRequest.h:79
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAF::Model::CreateRuleRequest::WithChangeToken
CreateRuleRequest & WithChangeToken(Aws::String &&value)
Definition: CreateRuleRequest.h:194
Aws::WAF::Model::CreateRuleRequest::SetMetricName
void SetMetricName(const char *value)
Definition: CreateRuleRequest.h:131
Aws::WAF::Model::CreateRuleRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateRuleRequest.h:215
Aws::WAF::Model::CreateRuleRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateRuleRequest.h:220
Aws::WAF::WAFRequest
Definition: WAFRequest.h:17
Aws::WAF::Model::CreateRuleRequest::AddTags
CreateRuleRequest & AddTags(Tag &&value)
Definition: CreateRuleRequest.h:240
Aws::WAF::Model::CreateRuleRequest::WithTags
CreateRuleRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateRuleRequest.h:230