AWS SDK for C++

AWS SDK for C++ Version 1.11.929

Loading...
Searching...
No Matches
UpdateDistributionRequest.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/DistributionCustomErrorResponse.h>
15#include <aws/lightsail/model/InputOrigin.h>
16#include <aws/lightsail/model/ViewerMinimumTlsProtocolVersionEnum.h>
17#include <aws/lightsail/model/WafRule.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Lightsail {
23namespace Model {
24
28 public:
29 AWS_LIGHTSAIL_API UpdateDistributionRequest() = 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 "UpdateDistribution"; }
36
37 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
38
40
42
47 inline const Aws::String& GetDistributionName() const { return m_distributionName; }
48 inline bool DistributionNameHasBeenSet() const { return m_distributionNameHasBeenSet; }
49 template <typename DistributionNameT = Aws::String>
50 void SetDistributionName(DistributionNameT&& value) {
51 m_distributionNameHasBeenSet = true;
52 m_distributionName = std::forward<DistributionNameT>(value);
53 }
54 template <typename DistributionNameT = Aws::String>
55 UpdateDistributionRequest& WithDistributionName(DistributionNameT&& value) {
56 SetDistributionName(std::forward<DistributionNameT>(value));
57 return *this;
58 }
60
62
67 inline const InputOrigin& GetOrigin() const { return m_origin; }
68 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
69 template <typename OriginT = InputOrigin>
70 void SetOrigin(OriginT&& value) {
71 m_originHasBeenSet = true;
72 m_origin = std::forward<OriginT>(value);
73 }
74 template <typename OriginT = InputOrigin>
76 SetOrigin(std::forward<OriginT>(value));
77 return *this;
78 }
80
82
85 inline const CacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
86 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
87 template <typename DefaultCacheBehaviorT = CacheBehavior>
88 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
89 m_defaultCacheBehaviorHasBeenSet = true;
90 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
91 }
92 template <typename DefaultCacheBehaviorT = CacheBehavior>
93 UpdateDistributionRequest& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
94 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
95 return *this;
96 }
98
100
106 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
107 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
108 template <typename CacheBehaviorSettingsT = CacheSettings>
109 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
110 m_cacheBehaviorSettingsHasBeenSet = true;
111 m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value);
112 }
113 template <typename CacheBehaviorSettingsT = CacheSettings>
114 UpdateDistributionRequest& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
115 SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value));
116 return *this;
117 }
119
121
125 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
126 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
127 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
128 void SetCacheBehaviors(CacheBehaviorsT&& value) {
129 m_cacheBehaviorsHasBeenSet = true;
130 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
131 }
132 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
134 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
135 return *this;
136 }
137 template <typename CacheBehaviorsT = CacheBehaviorPerPath>
139 m_cacheBehaviorsHasBeenSet = true;
140 m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value));
141 return *this;
142 }
144
146
149 inline bool GetIsEnabled() const { return m_isEnabled; }
150 inline bool IsEnabledHasBeenSet() const { return m_isEnabledHasBeenSet; }
151 inline void SetIsEnabled(bool value) {
152 m_isEnabledHasBeenSet = true;
153 m_isEnabled = value;
154 }
156 SetIsEnabled(value);
157 return *this;
158 }
160
162
166 inline ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
167 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
169 m_viewerMinimumTlsProtocolVersionHasBeenSet = true;
170 m_viewerMinimumTlsProtocolVersion = value;
171 }
177
179
186 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
187 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
188 template <typename CertificateNameT = Aws::String>
189 void SetCertificateName(CertificateNameT&& value) {
190 m_certificateNameHasBeenSet = true;
191 m_certificateName = std::forward<CertificateNameT>(value);
192 }
193 template <typename CertificateNameT = Aws::String>
195 SetCertificateName(std::forward<CertificateNameT>(value));
196 return *this;
197 }
199
201
208 inline bool GetUseDefaultCertificate() const { return m_useDefaultCertificate; }
209 inline bool UseDefaultCertificateHasBeenSet() const { return m_useDefaultCertificateHasBeenSet; }
210 inline void SetUseDefaultCertificate(bool value) {
211 m_useDefaultCertificateHasBeenSet = true;
212 m_useDefaultCertificate = value;
213 }
216 return *this;
217 }
219
221
233 inline bool GetEnablePrivateOriginAccess() const { return m_enablePrivateOriginAccess; }
234 inline bool EnablePrivateOriginAccessHasBeenSet() const { return m_enablePrivateOriginAccessHasBeenSet; }
235 inline void SetEnablePrivateOriginAccess(bool value) {
236 m_enablePrivateOriginAccessHasBeenSet = true;
237 m_enablePrivateOriginAccess = value;
238 }
241 return *this;
242 }
244
246
252 inline const Aws::String& GetDefaultRootObject() const { return m_defaultRootObject; }
253 inline bool DefaultRootObjectHasBeenSet() const { return m_defaultRootObjectHasBeenSet; }
254 template <typename DefaultRootObjectT = Aws::String>
255 void SetDefaultRootObject(DefaultRootObjectT&& value) {
256 m_defaultRootObjectHasBeenSet = true;
257 m_defaultRootObject = std::forward<DefaultRootObjectT>(value);
258 }
259 template <typename DefaultRootObjectT = Aws::String>
261 SetDefaultRootObject(std::forward<DefaultRootObjectT>(value));
262 return *this;
263 }
265
267
273 inline const Aws::Vector<DistributionCustomErrorResponse>& GetCustomErrorResponses() const { return m_customErrorResponses; }
274 inline bool CustomErrorResponsesHasBeenSet() const { return m_customErrorResponsesHasBeenSet; }
275 template <typename CustomErrorResponsesT = Aws::Vector<DistributionCustomErrorResponse>>
276 void SetCustomErrorResponses(CustomErrorResponsesT&& value) {
277 m_customErrorResponsesHasBeenSet = true;
278 m_customErrorResponses = std::forward<CustomErrorResponsesT>(value);
279 }
280 template <typename CustomErrorResponsesT = Aws::Vector<DistributionCustomErrorResponse>>
281 UpdateDistributionRequest& WithCustomErrorResponses(CustomErrorResponsesT&& value) {
282 SetCustomErrorResponses(std::forward<CustomErrorResponsesT>(value));
283 return *this;
284 }
285 template <typename CustomErrorResponsesT = DistributionCustomErrorResponse>
286 UpdateDistributionRequest& AddCustomErrorResponses(CustomErrorResponsesT&& value) {
287 m_customErrorResponsesHasBeenSet = true;
288 m_customErrorResponses.emplace_back(std::forward<CustomErrorResponsesT>(value));
289 return *this;
290 }
292
294
305 inline bool GetEnableWaf() const { return m_enableWaf; }
306 inline bool EnableWafHasBeenSet() const { return m_enableWafHasBeenSet; }
307 inline void SetEnableWaf(bool value) {
308 m_enableWafHasBeenSet = true;
309 m_enableWaf = value;
310 }
312 SetEnableWaf(value);
313 return *this;
314 }
316
318
341 inline const Aws::Vector<WafRule>& GetWafRules() const { return m_wafRules; }
342 inline bool WafRulesHasBeenSet() const { return m_wafRulesHasBeenSet; }
343 template <typename WafRulesT = Aws::Vector<WafRule>>
344 void SetWafRules(WafRulesT&& value) {
345 m_wafRulesHasBeenSet = true;
346 m_wafRules = std::forward<WafRulesT>(value);
347 }
348 template <typename WafRulesT = Aws::Vector<WafRule>>
350 SetWafRules(std::forward<WafRulesT>(value));
351 return *this;
352 }
353 template <typename WafRulesT = WafRule>
355 m_wafRulesHasBeenSet = true;
356 m_wafRules.emplace_back(std::forward<WafRulesT>(value));
357 return *this;
358 }
360 private:
361 Aws::String m_distributionName;
362
363 InputOrigin m_origin;
364
365 CacheBehavior m_defaultCacheBehavior;
366
367 CacheSettings m_cacheBehaviorSettings;
368
369 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
370
371 bool m_isEnabled{false};
372
374
375 Aws::String m_certificateName;
376
377 bool m_useDefaultCertificate{false};
378
379 bool m_enablePrivateOriginAccess{false};
380
381 Aws::String m_defaultRootObject;
382
384
385 bool m_enableWaf{false};
386
387 Aws::Vector<WafRule> m_wafRules;
388 bool m_distributionNameHasBeenSet = false;
389 bool m_originHasBeenSet = false;
390 bool m_defaultCacheBehaviorHasBeenSet = false;
391 bool m_cacheBehaviorSettingsHasBeenSet = false;
392 bool m_cacheBehaviorsHasBeenSet = false;
393 bool m_isEnabledHasBeenSet = false;
394 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
395 bool m_certificateNameHasBeenSet = false;
396 bool m_useDefaultCertificateHasBeenSet = false;
397 bool m_enablePrivateOriginAccessHasBeenSet = false;
398 bool m_defaultRootObjectHasBeenSet = false;
399 bool m_customErrorResponsesHasBeenSet = false;
400 bool m_enableWafHasBeenSet = false;
401 bool m_wafRulesHasBeenSet = false;
402};
403
404} // namespace Model
405} // namespace Lightsail
406} // namespace Aws
UpdateDistributionRequest & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
UpdateDistributionRequest & AddCacheBehaviors(CacheBehaviorsT &&value)
void SetCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
UpdateDistributionRequest & WithCacheBehaviors(CacheBehaviorsT &&value)
UpdateDistributionRequest & WithWafRules(WafRulesT &&value)
UpdateDistributionRequest & WithIsEnabled(bool value)
UpdateDistributionRequest & WithCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
UpdateDistributionRequest & AddWafRules(WafRulesT &&value)
const Aws::Vector< DistributionCustomErrorResponse > & GetCustomErrorResponses() const
UpdateDistributionRequest & WithEnablePrivateOriginAccess(bool value)
UpdateDistributionRequest & WithViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const
void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionEnum value)
const Aws::Vector< CacheBehaviorPerPath > & GetCacheBehaviors() const
UpdateDistributionRequest & WithOrigin(OriginT &&value)
UpdateDistributionRequest & WithCustomErrorResponses(CustomErrorResponsesT &&value)
void SetCustomErrorResponses(CustomErrorResponsesT &&value)
AWS_LIGHTSAIL_API UpdateDistributionRequest()=default
UpdateDistributionRequest & WithDistributionName(DistributionNameT &&value)
void SetDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
UpdateDistributionRequest & WithCertificateName(CertificateNameT &&value)
UpdateDistributionRequest & WithDefaultRootObject(DefaultRootObjectT &&value)
UpdateDistributionRequest & AddCustomErrorResponses(CustomErrorResponsesT &&value)
virtual const char * GetServiceRequestName() const override
AWS_LIGHTSAIL_API Aws::String SerializePayload() const override
UpdateDistributionRequest & WithUseDefaultCertificate(bool value)
UpdateDistributionRequest & WithEnableWaf(bool 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