AWS SDK for C++

AWS SDK for C++ Version 1.11.891

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
18#include <utility>
19
20namespace Aws {
21namespace Lightsail {
22namespace Model {
23
27 public:
28 AWS_LIGHTSAIL_API UpdateDistributionRequest() = 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 "UpdateDistribution"; }
35
36 AWS_LIGHTSAIL_API Aws::String SerializePayload() const override;
37
39
41
46 inline const Aws::String& GetDistributionName() const { return m_distributionName; }
47 inline bool DistributionNameHasBeenSet() const { return m_distributionNameHasBeenSet; }
48 template <typename DistributionNameT = Aws::String>
49 void SetDistributionName(DistributionNameT&& value) {
50 m_distributionNameHasBeenSet = true;
51 m_distributionName = std::forward<DistributionNameT>(value);
52 }
53 template <typename DistributionNameT = Aws::String>
54 UpdateDistributionRequest& WithDistributionName(DistributionNameT&& value) {
55 SetDistributionName(std::forward<DistributionNameT>(value));
56 return *this;
57 }
59
61
66 inline const InputOrigin& GetOrigin() const { return m_origin; }
67 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
68 template <typename OriginT = InputOrigin>
69 void SetOrigin(OriginT&& value) {
70 m_originHasBeenSet = true;
71 m_origin = std::forward<OriginT>(value);
72 }
73 template <typename OriginT = InputOrigin>
75 SetOrigin(std::forward<OriginT>(value));
76 return *this;
77 }
79
81
84 inline const CacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
85 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
86 template <typename DefaultCacheBehaviorT = CacheBehavior>
87 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
88 m_defaultCacheBehaviorHasBeenSet = true;
89 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
90 }
91 template <typename DefaultCacheBehaviorT = CacheBehavior>
92 UpdateDistributionRequest& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
93 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
94 return *this;
95 }
97
99
105 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
106 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
107 template <typename CacheBehaviorSettingsT = CacheSettings>
108 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
109 m_cacheBehaviorSettingsHasBeenSet = true;
110 m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value);
111 }
112 template <typename CacheBehaviorSettingsT = CacheSettings>
113 UpdateDistributionRequest& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
114 SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value));
115 return *this;
116 }
118
120
124 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
125 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
126 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
127 void SetCacheBehaviors(CacheBehaviorsT&& value) {
128 m_cacheBehaviorsHasBeenSet = true;
129 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
130 }
131 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
133 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
134 return *this;
135 }
136 template <typename CacheBehaviorsT = CacheBehaviorPerPath>
138 m_cacheBehaviorsHasBeenSet = true;
139 m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value));
140 return *this;
141 }
143
145
148 inline bool GetIsEnabled() const { return m_isEnabled; }
149 inline bool IsEnabledHasBeenSet() const { return m_isEnabledHasBeenSet; }
150 inline void SetIsEnabled(bool value) {
151 m_isEnabledHasBeenSet = true;
152 m_isEnabled = value;
153 }
155 SetIsEnabled(value);
156 return *this;
157 }
159
161
165 inline ViewerMinimumTlsProtocolVersionEnum GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
166 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
168 m_viewerMinimumTlsProtocolVersionHasBeenSet = true;
169 m_viewerMinimumTlsProtocolVersion = value;
170 }
173 return *this;
174 }
176
178
185 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
186 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
187 template <typename CertificateNameT = Aws::String>
188 void SetCertificateName(CertificateNameT&& value) {
189 m_certificateNameHasBeenSet = true;
190 m_certificateName = std::forward<CertificateNameT>(value);
191 }
192 template <typename CertificateNameT = Aws::String>
194 SetCertificateName(std::forward<CertificateNameT>(value));
195 return *this;
196 }
198
200
207 inline bool GetUseDefaultCertificate() const { return m_useDefaultCertificate; }
208 inline bool UseDefaultCertificateHasBeenSet() const { return m_useDefaultCertificateHasBeenSet; }
209 inline void SetUseDefaultCertificate(bool value) {
210 m_useDefaultCertificateHasBeenSet = true;
211 m_useDefaultCertificate = value;
212 }
215 return *this;
216 }
218
220
232 inline bool GetEnablePrivateOriginAccess() const { return m_enablePrivateOriginAccess; }
233 inline bool EnablePrivateOriginAccessHasBeenSet() const { return m_enablePrivateOriginAccessHasBeenSet; }
234 inline void SetEnablePrivateOriginAccess(bool value) {
235 m_enablePrivateOriginAccessHasBeenSet = true;
236 m_enablePrivateOriginAccess = value;
237 }
240 return *this;
241 }
243
245
251 inline const Aws::String& GetDefaultRootObject() const { return m_defaultRootObject; }
252 inline bool DefaultRootObjectHasBeenSet() const { return m_defaultRootObjectHasBeenSet; }
253 template <typename DefaultRootObjectT = Aws::String>
254 void SetDefaultRootObject(DefaultRootObjectT&& value) {
255 m_defaultRootObjectHasBeenSet = true;
256 m_defaultRootObject = std::forward<DefaultRootObjectT>(value);
257 }
258 template <typename DefaultRootObjectT = Aws::String>
260 SetDefaultRootObject(std::forward<DefaultRootObjectT>(value));
261 return *this;
262 }
264
266
272 inline const Aws::Vector<DistributionCustomErrorResponse>& GetCustomErrorResponses() const { return m_customErrorResponses; }
273 inline bool CustomErrorResponsesHasBeenSet() const { return m_customErrorResponsesHasBeenSet; }
274 template <typename CustomErrorResponsesT = Aws::Vector<DistributionCustomErrorResponse>>
275 void SetCustomErrorResponses(CustomErrorResponsesT&& value) {
276 m_customErrorResponsesHasBeenSet = true;
277 m_customErrorResponses = std::forward<CustomErrorResponsesT>(value);
278 }
279 template <typename CustomErrorResponsesT = Aws::Vector<DistributionCustomErrorResponse>>
280 UpdateDistributionRequest& WithCustomErrorResponses(CustomErrorResponsesT&& value) {
281 SetCustomErrorResponses(std::forward<CustomErrorResponsesT>(value));
282 return *this;
283 }
284 template <typename CustomErrorResponsesT = DistributionCustomErrorResponse>
285 UpdateDistributionRequest& AddCustomErrorResponses(CustomErrorResponsesT&& value) {
286 m_customErrorResponsesHasBeenSet = true;
287 m_customErrorResponses.emplace_back(std::forward<CustomErrorResponsesT>(value));
288 return *this;
289 }
291 private:
292 Aws::String m_distributionName;
293
294 InputOrigin m_origin;
295
296 CacheBehavior m_defaultCacheBehavior;
297
298 CacheSettings m_cacheBehaviorSettings;
299
300 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
301
302 bool m_isEnabled{false};
303
305
306 Aws::String m_certificateName;
307
308 bool m_useDefaultCertificate{false};
309
310 bool m_enablePrivateOriginAccess{false};
311
312 Aws::String m_defaultRootObject;
313
315 bool m_distributionNameHasBeenSet = false;
316 bool m_originHasBeenSet = false;
317 bool m_defaultCacheBehaviorHasBeenSet = false;
318 bool m_cacheBehaviorSettingsHasBeenSet = false;
319 bool m_cacheBehaviorsHasBeenSet = false;
320 bool m_isEnabledHasBeenSet = false;
321 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
322 bool m_certificateNameHasBeenSet = false;
323 bool m_useDefaultCertificateHasBeenSet = false;
324 bool m_enablePrivateOriginAccessHasBeenSet = false;
325 bool m_defaultRootObjectHasBeenSet = false;
326 bool m_customErrorResponsesHasBeenSet = false;
327};
328
329} // namespace Model
330} // namespace Lightsail
331} // namespace Aws
UpdateDistributionRequest & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
UpdateDistributionRequest & AddCacheBehaviors(CacheBehaviorsT &&value)
void SetCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
UpdateDistributionRequest & WithCacheBehaviors(CacheBehaviorsT &&value)
UpdateDistributionRequest & WithIsEnabled(bool value)
UpdateDistributionRequest & WithCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
AWS_LIGHTSAIL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
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)
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