AWS SDK for C++

AWS SDK for C++ Version 1.11.719

Loading...
Searching...
No Matches
CreateServiceRequest.h
1
6#pragma once
7#include <aws/core/utils/UUID.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/servicediscovery/ServiceDiscoveryRequest.h>
11#include <aws/servicediscovery/ServiceDiscovery_EXPORTS.h>
12#include <aws/servicediscovery/model/DnsConfig.h>
13#include <aws/servicediscovery/model/HealthCheckConfig.h>
14#include <aws/servicediscovery/model/HealthCheckCustomConfig.h>
15#include <aws/servicediscovery/model/ServiceTypeOption.h>
16#include <aws/servicediscovery/model/Tag.h>
17
18#include <utility>
19
20namespace Aws {
21namespace ServiceDiscovery {
22namespace Model {
23
27 public:
28 AWS_SERVICEDISCOVERY_API CreateServiceRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateService"; }
35
36 AWS_SERVICEDISCOVERY_API Aws::String SerializePayload() const override;
37
38 AWS_SERVICEDISCOVERY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
39
41
60 inline const Aws::String& GetName() const { return m_name; }
61 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
62 template <typename NameT = Aws::String>
63 void SetName(NameT&& value) {
64 m_nameHasBeenSet = true;
65 m_name = std::forward<NameT>(value);
66 }
67 template <typename NameT = Aws::String>
69 SetName(std::forward<NameT>(value));
70 return *this;
71 }
73
75
82 inline const Aws::String& GetNamespaceId() const { return m_namespaceId; }
83 inline bool NamespaceIdHasBeenSet() const { return m_namespaceIdHasBeenSet; }
84 template <typename NamespaceIdT = Aws::String>
85 void SetNamespaceId(NamespaceIdT&& value) {
86 m_namespaceIdHasBeenSet = true;
87 m_namespaceId = std::forward<NamespaceIdT>(value);
88 }
89 template <typename NamespaceIdT = Aws::String>
90 CreateServiceRequest& WithNamespaceId(NamespaceIdT&& value) {
91 SetNamespaceId(std::forward<NamespaceIdT>(value));
92 return *this;
93 }
95
97
103 inline const Aws::String& GetCreatorRequestId() const { return m_creatorRequestId; }
104 inline bool CreatorRequestIdHasBeenSet() const { return m_creatorRequestIdHasBeenSet; }
105 template <typename CreatorRequestIdT = Aws::String>
106 void SetCreatorRequestId(CreatorRequestIdT&& value) {
107 m_creatorRequestIdHasBeenSet = true;
108 m_creatorRequestId = std::forward<CreatorRequestIdT>(value);
109 }
110 template <typename CreatorRequestIdT = Aws::String>
111 CreateServiceRequest& WithCreatorRequestId(CreatorRequestIdT&& value) {
112 SetCreatorRequestId(std::forward<CreatorRequestIdT>(value));
113 return *this;
114 }
116
118
121 inline const Aws::String& GetDescription() const { return m_description; }
122 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
123 template <typename DescriptionT = Aws::String>
124 void SetDescription(DescriptionT&& value) {
125 m_descriptionHasBeenSet = true;
126 m_description = std::forward<DescriptionT>(value);
127 }
128 template <typename DescriptionT = Aws::String>
129 CreateServiceRequest& WithDescription(DescriptionT&& value) {
130 SetDescription(std::forward<DescriptionT>(value));
131 return *this;
132 }
134
136
140 inline const DnsConfig& GetDnsConfig() const { return m_dnsConfig; }
141 inline bool DnsConfigHasBeenSet() const { return m_dnsConfigHasBeenSet; }
142 template <typename DnsConfigT = DnsConfig>
143 void SetDnsConfig(DnsConfigT&& value) {
144 m_dnsConfigHasBeenSet = true;
145 m_dnsConfig = std::forward<DnsConfigT>(value);
146 }
147 template <typename DnsConfigT = DnsConfig>
148 CreateServiceRequest& WithDnsConfig(DnsConfigT&& value) {
149 SetDnsConfig(std::forward<DnsConfigT>(value));
150 return *this;
151 }
153
155
166 inline const HealthCheckConfig& GetHealthCheckConfig() const { return m_healthCheckConfig; }
167 inline bool HealthCheckConfigHasBeenSet() const { return m_healthCheckConfigHasBeenSet; }
168 template <typename HealthCheckConfigT = HealthCheckConfig>
169 void SetHealthCheckConfig(HealthCheckConfigT&& value) {
170 m_healthCheckConfigHasBeenSet = true;
171 m_healthCheckConfig = std::forward<HealthCheckConfigT>(value);
172 }
173 template <typename HealthCheckConfigT = HealthCheckConfig>
174 CreateServiceRequest& WithHealthCheckConfig(HealthCheckConfigT&& value) {
175 SetHealthCheckConfig(std::forward<HealthCheckConfigT>(value));
176 return *this;
177 }
179
181
189 inline const HealthCheckCustomConfig& GetHealthCheckCustomConfig() const { return m_healthCheckCustomConfig; }
190 inline bool HealthCheckCustomConfigHasBeenSet() const { return m_healthCheckCustomConfigHasBeenSet; }
191 template <typename HealthCheckCustomConfigT = HealthCheckCustomConfig>
192 void SetHealthCheckCustomConfig(HealthCheckCustomConfigT&& value) {
193 m_healthCheckCustomConfigHasBeenSet = true;
194 m_healthCheckCustomConfig = std::forward<HealthCheckCustomConfigT>(value);
195 }
196 template <typename HealthCheckCustomConfigT = HealthCheckCustomConfig>
197 CreateServiceRequest& WithHealthCheckCustomConfig(HealthCheckCustomConfigT&& value) {
198 SetHealthCheckCustomConfig(std::forward<HealthCheckCustomConfigT>(value));
199 return *this;
200 }
202
204
209 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
210 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
211 template <typename TagsT = Aws::Vector<Tag>>
212 void SetTags(TagsT&& value) {
213 m_tagsHasBeenSet = true;
214 m_tags = std::forward<TagsT>(value);
215 }
216 template <typename TagsT = Aws::Vector<Tag>>
218 SetTags(std::forward<TagsT>(value));
219 return *this;
220 }
221 template <typename TagsT = Tag>
223 m_tagsHasBeenSet = true;
224 m_tags.emplace_back(std::forward<TagsT>(value));
225 return *this;
226 }
228
230
235 inline ServiceTypeOption GetType() const { return m_type; }
236 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
237 inline void SetType(ServiceTypeOption value) {
238 m_typeHasBeenSet = true;
239 m_type = value;
240 }
242 SetType(value);
243 return *this;
244 }
246 private:
247 Aws::String m_name;
248
249 Aws::String m_namespaceId;
250
252
253 Aws::String m_description;
254
255 DnsConfig m_dnsConfig;
256
257 HealthCheckConfig m_healthCheckConfig;
258
259 HealthCheckCustomConfig m_healthCheckCustomConfig;
260
261 Aws::Vector<Tag> m_tags;
262
264 bool m_nameHasBeenSet = false;
265 bool m_namespaceIdHasBeenSet = false;
266 bool m_creatorRequestIdHasBeenSet = true;
267 bool m_descriptionHasBeenSet = false;
268 bool m_dnsConfigHasBeenSet = false;
269 bool m_healthCheckConfigHasBeenSet = false;
270 bool m_healthCheckCustomConfigHasBeenSet = false;
271 bool m_tagsHasBeenSet = false;
272 bool m_typeHasBeenSet = false;
273};
274
275} // namespace Model
276} // namespace ServiceDiscovery
277} // namespace Aws
CreateServiceRequest & WithType(ServiceTypeOption value)
CreateServiceRequest & WithNamespaceId(NamespaceIdT &&value)
AWS_SERVICEDISCOVERY_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateServiceRequest & WithDescription(DescriptionT &&value)
CreateServiceRequest & WithName(NameT &&value)
AWS_SERVICEDISCOVERY_API CreateServiceRequest()=default
void SetHealthCheckCustomConfig(HealthCheckCustomConfigT &&value)
virtual const char * GetServiceRequestName() const override
const HealthCheckCustomConfig & GetHealthCheckCustomConfig() const
CreateServiceRequest & WithHealthCheckConfig(HealthCheckConfigT &&value)
CreateServiceRequest & WithHealthCheckCustomConfig(HealthCheckCustomConfigT &&value)
AWS_SERVICEDISCOVERY_API Aws::String SerializePayload() const override
CreateServiceRequest & WithCreatorRequestId(CreatorRequestIdT &&value)
CreateServiceRequest & WithDnsConfig(DnsConfigT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
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