AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
CreateUsagePlanRequest.h
1
6#pragma once
7#include <aws/apigateway/APIGatewayRequest.h>
8#include <aws/apigateway/APIGateway_EXPORTS.h>
9#include <aws/apigateway/model/ApiStage.h>
10#include <aws/apigateway/model/QuotaSettings.h>
11#include <aws/apigateway/model/ThrottleSettings.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <aws/core/utils/memory/stl/AWSVector.h>
15
16#include <utility>
17
18namespace Aws {
19namespace APIGateway {
20namespace Model {
21
30 public:
31 AWS_APIGATEWAY_API CreateUsagePlanRequest() = default;
32
33 // Service request name is the Operation name which will send this request out,
34 // each operation should has unique request name, so that we can get operation's name from this request.
35 // Note: this is not true for response, multiple operations may have the same response name,
36 // so we can not get operation's name from response.
37 inline virtual const char* GetServiceRequestName() const override { return "CreateUsagePlan"; }
38
39 AWS_APIGATEWAY_API Aws::String SerializePayload() const override;
40
42
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) {
49 m_nameHasBeenSet = true;
50 m_name = std::forward<NameT>(value);
51 }
52 template <typename NameT = Aws::String>
54 SetName(std::forward<NameT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetDescription() const { return m_description; }
64 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
65 template <typename DescriptionT = Aws::String>
66 void SetDescription(DescriptionT&& value) {
67 m_descriptionHasBeenSet = true;
68 m_description = std::forward<DescriptionT>(value);
69 }
70 template <typename DescriptionT = Aws::String>
71 CreateUsagePlanRequest& WithDescription(DescriptionT&& value) {
72 SetDescription(std::forward<DescriptionT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::Vector<ApiStage>& GetApiStages() const { return m_apiStages; }
82 inline bool ApiStagesHasBeenSet() const { return m_apiStagesHasBeenSet; }
83 template <typename ApiStagesT = Aws::Vector<ApiStage>>
84 void SetApiStages(ApiStagesT&& value) {
85 m_apiStagesHasBeenSet = true;
86 m_apiStages = std::forward<ApiStagesT>(value);
87 }
88 template <typename ApiStagesT = Aws::Vector<ApiStage>>
90 SetApiStages(std::forward<ApiStagesT>(value));
91 return *this;
92 }
93 template <typename ApiStagesT = ApiStage>
94 CreateUsagePlanRequest& AddApiStages(ApiStagesT&& value) {
95 m_apiStagesHasBeenSet = true;
96 m_apiStages.emplace_back(std::forward<ApiStagesT>(value));
97 return *this;
98 }
100
102
105 inline const ThrottleSettings& GetThrottle() const { return m_throttle; }
106 inline bool ThrottleHasBeenSet() const { return m_throttleHasBeenSet; }
107 template <typename ThrottleT = ThrottleSettings>
108 void SetThrottle(ThrottleT&& value) {
109 m_throttleHasBeenSet = true;
110 m_throttle = std::forward<ThrottleT>(value);
111 }
112 template <typename ThrottleT = ThrottleSettings>
114 SetThrottle(std::forward<ThrottleT>(value));
115 return *this;
116 }
118
120
123 inline const QuotaSettings& GetQuota() const { return m_quota; }
124 inline bool QuotaHasBeenSet() const { return m_quotaHasBeenSet; }
125 template <typename QuotaT = QuotaSettings>
126 void SetQuota(QuotaT&& value) {
127 m_quotaHasBeenSet = true;
128 m_quota = std::forward<QuotaT>(value);
129 }
130 template <typename QuotaT = QuotaSettings>
132 SetQuota(std::forward<QuotaT>(value));
133 return *this;
134 }
136
138
143 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
144 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
145 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
146 void SetTags(TagsT&& value) {
147 m_tagsHasBeenSet = true;
148 m_tags = std::forward<TagsT>(value);
149 }
150 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
152 SetTags(std::forward<TagsT>(value));
153 return *this;
154 }
155 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
156 CreateUsagePlanRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
157 m_tagsHasBeenSet = true;
158 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
159 return *this;
160 }
162 private:
163 Aws::String m_name;
164
165 Aws::String m_description;
166
167 Aws::Vector<ApiStage> m_apiStages;
168
169 ThrottleSettings m_throttle;
170
171 QuotaSettings m_quota;
172
174 bool m_nameHasBeenSet = false;
175 bool m_descriptionHasBeenSet = false;
176 bool m_apiStagesHasBeenSet = false;
177 bool m_throttleHasBeenSet = false;
178 bool m_quotaHasBeenSet = false;
179 bool m_tagsHasBeenSet = false;
180};
181
182} // namespace Model
183} // namespace APIGateway
184} // namespace Aws
CreateUsagePlanRequest & WithQuota(QuotaT &&value)
CreateUsagePlanRequest & AddApiStages(ApiStagesT &&value)
CreateUsagePlanRequest & WithThrottle(ThrottleT &&value)
CreateUsagePlanRequest & WithDescription(DescriptionT &&value)
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateUsagePlanRequest & WithName(NameT &&value)
CreateUsagePlanRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
AWS_APIGATEWAY_API Aws::String SerializePayload() const override
CreateUsagePlanRequest & WithApiStages(ApiStagesT &&value)
CreateUsagePlanRequest & WithTags(TagsT &&value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< ApiStage > & GetApiStages() const
AWS_APIGATEWAY_API CreateUsagePlanRequest()=default
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector