AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateRateBasedRuleRequest.h
1
6#pragma once
7#include <aws/waf/WAF_EXPORTS.h>
8#include <aws/waf/WAFRequest.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/waf/model/RateKey.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/waf/model/Tag.h>
13#include <utility>
14
15namespace Aws
16{
17namespace WAF
18{
19namespace Model
20{
21
25 {
26 public:
27 AWS_WAF_API CreateRateBasedRuleRequest() = default;
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_WAF_API Aws::String SerializePayload() const override;
36
38
39
41
45 inline const Aws::String& GetName() const { return m_name; }
46 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
47 template<typename NameT = Aws::String>
48 void SetName(NameT&& value) { m_nameHasBeenSet = true; m_name = std::forward<NameT>(value); }
49 template<typename NameT = Aws::String>
50 CreateRateBasedRuleRequest& WithName(NameT&& value) { SetName(std::forward<NameT>(value)); return *this;}
52
54
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) { m_metricNameHasBeenSet = true; m_metricName = std::forward<MetricNameT>(value); }
66 template<typename MetricNameT = Aws::String>
67 CreateRateBasedRuleRequest& WithMetricName(MetricNameT&& value) { SetMetricName(std::forward<MetricNameT>(value)); return *this;}
69
71
78 inline RateKey GetRateKey() const { return m_rateKey; }
79 inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; }
80 inline void SetRateKey(RateKey value) { m_rateKeyHasBeenSet = true; m_rateKey = value; }
81 inline CreateRateBasedRuleRequest& WithRateKey(RateKey value) { SetRateKey(value); return *this;}
83
85
92 inline long long GetRateLimit() const { return m_rateLimit; }
93 inline bool RateLimitHasBeenSet() const { return m_rateLimitHasBeenSet; }
94 inline void SetRateLimit(long long value) { m_rateLimitHasBeenSet = true; m_rateLimit = value; }
95 inline CreateRateBasedRuleRequest& WithRateLimit(long long value) { SetRateLimit(value); return *this;}
97
99
105 inline const Aws::String& GetChangeToken() const { return m_changeToken; }
106 inline bool ChangeTokenHasBeenSet() const { return m_changeTokenHasBeenSet; }
107 template<typename ChangeTokenT = Aws::String>
108 void SetChangeToken(ChangeTokenT&& value) { m_changeTokenHasBeenSet = true; m_changeToken = std::forward<ChangeTokenT>(value); }
109 template<typename ChangeTokenT = Aws::String>
110 CreateRateBasedRuleRequest& WithChangeToken(ChangeTokenT&& value) { SetChangeToken(std::forward<ChangeTokenT>(value)); return *this;}
112
114
117 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
118 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
119 template<typename TagsT = Aws::Vector<Tag>>
120 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
121 template<typename TagsT = Aws::Vector<Tag>>
122 CreateRateBasedRuleRequest& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
123 template<typename TagsT = Tag>
124 CreateRateBasedRuleRequest& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
126 private:
127
128 Aws::String m_name;
129 bool m_nameHasBeenSet = false;
130
131 Aws::String m_metricName;
132 bool m_metricNameHasBeenSet = false;
133
134 RateKey m_rateKey{RateKey::NOT_SET};
135 bool m_rateKeyHasBeenSet = false;
136
137 long long m_rateLimit{0};
138 bool m_rateLimitHasBeenSet = false;
139
140 Aws::String m_changeToken;
141 bool m_changeTokenHasBeenSet = false;
142
143 Aws::Vector<Tag> m_tags;
144 bool m_tagsHasBeenSet = false;
145 };
146
147} // namespace Model
148} // namespace WAF
149} // namespace Aws
CreateRateBasedRuleRequest & AddTags(TagsT &&value)
CreateRateBasedRuleRequest & WithTags(TagsT &&value)
CreateRateBasedRuleRequest & WithName(NameT &&value)
AWS_WAF_API Aws::String SerializePayload() const override
AWS_WAF_API CreateRateBasedRuleRequest()=default
CreateRateBasedRuleRequest & WithChangeToken(ChangeTokenT &&value)
AWS_WAF_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateRateBasedRuleRequest & WithRateKey(RateKey value)
CreateRateBasedRuleRequest & WithRateLimit(long long value)
virtual const char * GetServiceRequestName() const override
CreateRateBasedRuleRequest & WithMetricName(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