AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
CreateDistributionRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/lightsail/LightsailRequest.h>
10#include <aws/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/CacheBehavior.h>
12#include <aws/lightsail/model/CacheBehaviorPerPath.h>
13#include <aws/lightsail/model/CacheSettings.h>
14#include <aws/lightsail/model/InputOrigin.h>
15#include <aws/lightsail/model/IpAddressType.h>
16#include <aws/lightsail/model/Tag.h>
17#include <aws/lightsail/model/ViewerMinimumTlsProtocolVersionEnum.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Lightsail {
23namespace Model {
24
28 public:
29 AWS_LIGHTSAIL_API CreateDistributionRequest() = default;
30
31 // Service request name is the Operation name which will send this request out,
32 // each operation should has unique request name, so that we can get operation's name from this request.
33 // Note: this is not true for response, multiple operations may have the same response name,
34 // so we can not get operation's name from response.
35 inline virtual const char* GetServiceRequestName() const override { return "CreateDistribution"; }
36
37 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
38
40
42
45 inline const Aws::String& GetDistributionName() const { return m_distributionName; }
46 inline bool DistributionNameHasBeenSet() const { return m_distributionNameHasBeenSet; }
47 template <typename DistributionNameT = Aws::String>
48 void SetDistributionName(DistributionNameT&& value) {
49 m_distributionNameHasBeenSet = true;
50 m_distributionName = std::forward<DistributionNameT>(value);
51 }
52 template <typename DistributionNameT = Aws::String>
53 CreateDistributionRequest& WithDistributionName(DistributionNameT&& value) {
54 SetDistributionName(std::forward<DistributionNameT>(value));
55 return *this;
56 }
58
60
65 inline const InputOrigin& GetOrigin() const { return m_origin; }
66 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
67 template <typename OriginT = InputOrigin>
68 void SetOrigin(OriginT&& value) {
69 m_originHasBeenSet = true;
70 m_origin = std::forward<OriginT>(value);
71 }
72 template <typename OriginT = InputOrigin>
74 SetOrigin(std::forward<OriginT>(value));
75 return *this;
76 }
78
80
83 inline const CacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
84 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
85 template <typename DefaultCacheBehaviorT = CacheBehavior>
86 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
87 m_defaultCacheBehaviorHasBeenSet = true;
88 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
89 }
90 template <typename DefaultCacheBehaviorT = CacheBehavior>
91 CreateDistributionRequest& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
92 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
93 return *this;
94 }
96
98
102 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
103 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
104 template <typename CacheBehaviorSettingsT = CacheSettings>
105 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
106 m_cacheBehaviorSettingsHasBeenSet = true;
107 m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value);
108 }
109 template <typename CacheBehaviorSettingsT = CacheSettings>
110 CreateDistributionRequest& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
111 SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value));
112 return *this;
113 }
115
117
121 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
122 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
123 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
124 void SetCacheBehaviors(CacheBehaviorsT&& value) {
125 m_cacheBehaviorsHasBeenSet = true;
126 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
127 }
128 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
130 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
131 return *this;
132 }
133 template <typename CacheBehaviorsT = CacheBehaviorPerPath>
135 m_cacheBehaviorsHasBeenSet = true;
136 m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value));
137 return *this;
138 }
140
142
149 inline const Aws::String& GetBundleId() const { return m_bundleId; }
150 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
151 template <typename BundleIdT = Aws::String>
152 void SetBundleId(BundleIdT&& value) {
153 m_bundleIdHasBeenSet = true;
154 m_bundleId = std::forward<BundleIdT>(value);
155 }
156 template <typename BundleIdT = Aws::String>
158 SetBundleId(std::forward<BundleIdT>(value));
159 return *this;
160 }
162
164
169 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
170 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
171 inline void SetIpAddressType(IpAddressType value) {
172 m_ipAddressTypeHasBeenSet = true;
173 m_ipAddressType = value;
174 }
176 SetIpAddressType(value);
177 return *this;
178 }
180
182
187 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
188 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
189 template <typename TagsT = Aws::Vector<Tag>>
190 void SetTags(TagsT&& value) {
191 m_tagsHasBeenSet = true;
192 m_tags = std::forward<TagsT>(value);
193 }
194 template <typename TagsT = Aws::Vector<Tag>>
196 SetTags(std::forward<TagsT>(value));
197 return *this;
198 }
199 template <typename TagsT = Tag>
201 m_tagsHasBeenSet = true;
202 m_tags.emplace_back(std::forward<TagsT>(value));
203 return *this;
204 }
206
208
214 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
215 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
216 template <typename CertificateNameT = Aws::String>
217 void SetCertificateName(CertificateNameT&& value) {
218 m_certificateNameHasBeenSet = true;
219 m_certificateName = std::forward<CertificateNameT>(value);
220 }
221 template <typename CertificateNameT = Aws::String>
223 SetCertificateName(std::forward<CertificateNameT>(value));
224 return *this;
225 }
227
229
232 inline ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
233 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
235 m_viewerMinimumTlsProtocolVersionHasBeenSet = true;
236 m_viewerMinimumTlsProtocolVersion = value;
237 }
240 return *this;
241 }
243 private:
244 Aws::String m_distributionName;
245
246 InputOrigin m_origin;
247
248 CacheBehavior m_defaultCacheBehavior;
249
250 CacheSettings m_cacheBehaviorSettings;
251
252 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
253
254 Aws::String m_bundleId;
255
256 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
257
258 Aws::Vector<Tag> m_tags;
259
260 Aws::String m_certificateName;
261
263 bool m_distributionNameHasBeenSet = false;
264 bool m_originHasBeenSet = false;
265 bool m_defaultCacheBehaviorHasBeenSet = false;
266 bool m_cacheBehaviorSettingsHasBeenSet = false;
267 bool m_cacheBehaviorsHasBeenSet = false;
268 bool m_bundleIdHasBeenSet = false;
269 bool m_ipAddressTypeHasBeenSet = false;
270 bool m_tagsHasBeenSet = false;
271 bool m_certificateNameHasBeenSet = false;
272 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
273};
274
275} // namespace Model
276} // namespace Lightsail
277} // namespace Aws
CreateDistributionRequest & WithViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
CreateDistributionRequest & WithDistributionName(DistributionNameT &&value)
void SetCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
CreateDistributionRequest & AddTags(TagsT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
CreateDistributionRequest & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
CreateDistributionRequest & WithCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
const Aws::Vector< CacheBehaviorPerPath > & GetCacheBehaviors() const
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
void SetDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
virtual const char * GetServiceRequestName() const override
CreateDistributionRequest & AddCacheBehaviors(CacheBehaviorsT &&value)
CreateDistributionRequest & WithIpAddressType(IpAddressType value)
ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const
CreateDistributionRequest & WithCacheBehaviors(CacheBehaviorsT &&value)
CreateDistributionRequest & WithCertificateName(CertificateNameT &&value)
AWS_LIGHTSAIL_API CreateDistributionRequest()=default
CreateDistributionRequest & WithOrigin(OriginT &&value)
CreateDistributionRequest & WithBundleId(BundleIdT &&value)
CreateDistributionRequest & WithTags(TagsT &&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