AWS SDK for C++

AWS SDK for C++ Version 1.11.891

Loading...
Searching...
No Matches
LightsailDistribution.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.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/IpAddressType.h>
16#include <aws/lightsail/model/Origin.h>
17#include <aws/lightsail/model/ResourceLocation.h>
18#include <aws/lightsail/model/ResourceType.h>
19#include <aws/lightsail/model/Tag.h>
20
21#include <utility>
22
23namespace Aws {
24namespace Utils {
25namespace Json {
26class JsonValue;
27class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace Lightsail {
31namespace Model {
32
40 public:
41 AWS_LIGHTSAIL_API LightsailDistribution() = default;
44 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
45
47
50 inline const Aws::String& GetName() const { return m_name; }
51 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
52 template <typename NameT = Aws::String>
53 void SetName(NameT&& value) {
54 m_nameHasBeenSet = true;
55 m_name = std::forward<NameT>(value);
56 }
57 template <typename NameT = Aws::String>
59 SetName(std::forward<NameT>(value));
60 return *this;
61 }
63
65
68 inline const Aws::String& GetArn() const { return m_arn; }
69 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
70 template <typename ArnT = Aws::String>
71 void SetArn(ArnT&& value) {
72 m_arnHasBeenSet = true;
73 m_arn = std::forward<ArnT>(value);
74 }
75 template <typename ArnT = Aws::String>
77 SetArn(std::forward<ArnT>(value));
78 return *this;
79 }
81
83
88 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
89 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
90 template <typename SupportCodeT = Aws::String>
91 void SetSupportCode(SupportCodeT&& value) {
92 m_supportCodeHasBeenSet = true;
93 m_supportCode = std::forward<SupportCodeT>(value);
94 }
95 template <typename SupportCodeT = Aws::String>
96 LightsailDistribution& WithSupportCode(SupportCodeT&& value) {
97 SetSupportCode(std::forward<SupportCodeT>(value));
98 return *this;
99 }
101
103
106 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
107 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
108 template <typename CreatedAtT = Aws::Utils::DateTime>
109 void SetCreatedAt(CreatedAtT&& value) {
110 m_createdAtHasBeenSet = true;
111 m_createdAt = std::forward<CreatedAtT>(value);
112 }
113 template <typename CreatedAtT = Aws::Utils::DateTime>
115 SetCreatedAt(std::forward<CreatedAtT>(value));
116 return *this;
117 }
119
121
128 inline const ResourceLocation& GetLocation() const { return m_location; }
129 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
130 template <typename LocationT = ResourceLocation>
131 void SetLocation(LocationT&& value) {
132 m_locationHasBeenSet = true;
133 m_location = std::forward<LocationT>(value);
134 }
135 template <typename LocationT = ResourceLocation>
137 SetLocation(std::forward<LocationT>(value));
138 return *this;
139 }
141
143
146 inline ResourceType GetResourceType() const { return m_resourceType; }
147 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
148 inline void SetResourceType(ResourceType value) {
149 m_resourceTypeHasBeenSet = true;
150 m_resourceType = value;
151 }
153 SetResourceType(value);
154 return *this;
155 }
157
159
162 inline const Aws::Vector<Aws::String>& GetAlternativeDomainNames() const { return m_alternativeDomainNames; }
163 inline bool AlternativeDomainNamesHasBeenSet() const { return m_alternativeDomainNamesHasBeenSet; }
164 template <typename AlternativeDomainNamesT = Aws::Vector<Aws::String>>
165 void SetAlternativeDomainNames(AlternativeDomainNamesT&& value) {
166 m_alternativeDomainNamesHasBeenSet = true;
167 m_alternativeDomainNames = std::forward<AlternativeDomainNamesT>(value);
168 }
169 template <typename AlternativeDomainNamesT = Aws::Vector<Aws::String>>
170 LightsailDistribution& WithAlternativeDomainNames(AlternativeDomainNamesT&& value) {
171 SetAlternativeDomainNames(std::forward<AlternativeDomainNamesT>(value));
172 return *this;
173 }
174 template <typename AlternativeDomainNamesT = Aws::String>
175 LightsailDistribution& AddAlternativeDomainNames(AlternativeDomainNamesT&& value) {
176 m_alternativeDomainNamesHasBeenSet = true;
177 m_alternativeDomainNames.emplace_back(std::forward<AlternativeDomainNamesT>(value));
178 return *this;
179 }
181
183
186 inline const Aws::String& GetStatus() const { return m_status; }
187 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
188 template <typename StatusT = Aws::String>
189 void SetStatus(StatusT&& value) {
190 m_statusHasBeenSet = true;
191 m_status = std::forward<StatusT>(value);
192 }
193 template <typename StatusT = Aws::String>
195 SetStatus(std::forward<StatusT>(value));
196 return *this;
197 }
199
201
204 inline bool GetIsEnabled() const { return m_isEnabled; }
205 inline bool IsEnabledHasBeenSet() const { return m_isEnabledHasBeenSet; }
206 inline void SetIsEnabled(bool value) {
207 m_isEnabledHasBeenSet = true;
208 m_isEnabled = value;
209 }
211 SetIsEnabled(value);
212 return *this;
213 }
215
217
220 inline const Aws::String& GetDomainName() const { return m_domainName; }
221 inline bool DomainNameHasBeenSet() const { return m_domainNameHasBeenSet; }
222 template <typename DomainNameT = Aws::String>
223 void SetDomainName(DomainNameT&& value) {
224 m_domainNameHasBeenSet = true;
225 m_domainName = std::forward<DomainNameT>(value);
226 }
227 template <typename DomainNameT = Aws::String>
228 LightsailDistribution& WithDomainName(DomainNameT&& value) {
229 SetDomainName(std::forward<DomainNameT>(value));
230 return *this;
231 }
233
235
238 inline const Aws::String& GetBundleId() const { return m_bundleId; }
239 inline bool BundleIdHasBeenSet() const { return m_bundleIdHasBeenSet; }
240 template <typename BundleIdT = Aws::String>
241 void SetBundleId(BundleIdT&& value) {
242 m_bundleIdHasBeenSet = true;
243 m_bundleId = std::forward<BundleIdT>(value);
244 }
245 template <typename BundleIdT = Aws::String>
247 SetBundleId(std::forward<BundleIdT>(value));
248 return *this;
249 }
251
253
256 inline const Aws::String& GetCertificateName() const { return m_certificateName; }
257 inline bool CertificateNameHasBeenSet() const { return m_certificateNameHasBeenSet; }
258 template <typename CertificateNameT = Aws::String>
259 void SetCertificateName(CertificateNameT&& value) {
260 m_certificateNameHasBeenSet = true;
261 m_certificateName = std::forward<CertificateNameT>(value);
262 }
263 template <typename CertificateNameT = Aws::String>
264 LightsailDistribution& WithCertificateName(CertificateNameT&& value) {
265 SetCertificateName(std::forward<CertificateNameT>(value));
266 return *this;
267 }
269
271
276 inline const Origin& GetOrigin() const { return m_origin; }
277 inline bool OriginHasBeenSet() const { return m_originHasBeenSet; }
278 template <typename OriginT = Origin>
279 void SetOrigin(OriginT&& value) {
280 m_originHasBeenSet = true;
281 m_origin = std::forward<OriginT>(value);
282 }
283 template <typename OriginT = Origin>
285 SetOrigin(std::forward<OriginT>(value));
286 return *this;
287 }
289
291
294 inline const Aws::String& GetOriginPublicDNS() const { return m_originPublicDNS; }
295 inline bool OriginPublicDNSHasBeenSet() const { return m_originPublicDNSHasBeenSet; }
296 template <typename OriginPublicDNST = Aws::String>
297 void SetOriginPublicDNS(OriginPublicDNST&& value) {
298 m_originPublicDNSHasBeenSet = true;
299 m_originPublicDNS = std::forward<OriginPublicDNST>(value);
300 }
301 template <typename OriginPublicDNST = Aws::String>
302 LightsailDistribution& WithOriginPublicDNS(OriginPublicDNST&& value) {
303 SetOriginPublicDNS(std::forward<OriginPublicDNST>(value));
304 return *this;
305 }
307
309
312 inline const CacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
313 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
314 template <typename DefaultCacheBehaviorT = CacheBehavior>
315 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
316 m_defaultCacheBehaviorHasBeenSet = true;
317 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
318 }
319 template <typename DefaultCacheBehaviorT = CacheBehavior>
320 LightsailDistribution& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
321 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
322 return *this;
323 }
325
327
330 inline const CacheSettings& GetCacheBehaviorSettings() const { return m_cacheBehaviorSettings; }
331 inline bool CacheBehaviorSettingsHasBeenSet() const { return m_cacheBehaviorSettingsHasBeenSet; }
332 template <typename CacheBehaviorSettingsT = CacheSettings>
333 void SetCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
334 m_cacheBehaviorSettingsHasBeenSet = true;
335 m_cacheBehaviorSettings = std::forward<CacheBehaviorSettingsT>(value);
336 }
337 template <typename CacheBehaviorSettingsT = CacheSettings>
338 LightsailDistribution& WithCacheBehaviorSettings(CacheBehaviorSettingsT&& value) {
339 SetCacheBehaviorSettings(std::forward<CacheBehaviorSettingsT>(value));
340 return *this;
341 }
343
345
349 inline const Aws::Vector<CacheBehaviorPerPath>& GetCacheBehaviors() const { return m_cacheBehaviors; }
350 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
351 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
352 void SetCacheBehaviors(CacheBehaviorsT&& value) {
353 m_cacheBehaviorsHasBeenSet = true;
354 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
355 }
356 template <typename CacheBehaviorsT = Aws::Vector<CacheBehaviorPerPath>>
357 LightsailDistribution& WithCacheBehaviors(CacheBehaviorsT&& value) {
358 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
359 return *this;
360 }
361 template <typename CacheBehaviorsT = CacheBehaviorPerPath>
362 LightsailDistribution& AddCacheBehaviors(CacheBehaviorsT&& value) {
363 m_cacheBehaviorsHasBeenSet = true;
364 m_cacheBehaviors.emplace_back(std::forward<CacheBehaviorsT>(value));
365 return *this;
366 }
368
370
376 inline bool GetAbleToUpdateBundle() const { return m_ableToUpdateBundle; }
377 inline bool AbleToUpdateBundleHasBeenSet() const { return m_ableToUpdateBundleHasBeenSet; }
378 inline void SetAbleToUpdateBundle(bool value) {
379 m_ableToUpdateBundleHasBeenSet = true;
380 m_ableToUpdateBundle = value;
381 }
384 return *this;
385 }
387
389
394 inline IpAddressType GetIpAddressType() const { return m_ipAddressType; }
395 inline bool IpAddressTypeHasBeenSet() const { return m_ipAddressTypeHasBeenSet; }
396 inline void SetIpAddressType(IpAddressType value) {
397 m_ipAddressTypeHasBeenSet = true;
398 m_ipAddressType = value;
399 }
401 SetIpAddressType(value);
402 return *this;
403 }
405
407
413 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
414 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
415 template <typename TagsT = Aws::Vector<Tag>>
416 void SetTags(TagsT&& value) {
417 m_tagsHasBeenSet = true;
418 m_tags = std::forward<TagsT>(value);
419 }
420 template <typename TagsT = Aws::Vector<Tag>>
422 SetTags(std::forward<TagsT>(value));
423 return *this;
424 }
425 template <typename TagsT = Tag>
427 m_tagsHasBeenSet = true;
428 m_tags.emplace_back(std::forward<TagsT>(value));
429 return *this;
430 }
432
434
438 inline const Aws::String& GetViewerMinimumTlsProtocolVersion() const { return m_viewerMinimumTlsProtocolVersion; }
439 inline bool ViewerMinimumTlsProtocolVersionHasBeenSet() const { return m_viewerMinimumTlsProtocolVersionHasBeenSet; }
440 template <typename ViewerMinimumTlsProtocolVersionT = Aws::String>
441 void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionT&& value) {
442 m_viewerMinimumTlsProtocolVersionHasBeenSet = true;
443 m_viewerMinimumTlsProtocolVersion = std::forward<ViewerMinimumTlsProtocolVersionT>(value);
444 }
445 template <typename ViewerMinimumTlsProtocolVersionT = Aws::String>
446 LightsailDistribution& WithViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionT&& value) {
447 SetViewerMinimumTlsProtocolVersion(std::forward<ViewerMinimumTlsProtocolVersionT>(value));
448 return *this;
449 }
451
453
458 inline const Aws::String& GetDefaultRootObject() const { return m_defaultRootObject; }
459 inline bool DefaultRootObjectHasBeenSet() const { return m_defaultRootObjectHasBeenSet; }
460 template <typename DefaultRootObjectT = Aws::String>
461 void SetDefaultRootObject(DefaultRootObjectT&& value) {
462 m_defaultRootObjectHasBeenSet = true;
463 m_defaultRootObject = std::forward<DefaultRootObjectT>(value);
464 }
465 template <typename DefaultRootObjectT = Aws::String>
466 LightsailDistribution& WithDefaultRootObject(DefaultRootObjectT&& value) {
467 SetDefaultRootObject(std::forward<DefaultRootObjectT>(value));
468 return *this;
469 }
471
473
477 inline const Aws::Vector<DistributionCustomErrorResponse>& GetCustomErrorResponses() const { return m_customErrorResponses; }
478 inline bool CustomErrorResponsesHasBeenSet() const { return m_customErrorResponsesHasBeenSet; }
479 template <typename CustomErrorResponsesT = Aws::Vector<DistributionCustomErrorResponse>>
480 void SetCustomErrorResponses(CustomErrorResponsesT&& value) {
481 m_customErrorResponsesHasBeenSet = true;
482 m_customErrorResponses = std::forward<CustomErrorResponsesT>(value);
483 }
484 template <typename CustomErrorResponsesT = Aws::Vector<DistributionCustomErrorResponse>>
485 LightsailDistribution& WithCustomErrorResponses(CustomErrorResponsesT&& value) {
486 SetCustomErrorResponses(std::forward<CustomErrorResponsesT>(value));
487 return *this;
488 }
489 template <typename CustomErrorResponsesT = DistributionCustomErrorResponse>
490 LightsailDistribution& AddCustomErrorResponses(CustomErrorResponsesT&& value) {
491 m_customErrorResponsesHasBeenSet = true;
492 m_customErrorResponses.emplace_back(std::forward<CustomErrorResponsesT>(value));
493 return *this;
494 }
496 private:
497 Aws::String m_name;
498
499 Aws::String m_arn;
500
501 Aws::String m_supportCode;
502
503 Aws::Utils::DateTime m_createdAt{};
504
505 ResourceLocation m_location;
506
507 ResourceType m_resourceType{ResourceType::NOT_SET};
508
509 Aws::Vector<Aws::String> m_alternativeDomainNames;
510
511 Aws::String m_status;
512
513 bool m_isEnabled{false};
514
515 Aws::String m_domainName;
516
517 Aws::String m_bundleId;
518
519 Aws::String m_certificateName;
520
521 Origin m_origin;
522
523 Aws::String m_originPublicDNS;
524
525 CacheBehavior m_defaultCacheBehavior;
526
527 CacheSettings m_cacheBehaviorSettings;
528
529 Aws::Vector<CacheBehaviorPerPath> m_cacheBehaviors;
530
531 bool m_ableToUpdateBundle{false};
532
533 IpAddressType m_ipAddressType{IpAddressType::NOT_SET};
534
535 Aws::Vector<Tag> m_tags;
536
537 Aws::String m_viewerMinimumTlsProtocolVersion;
538
539 Aws::String m_defaultRootObject;
540
542 bool m_nameHasBeenSet = false;
543 bool m_arnHasBeenSet = false;
544 bool m_supportCodeHasBeenSet = false;
545 bool m_createdAtHasBeenSet = false;
546 bool m_locationHasBeenSet = false;
547 bool m_resourceTypeHasBeenSet = false;
548 bool m_alternativeDomainNamesHasBeenSet = false;
549 bool m_statusHasBeenSet = false;
550 bool m_isEnabledHasBeenSet = false;
551 bool m_domainNameHasBeenSet = false;
552 bool m_bundleIdHasBeenSet = false;
553 bool m_certificateNameHasBeenSet = false;
554 bool m_originHasBeenSet = false;
555 bool m_originPublicDNSHasBeenSet = false;
556 bool m_defaultCacheBehaviorHasBeenSet = false;
557 bool m_cacheBehaviorSettingsHasBeenSet = false;
558 bool m_cacheBehaviorsHasBeenSet = false;
559 bool m_ableToUpdateBundleHasBeenSet = false;
560 bool m_ipAddressTypeHasBeenSet = false;
561 bool m_tagsHasBeenSet = false;
562 bool m_viewerMinimumTlsProtocolVersionHasBeenSet = false;
563 bool m_defaultRootObjectHasBeenSet = false;
564 bool m_customErrorResponsesHasBeenSet = false;
565};
566
567} // namespace Model
568} // namespace Lightsail
569} // namespace Aws
LightsailDistribution & WithDomainName(DomainNameT &&value)
void SetCustomErrorResponses(CustomErrorResponsesT &&value)
LightsailDistribution & WithIsEnabled(bool value)
LightsailDistribution & WithArn(ArnT &&value)
const Aws::String & GetViewerMinimumTlsProtocolVersion() const
LightsailDistribution & WithCreatedAt(CreatedAtT &&value)
void SetDefaultRootObject(DefaultRootObjectT &&value)
LightsailDistribution & WithOrigin(OriginT &&value)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LIGHTSAIL_API LightsailDistribution & operator=(Aws::Utils::Json::JsonView jsonValue)
LightsailDistribution & WithOriginPublicDNS(OriginPublicDNST &&value)
LightsailDistribution & AddCustomErrorResponses(CustomErrorResponsesT &&value)
LightsailDistribution & WithViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionT &&value)
const Aws::Vector< CacheBehaviorPerPath > & GetCacheBehaviors() const
LightsailDistribution & WithCacheBehaviors(CacheBehaviorsT &&value)
void SetViewerMinimumTlsProtocolVersion(ViewerMinimumTlsProtocolVersionT &&value)
LightsailDistribution & WithCustomErrorResponses(CustomErrorResponsesT &&value)
LightsailDistribution & WithCertificateName(CertificateNameT &&value)
LightsailDistribution & WithBundleId(BundleIdT &&value)
LightsailDistribution & AddTags(TagsT &&value)
LightsailDistribution & AddAlternativeDomainNames(AlternativeDomainNamesT &&value)
const Aws::Vector< DistributionCustomErrorResponse > & GetCustomErrorResponses() const
AWS_LIGHTSAIL_API LightsailDistribution()=default
LightsailDistribution & WithAlternativeDomainNames(AlternativeDomainNamesT &&value)
LightsailDistribution & WithTags(TagsT &&value)
void SetCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
const Aws::Utils::DateTime & GetCreatedAt() const
LightsailDistribution & WithIpAddressType(IpAddressType value)
AWS_LIGHTSAIL_API LightsailDistribution(Aws::Utils::Json::JsonView jsonValue)
LightsailDistribution & AddCacheBehaviors(CacheBehaviorsT &&value)
LightsailDistribution & WithDefaultRootObject(DefaultRootObjectT &&value)
const CacheBehavior & GetDefaultCacheBehavior() const
LightsailDistribution & WithName(NameT &&value)
LightsailDistribution & WithLocation(LocationT &&value)
LightsailDistribution & WithSupportCode(SupportCodeT &&value)
LightsailDistribution & WithStatus(StatusT &&value)
LightsailDistribution & WithAbleToUpdateBundle(bool value)
void SetAlternativeDomainNames(AlternativeDomainNamesT &&value)
void SetDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
LightsailDistribution & WithCacheBehaviorSettings(CacheBehaviorSettingsT &&value)
const CacheSettings & GetCacheBehaviorSettings() const
const Aws::Vector< Aws::String > & GetAlternativeDomainNames() const
LightsailDistribution & WithResourceType(ResourceType value)
LightsailDistribution & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue