AWS SDK for C++  1.9.71
AWS SDK for C++
CreateRateBasedRuleRequest.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>
10 #include <aws/waf/model/RateKey.h>
12 #include <aws/waf/model/Tag.h>
13 #include <utility>
14 
15 namespace Aws
16 {
17 namespace WAF
18 {
19 namespace Model
20 {
21 
25  {
26  public:
28 
29  // Service request name is the Operation name which will send this request out,
30  // each operation should has unique request name, so that we can get operation's name from this request.
31  // Note: this is not true for response, multiple operations may have the same response name,
32  // so we can not get operation's name from response.
33  inline virtual const char* GetServiceRequestName() const override { return "CreateRateBasedRule"; }
34 
35  Aws::String SerializePayload() const override;
36 
38 
39 
44  inline const Aws::String& GetName() const{ return m_name; }
45 
50  inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
51 
56  inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
57 
62  inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
63 
68  inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
69 
74  inline CreateRateBasedRuleRequest& WithName(const Aws::String& value) { SetName(value); return *this;}
75 
80  inline CreateRateBasedRuleRequest& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
81 
86  inline CreateRateBasedRuleRequest& WithName(const char* value) { SetName(value); return *this;}
87 
88 
97  inline const Aws::String& GetMetricName() const{ return m_metricName; }
98 
107  inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; }
108 
117  inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; }
118 
127  inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); }
128 
137  inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); }
138 
147  inline CreateRateBasedRuleRequest& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;}
148 
157  inline CreateRateBasedRuleRequest& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;}
158 
167  inline CreateRateBasedRuleRequest& WithMetricName(const char* value) { SetMetricName(value); return *this;}
168 
169 
177  inline const RateKey& GetRateKey() const{ return m_rateKey; }
178 
186  inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; }
187 
195  inline void SetRateKey(const RateKey& value) { m_rateKeyHasBeenSet = true; m_rateKey = value; }
196 
204  inline void SetRateKey(RateKey&& value) { m_rateKeyHasBeenSet = true; m_rateKey = std::move(value); }
205 
213  inline CreateRateBasedRuleRequest& WithRateKey(const RateKey& value) { SetRateKey(value); return *this;}
214 
222  inline CreateRateBasedRuleRequest& WithRateKey(RateKey&& value) { SetRateKey(std::move(value)); return *this;}
223 
224 
232  inline long long GetRateLimit() const{ return m_rateLimit; }
233 
241  inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; }
242 
250  inline void SetRateLimit(long long value) { m_rateLimitHasBeenSet = true; m_rateLimit = value; }
251 
259  inline CreateRateBasedRuleRequest& WithRateLimit(long long value) { SetRateLimit(value); return *this;}
260 
261 
268  inline const Aws::String& GetChangeToken() const{ return m_changeToken; }
269 
276  inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; }
277 
284  inline void SetChangeToken(const Aws::String& value) { m_changeTokenHasBeenSet = true; m_changeToken = value; }
285 
292  inline void SetChangeToken(Aws::String&& value) { m_changeTokenHasBeenSet = true; m_changeToken = std::move(value); }
293 
300  inline void SetChangeToken(const char* value) { m_changeTokenHasBeenSet = true; m_changeToken.assign(value); }
301 
308  inline CreateRateBasedRuleRequest& WithChangeToken(const Aws::String& value) { SetChangeToken(value); return *this;}
309 
316  inline CreateRateBasedRuleRequest& WithChangeToken(Aws::String&& value) { SetChangeToken(std::move(value)); return *this;}
317 
324  inline CreateRateBasedRuleRequest& WithChangeToken(const char* value) { SetChangeToken(value); return *this;}
325 
326 
330  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
331 
335  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
336 
340  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
341 
345  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
346 
350  inline CreateRateBasedRuleRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
351 
355  inline CreateRateBasedRuleRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
356 
360  inline CreateRateBasedRuleRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
361 
365  inline CreateRateBasedRuleRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
366 
367  private:
368 
369  Aws::String m_name;
370  bool m_nameHasBeenSet;
371 
372  Aws::String m_metricName;
373  bool m_metricNameHasBeenSet;
374 
375  RateKey m_rateKey;
376  bool m_rateKeyHasBeenSet;
377 
378  long long m_rateLimit;
379  bool m_rateLimitHasBeenSet;
380 
381  Aws::String m_changeToken;
382  bool m_changeTokenHasBeenSet;
383 
384  Aws::Vector<Tag> m_tags;
385  bool m_tagsHasBeenSet;
386  };
387 
388 } // namespace Model
389 } // namespace WAF
390 } // namespace Aws
Aws::WAF::Model::CreateRateBasedRuleRequest::SetName
void SetName(Aws::String &&value)
Definition: CreateRateBasedRuleRequest.h:62
Aws::WAF::Model::CreateRateBasedRuleRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: CreateRateBasedRuleRequest.h:330
Aws::WAF::Model::CreateRateBasedRuleRequest::AddTags
CreateRateBasedRuleRequest & AddTags(Tag &&value)
Definition: CreateRateBasedRuleRequest.h:365
Aws::WAF::Model::CreateRateBasedRuleRequest::GetName
const Aws::String & GetName() const
Definition: CreateRateBasedRuleRequest.h:44
Aws::WAF::Model::CreateRateBasedRuleRequest::SetMetricName
void SetMetricName(const char *value)
Definition: CreateRateBasedRuleRequest.h:137
RateKey.h
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::WAF::Model::CreateRateBasedRuleRequest::GetMetricName
const Aws::String & GetMetricName() const
Definition: CreateRateBasedRuleRequest.h:97
Aws::WAF::Model::CreateRateBasedRuleRequest::SetName
void SetName(const char *value)
Definition: CreateRateBasedRuleRequest.h:68
Aws::WAF::Model::CreateRateBasedRuleRequest::SetName
void SetName(const Aws::String &value)
Definition: CreateRateBasedRuleRequest.h:56
Aws::WAF::Model::CreateRateBasedRuleRequest::SetChangeToken
void SetChangeToken(Aws::String &&value)
Definition: CreateRateBasedRuleRequest.h:292
Aws::WAF::Model::CreateRateBasedRuleRequest::SetChangeToken
void SetChangeToken(const Aws::String &value)
Definition: CreateRateBasedRuleRequest.h:284
Aws::WAF::Model::CreateRateBasedRuleRequest::ChangeTokenHasBeenSet
bool ChangeTokenHasBeenSet() const
Definition: CreateRateBasedRuleRequest.h:276
AWS_WAF_API
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:28
Aws::WAF::Model::CreateRateBasedRuleRequest::WithTags
CreateRateBasedRuleRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: CreateRateBasedRuleRequest.h:350
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::WAF::Model::CreateRateBasedRuleRequest::WithRateLimit
CreateRateBasedRuleRequest & WithRateLimit(long long value)
Definition: CreateRateBasedRuleRequest.h:259
Aws::WAF::Model::CreateRateBasedRuleRequest::SerializePayload
Aws::String SerializePayload() const override
AWSVector.h
Aws::WAF::Model::CreateRateBasedRuleRequest::WithChangeToken
CreateRateBasedRuleRequest & WithChangeToken(Aws::String &&value)
Definition: CreateRateBasedRuleRequest.h:316
Aws::WAF::Model::CreateRateBasedRuleRequest::GetRateKey
const RateKey & GetRateKey() const
Definition: CreateRateBasedRuleRequest.h:177
Aws::WAF::Model::RateKey
RateKey
Definition: RateKey.h:17
Aws::WAF::Model::Tag
Definition: Tag.h:47
Aws::WAF::Model::CreateRateBasedRuleRequest::SetMetricName
void SetMetricName(Aws::String &&value)
Definition: CreateRateBasedRuleRequest.h:127
Aws::WAF::Model::CreateRateBasedRuleRequest::WithName
CreateRateBasedRuleRequest & WithName(Aws::String &&value)
Definition: CreateRateBasedRuleRequest.h:80
Aws::WAF::Model::CreateRateBasedRuleRequest::NameHasBeenSet
bool NameHasBeenSet() const
Definition: CreateRateBasedRuleRequest.h:50
Aws::WAF::Model::CreateRateBasedRuleRequest::SetRateKey
void SetRateKey(const RateKey &value)
Definition: CreateRateBasedRuleRequest.h:195
Aws::WAF::Model::CreateRateBasedRuleRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::WAF::Model::CreateRateBasedRuleRequest::WithMetricName
CreateRateBasedRuleRequest & WithMetricName(Aws::String &&value)
Definition: CreateRateBasedRuleRequest.h:157
Aws::WAF::Model::CreateRateBasedRuleRequest::RateKeyHasBeenSet
bool RateKeyHasBeenSet() const
Definition: CreateRateBasedRuleRequest.h:186
Aws::WAF::Model::CreateRateBasedRuleRequest::RateLimitHasBeenSet
bool RateLimitHasBeenSet() const
Definition: CreateRateBasedRuleRequest.h:241
Tag.h
Aws::WAF::Model::CreateRateBasedRuleRequest::CreateRateBasedRuleRequest
CreateRateBasedRuleRequest()
Aws::WAF::Model::CreateRateBasedRuleRequest::MetricNameHasBeenSet
bool MetricNameHasBeenSet() const
Definition: CreateRateBasedRuleRequest.h:107
AWSString.h
Aws::WAF::Model::CreateRateBasedRuleRequest
Definition: CreateRateBasedRuleRequest.h:25
Aws::WAF::Model::CreateRateBasedRuleRequest::WithChangeToken
CreateRateBasedRuleRequest & WithChangeToken(const char *value)
Definition: CreateRateBasedRuleRequest.h:324
Aws::WAF::Model::CreateRateBasedRuleRequest::AddTags
CreateRateBasedRuleRequest & AddTags(const Tag &value)
Definition: CreateRateBasedRuleRequest.h:360
Aws::WAF::Model::CreateRateBasedRuleRequest::SetRateKey
void SetRateKey(RateKey &&value)
Definition: CreateRateBasedRuleRequest.h:204
WAF_EXPORTS.h
Aws::WAF::Model::CreateRateBasedRuleRequest::WithMetricName
CreateRateBasedRuleRequest & WithMetricName(const Aws::String &value)
Definition: CreateRateBasedRuleRequest.h:147
Aws::WAF::Model::CreateRateBasedRuleRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: CreateRateBasedRuleRequest.h:345
Aws::WAF::Model::CreateRateBasedRuleRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: CreateRateBasedRuleRequest.h:340
Aws::WAF::Model::CreateRateBasedRuleRequest::WithRateKey
CreateRateBasedRuleRequest & WithRateKey(RateKey &&value)
Definition: CreateRateBasedRuleRequest.h:222
WAFRequest.h
Aws::WAF::Model::CreateRateBasedRuleRequest::SetMetricName
void SetMetricName(const Aws::String &value)
Definition: CreateRateBasedRuleRequest.h:117
Aws
Definition: AccessManagementClient.h:15
Aws::WAF::Model::CreateRateBasedRuleRequest::WithName
CreateRateBasedRuleRequest & WithName(const Aws::String &value)
Definition: CreateRateBasedRuleRequest.h:74
Aws::WAF::Model::CreateRateBasedRuleRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: CreateRateBasedRuleRequest.h:33
Aws::WAF::Model::CreateRateBasedRuleRequest::WithTags
CreateRateBasedRuleRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: CreateRateBasedRuleRequest.h:355
Aws::WAF::Model::CreateRateBasedRuleRequest::GetChangeToken
const Aws::String & GetChangeToken() const
Definition: CreateRateBasedRuleRequest.h:268
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAF::Model::CreateRateBasedRuleRequest::WithName
CreateRateBasedRuleRequest & WithName(const char *value)
Definition: CreateRateBasedRuleRequest.h:86
Aws::WAF::Model::CreateRateBasedRuleRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: CreateRateBasedRuleRequest.h:335
Aws::WAF::Model::CreateRateBasedRuleRequest::WithMetricName
CreateRateBasedRuleRequest & WithMetricName(const char *value)
Definition: CreateRateBasedRuleRequest.h:167
Aws::WAF::Model::CreateRateBasedRuleRequest::SetRateLimit
void SetRateLimit(long long value)
Definition: CreateRateBasedRuleRequest.h:250
Aws::WAF::Model::CreateRateBasedRuleRequest::GetRateLimit
long long GetRateLimit() const
Definition: CreateRateBasedRuleRequest.h:232
Aws::WAF::Model::CreateRateBasedRuleRequest::WithRateKey
CreateRateBasedRuleRequest & WithRateKey(const RateKey &value)
Definition: CreateRateBasedRuleRequest.h:213
Aws::WAF::WAFRequest
Definition: WAFRequest.h:17
Aws::WAF::Model::CreateRateBasedRuleRequest::WithChangeToken
CreateRateBasedRuleRequest & WithChangeToken(const Aws::String &value)
Definition: CreateRateBasedRuleRequest.h:308
Aws::WAF::Model::CreateRateBasedRuleRequest::SetChangeToken
void SetChangeToken(const char *value)
Definition: CreateRateBasedRuleRequest.h:300