AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
DistributionConfig.h
1
6#pragma once
7#include <aws/cloudfront/CloudFront_EXPORTS.h>
8#include <aws/cloudfront/model/Aliases.h>
9#include <aws/cloudfront/model/CacheBehaviors.h>
10#include <aws/cloudfront/model/ConnectionFunctionAssociation.h>
11#include <aws/cloudfront/model/ConnectionMode.h>
12#include <aws/cloudfront/model/CustomErrorResponses.h>
13#include <aws/cloudfront/model/DefaultCacheBehavior.h>
14#include <aws/cloudfront/model/HttpVersion.h>
15#include <aws/cloudfront/model/LoggingConfig.h>
16#include <aws/cloudfront/model/OriginGroups.h>
17#include <aws/cloudfront/model/Origins.h>
18#include <aws/cloudfront/model/PriceClass.h>
19#include <aws/cloudfront/model/Restrictions.h>
20#include <aws/cloudfront/model/TenantConfig.h>
21#include <aws/cloudfront/model/ViewerCertificate.h>
22#include <aws/cloudfront/model/ViewerMtlsConfig.h>
23#include <aws/core/utils/memory/stl/AWSString.h>
24
25#include <utility>
26
27namespace Aws {
28namespace Utils {
29namespace Xml {
30class XmlNode;
31} // namespace Xml
32} // namespace Utils
33namespace CloudFront {
34namespace Model {
35
42 public:
43 AWS_CLOUDFRONT_API DistributionConfig() = default;
44 AWS_CLOUDFRONT_API DistributionConfig(const Aws::Utils::Xml::XmlNode& xmlNode);
45 AWS_CLOUDFRONT_API DistributionConfig& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46
47 AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
48
50
58 inline const Aws::String& GetCallerReference() const { return m_callerReference; }
59 inline bool CallerReferenceHasBeenSet() const { return m_callerReferenceHasBeenSet; }
60 template <typename CallerReferenceT = Aws::String>
61 void SetCallerReference(CallerReferenceT&& value) {
62 m_callerReferenceHasBeenSet = true;
63 m_callerReference = std::forward<CallerReferenceT>(value);
64 }
65 template <typename CallerReferenceT = Aws::String>
66 DistributionConfig& WithCallerReference(CallerReferenceT&& value) {
67 SetCallerReference(std::forward<CallerReferenceT>(value));
68 return *this;
69 }
71
73
81 inline const Aliases& GetAliases() const { return m_aliases; }
82 inline bool AliasesHasBeenSet() const { return m_aliasesHasBeenSet; }
83 template <typename AliasesT = Aliases>
84 void SetAliases(AliasesT&& value) {
85 m_aliasesHasBeenSet = true;
86 m_aliases = std::forward<AliasesT>(value);
87 }
88 template <typename AliasesT = Aliases>
89 DistributionConfig& WithAliases(AliasesT&& value) {
90 SetAliases(std::forward<AliasesT>(value));
91 return *this;
92 }
94
96
118 inline const Aws::String& GetDefaultRootObject() const { return m_defaultRootObject; }
119 inline bool DefaultRootObjectHasBeenSet() const { return m_defaultRootObjectHasBeenSet; }
120 template <typename DefaultRootObjectT = Aws::String>
121 void SetDefaultRootObject(DefaultRootObjectT&& value) {
122 m_defaultRootObjectHasBeenSet = true;
123 m_defaultRootObject = std::forward<DefaultRootObjectT>(value);
124 }
125 template <typename DefaultRootObjectT = Aws::String>
126 DistributionConfig& WithDefaultRootObject(DefaultRootObjectT&& value) {
127 SetDefaultRootObject(std::forward<DefaultRootObjectT>(value));
128 return *this;
129 }
131
133
137 inline const Origins& GetOrigins() const { return m_origins; }
138 inline bool OriginsHasBeenSet() const { return m_originsHasBeenSet; }
139 template <typename OriginsT = Origins>
140 void SetOrigins(OriginsT&& value) {
141 m_originsHasBeenSet = true;
142 m_origins = std::forward<OriginsT>(value);
143 }
144 template <typename OriginsT = Origins>
145 DistributionConfig& WithOrigins(OriginsT&& value) {
146 SetOrigins(std::forward<OriginsT>(value));
147 return *this;
148 }
150
152
156 inline const OriginGroups& GetOriginGroups() const { return m_originGroups; }
157 inline bool OriginGroupsHasBeenSet() const { return m_originGroupsHasBeenSet; }
158 template <typename OriginGroupsT = OriginGroups>
159 void SetOriginGroups(OriginGroupsT&& value) {
160 m_originGroupsHasBeenSet = true;
161 m_originGroups = std::forward<OriginGroupsT>(value);
162 }
163 template <typename OriginGroupsT = OriginGroups>
164 DistributionConfig& WithOriginGroups(OriginGroupsT&& value) {
165 SetOriginGroups(std::forward<OriginGroupsT>(value));
166 return *this;
167 }
169
171
177 inline const DefaultCacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
178 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
179 template <typename DefaultCacheBehaviorT = DefaultCacheBehavior>
180 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
181 m_defaultCacheBehaviorHasBeenSet = true;
182 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
183 }
184 template <typename DefaultCacheBehaviorT = DefaultCacheBehavior>
185 DistributionConfig& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
186 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
187 return *this;
188 }
190
192
196 inline const CacheBehaviors& GetCacheBehaviors() const { return m_cacheBehaviors; }
197 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
198 template <typename CacheBehaviorsT = CacheBehaviors>
199 void SetCacheBehaviors(CacheBehaviorsT&& value) {
200 m_cacheBehaviorsHasBeenSet = true;
201 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
202 }
203 template <typename CacheBehaviorsT = CacheBehaviors>
204 DistributionConfig& WithCacheBehaviors(CacheBehaviorsT&& value) {
205 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
206 return *this;
207 }
209
211
220 inline const CustomErrorResponses& GetCustomErrorResponses() const { return m_customErrorResponses; }
221 inline bool CustomErrorResponsesHasBeenSet() const { return m_customErrorResponsesHasBeenSet; }
222 template <typename CustomErrorResponsesT = CustomErrorResponses>
223 void SetCustomErrorResponses(CustomErrorResponsesT&& value) {
224 m_customErrorResponsesHasBeenSet = true;
225 m_customErrorResponses = std::forward<CustomErrorResponsesT>(value);
226 }
227 template <typename CustomErrorResponsesT = CustomErrorResponses>
228 DistributionConfig& WithCustomErrorResponses(CustomErrorResponsesT&& value) {
229 SetCustomErrorResponses(std::forward<CustomErrorResponsesT>(value));
230 return *this;
231 }
233
235
239 inline const Aws::String& GetComment() const { return m_comment; }
240 inline bool CommentHasBeenSet() const { return m_commentHasBeenSet; }
241 template <typename CommentT = Aws::String>
242 void SetComment(CommentT&& value) {
243 m_commentHasBeenSet = true;
244 m_comment = std::forward<CommentT>(value);
245 }
246 template <typename CommentT = Aws::String>
247 DistributionConfig& WithComment(CommentT&& value) {
248 SetComment(std::forward<CommentT>(value));
249 return *this;
250 }
252
254
260 inline const LoggingConfig& GetLogging() const { return m_logging; }
261 inline bool LoggingHasBeenSet() const { return m_loggingHasBeenSet; }
262 template <typename LoggingT = LoggingConfig>
263 void SetLogging(LoggingT&& value) {
264 m_loggingHasBeenSet = true;
265 m_logging = std::forward<LoggingT>(value);
266 }
267 template <typename LoggingT = LoggingConfig>
268 DistributionConfig& WithLogging(LoggingT&& value) {
269 SetLogging(std::forward<LoggingT>(value));
270 return *this;
271 }
273
275
296 inline PriceClass GetPriceClass() const { return m_priceClass; }
297 inline bool PriceClassHasBeenSet() const { return m_priceClassHasBeenSet; }
298 inline void SetPriceClass(PriceClass value) {
299 m_priceClassHasBeenSet = true;
300 m_priceClass = value;
301 }
303 SetPriceClass(value);
304 return *this;
305 }
307
309
312 inline bool GetEnabled() const { return m_enabled; }
313 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
314 inline void SetEnabled(bool value) {
315 m_enabledHasBeenSet = true;
316 m_enabled = value;
317 }
318 inline DistributionConfig& WithEnabled(bool value) {
319 SetEnabled(value);
320 return *this;
321 }
323
325
329 inline const ViewerCertificate& GetViewerCertificate() const { return m_viewerCertificate; }
330 inline bool ViewerCertificateHasBeenSet() const { return m_viewerCertificateHasBeenSet; }
331 template <typename ViewerCertificateT = ViewerCertificate>
332 void SetViewerCertificate(ViewerCertificateT&& value) {
333 m_viewerCertificateHasBeenSet = true;
334 m_viewerCertificate = std::forward<ViewerCertificateT>(value);
335 }
336 template <typename ViewerCertificateT = ViewerCertificate>
337 DistributionConfig& WithViewerCertificate(ViewerCertificateT&& value) {
338 SetViewerCertificate(std::forward<ViewerCertificateT>(value));
339 return *this;
340 }
342
344
348 inline const Restrictions& GetRestrictions() const { return m_restrictions; }
349 inline bool RestrictionsHasBeenSet() const { return m_restrictionsHasBeenSet; }
350 template <typename RestrictionsT = Restrictions>
351 void SetRestrictions(RestrictionsT&& value) {
352 m_restrictionsHasBeenSet = true;
353 m_restrictions = std::forward<RestrictionsT>(value);
354 }
355 template <typename RestrictionsT = Restrictions>
356 DistributionConfig& WithRestrictions(RestrictionsT&& value) {
357 SetRestrictions(std::forward<RestrictionsT>(value));
358 return *this;
359 }
361
363
381 inline const Aws::String& GetWebACLId() const { return m_webACLId; }
382 inline bool WebACLIdHasBeenSet() const { return m_webACLIdHasBeenSet; }
383 template <typename WebACLIdT = Aws::String>
384 void SetWebACLId(WebACLIdT&& value) {
385 m_webACLIdHasBeenSet = true;
386 m_webACLId = std::forward<WebACLIdT>(value);
387 }
388 template <typename WebACLIdT = Aws::String>
389 DistributionConfig& WithWebACLId(WebACLIdT&& value) {
390 SetWebACLId(std::forward<WebACLIdT>(value));
391 return *this;
392 }
394
396
412 inline HttpVersion GetHttpVersion() const { return m_httpVersion; }
413 inline bool HttpVersionHasBeenSet() const { return m_httpVersionHasBeenSet; }
414 inline void SetHttpVersion(HttpVersion value) {
415 m_httpVersionHasBeenSet = true;
416 m_httpVersion = value;
417 }
419 SetHttpVersion(value);
420 return *this;
421 }
423
425
458 inline bool GetIsIPV6Enabled() const { return m_isIPV6Enabled; }
459 inline bool IsIPV6EnabledHasBeenSet() const { return m_isIPV6EnabledHasBeenSet; }
460 inline void SetIsIPV6Enabled(bool value) {
461 m_isIPV6EnabledHasBeenSet = true;
462 m_isIPV6Enabled = value;
463 }
465 SetIsIPV6Enabled(value);
466 return *this;
467 }
469
471
480 inline const Aws::String& GetContinuousDeploymentPolicyId() const { return m_continuousDeploymentPolicyId; }
481 inline bool ContinuousDeploymentPolicyIdHasBeenSet() const { return m_continuousDeploymentPolicyIdHasBeenSet; }
482 template <typename ContinuousDeploymentPolicyIdT = Aws::String>
483 void SetContinuousDeploymentPolicyId(ContinuousDeploymentPolicyIdT&& value) {
484 m_continuousDeploymentPolicyIdHasBeenSet = true;
485 m_continuousDeploymentPolicyId = std::forward<ContinuousDeploymentPolicyIdT>(value);
486 }
487 template <typename ContinuousDeploymentPolicyIdT = Aws::String>
488 DistributionConfig& WithContinuousDeploymentPolicyId(ContinuousDeploymentPolicyIdT&& value) {
489 SetContinuousDeploymentPolicyId(std::forward<ContinuousDeploymentPolicyIdT>(value));
490 return *this;
491 }
493
495
505 inline bool GetStaging() const { return m_staging; }
506 inline bool StagingHasBeenSet() const { return m_stagingHasBeenSet; }
507 inline void SetStaging(bool value) {
508 m_stagingHasBeenSet = true;
509 m_staging = value;
510 }
511 inline DistributionConfig& WithStaging(bool value) {
512 SetStaging(value);
513 return *this;
514 }
516
518
525 inline const Aws::String& GetAnycastIpListId() const { return m_anycastIpListId; }
526 inline bool AnycastIpListIdHasBeenSet() const { return m_anycastIpListIdHasBeenSet; }
527 template <typename AnycastIpListIdT = Aws::String>
528 void SetAnycastIpListId(AnycastIpListIdT&& value) {
529 m_anycastIpListIdHasBeenSet = true;
530 m_anycastIpListId = std::forward<AnycastIpListIdT>(value);
531 }
532 template <typename AnycastIpListIdT = Aws::String>
533 DistributionConfig& WithAnycastIpListId(AnycastIpListIdT&& value) {
534 SetAnycastIpListId(std::forward<AnycastIpListIdT>(value));
535 return *this;
536 }
538
540
547 inline const TenantConfig& GetTenantConfig() const { return m_tenantConfig; }
548 inline bool TenantConfigHasBeenSet() const { return m_tenantConfigHasBeenSet; }
549 template <typename TenantConfigT = TenantConfig>
550 void SetTenantConfig(TenantConfigT&& value) {
551 m_tenantConfigHasBeenSet = true;
552 m_tenantConfig = std::forward<TenantConfigT>(value);
553 }
554 template <typename TenantConfigT = TenantConfig>
555 DistributionConfig& WithTenantConfig(TenantConfigT&& value) {
556 SetTenantConfig(std::forward<TenantConfigT>(value));
557 return *this;
558 }
560
562
567 inline ConnectionMode GetConnectionMode() const { return m_connectionMode; }
568 inline bool ConnectionModeHasBeenSet() const { return m_connectionModeHasBeenSet; }
570 m_connectionModeHasBeenSet = true;
571 m_connectionMode = value;
572 }
574 SetConnectionMode(value);
575 return *this;
576 }
578
580
583 inline const ViewerMtlsConfig& GetViewerMtlsConfig() const { return m_viewerMtlsConfig; }
584 inline bool ViewerMtlsConfigHasBeenSet() const { return m_viewerMtlsConfigHasBeenSet; }
585 template <typename ViewerMtlsConfigT = ViewerMtlsConfig>
586 void SetViewerMtlsConfig(ViewerMtlsConfigT&& value) {
587 m_viewerMtlsConfigHasBeenSet = true;
588 m_viewerMtlsConfig = std::forward<ViewerMtlsConfigT>(value);
589 }
590 template <typename ViewerMtlsConfigT = ViewerMtlsConfig>
591 DistributionConfig& WithViewerMtlsConfig(ViewerMtlsConfigT&& value) {
592 SetViewerMtlsConfig(std::forward<ViewerMtlsConfigT>(value));
593 return *this;
594 }
596
598
601 inline const ConnectionFunctionAssociation& GetConnectionFunctionAssociation() const { return m_connectionFunctionAssociation; }
602 inline bool ConnectionFunctionAssociationHasBeenSet() const { return m_connectionFunctionAssociationHasBeenSet; }
603 template <typename ConnectionFunctionAssociationT = ConnectionFunctionAssociation>
604 void SetConnectionFunctionAssociation(ConnectionFunctionAssociationT&& value) {
605 m_connectionFunctionAssociationHasBeenSet = true;
606 m_connectionFunctionAssociation = std::forward<ConnectionFunctionAssociationT>(value);
607 }
608 template <typename ConnectionFunctionAssociationT = ConnectionFunctionAssociation>
609 DistributionConfig& WithConnectionFunctionAssociation(ConnectionFunctionAssociationT&& value) {
610 SetConnectionFunctionAssociation(std::forward<ConnectionFunctionAssociationT>(value));
611 return *this;
612 }
614 private:
615 Aws::String m_callerReference;
616
617 Aliases m_aliases;
618
619 Aws::String m_defaultRootObject;
620
621 Origins m_origins;
622
623 OriginGroups m_originGroups;
624
625 DefaultCacheBehavior m_defaultCacheBehavior;
626
627 CacheBehaviors m_cacheBehaviors;
628
629 CustomErrorResponses m_customErrorResponses;
630
631 Aws::String m_comment;
632
633 LoggingConfig m_logging;
634
635 PriceClass m_priceClass{PriceClass::NOT_SET};
636
637 bool m_enabled{false};
638
639 ViewerCertificate m_viewerCertificate;
640
641 Restrictions m_restrictions;
642
643 Aws::String m_webACLId;
644
645 HttpVersion m_httpVersion{HttpVersion::NOT_SET};
646
647 bool m_isIPV6Enabled{false};
648
649 Aws::String m_continuousDeploymentPolicyId;
650
651 bool m_staging{false};
652
653 Aws::String m_anycastIpListId;
654
655 TenantConfig m_tenantConfig;
656
657 ConnectionMode m_connectionMode{ConnectionMode::NOT_SET};
658
659 ViewerMtlsConfig m_viewerMtlsConfig;
660
661 ConnectionFunctionAssociation m_connectionFunctionAssociation;
662 bool m_callerReferenceHasBeenSet = false;
663 bool m_aliasesHasBeenSet = false;
664 bool m_defaultRootObjectHasBeenSet = false;
665 bool m_originsHasBeenSet = false;
666 bool m_originGroupsHasBeenSet = false;
667 bool m_defaultCacheBehaviorHasBeenSet = false;
668 bool m_cacheBehaviorsHasBeenSet = false;
669 bool m_customErrorResponsesHasBeenSet = false;
670 bool m_commentHasBeenSet = false;
671 bool m_loggingHasBeenSet = false;
672 bool m_priceClassHasBeenSet = false;
673 bool m_enabledHasBeenSet = false;
674 bool m_viewerCertificateHasBeenSet = false;
675 bool m_restrictionsHasBeenSet = false;
676 bool m_webACLIdHasBeenSet = false;
677 bool m_httpVersionHasBeenSet = false;
678 bool m_isIPV6EnabledHasBeenSet = false;
679 bool m_continuousDeploymentPolicyIdHasBeenSet = false;
680 bool m_stagingHasBeenSet = false;
681 bool m_anycastIpListIdHasBeenSet = false;
682 bool m_tenantConfigHasBeenSet = false;
683 bool m_connectionModeHasBeenSet = false;
684 bool m_viewerMtlsConfigHasBeenSet = false;
685 bool m_connectionFunctionAssociationHasBeenSet = false;
686};
687
688} // namespace Model
689} // namespace CloudFront
690} // namespace Aws
void SetDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
const ConnectionFunctionAssociation & GetConnectionFunctionAssociation() const
const Aws::String & GetDefaultRootObject() const
void SetConnectionFunctionAssociation(ConnectionFunctionAssociationT &&value)
void SetCallerReference(CallerReferenceT &&value)
DistributionConfig & WithCustomErrorResponses(CustomErrorResponsesT &&value)
DistributionConfig & WithStaging(bool value)
DistributionConfig & WithHttpVersion(HttpVersion value)
DistributionConfig & WithViewerMtlsConfig(ViewerMtlsConfigT &&value)
void SetViewerCertificate(ViewerCertificateT &&value)
DistributionConfig & WithIsIPV6Enabled(bool value)
AWS_CLOUDFRONT_API DistributionConfig & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
void SetViewerMtlsConfig(ViewerMtlsConfigT &&value)
const ViewerCertificate & GetViewerCertificate() const
DistributionConfig & WithDefaultCacheBehavior(DefaultCacheBehaviorT &&value)
DistributionConfig & WithConnectionMode(ConnectionMode value)
AWS_CLOUDFRONT_API DistributionConfig()=default
void SetCustomErrorResponses(CustomErrorResponsesT &&value)
DistributionConfig & WithCallerReference(CallerReferenceT &&value)
DistributionConfig & WithAliases(AliasesT &&value)
DistributionConfig & WithRestrictions(RestrictionsT &&value)
void SetCacheBehaviors(CacheBehaviorsT &&value)
const CustomErrorResponses & GetCustomErrorResponses() const
DistributionConfig & WithComment(CommentT &&value)
void SetContinuousDeploymentPolicyId(ContinuousDeploymentPolicyIdT &&value)
DistributionConfig & WithConnectionFunctionAssociation(ConnectionFunctionAssociationT &&value)
DistributionConfig & WithWebACLId(WebACLIdT &&value)
AWS_CLOUDFRONT_API DistributionConfig(const Aws::Utils::Xml::XmlNode &xmlNode)
DistributionConfig & WithContinuousDeploymentPolicyId(ContinuousDeploymentPolicyIdT &&value)
DistributionConfig & WithEnabled(bool value)
const DefaultCacheBehavior & GetDefaultCacheBehavior() const
DistributionConfig & WithViewerCertificate(ViewerCertificateT &&value)
const CacheBehaviors & GetCacheBehaviors() const
DistributionConfig & WithLogging(LoggingT &&value)
DistributionConfig & WithOrigins(OriginsT &&value)
const Aws::String & GetContinuousDeploymentPolicyId() const
const Aws::String & GetCallerReference() const
DistributionConfig & WithCacheBehaviors(CacheBehaviorsT &&value)
void SetAnycastIpListId(AnycastIpListIdT &&value)
DistributionConfig & WithTenantConfig(TenantConfigT &&value)
AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
DistributionConfig & WithOriginGroups(OriginGroupsT &&value)
void SetDefaultRootObject(DefaultRootObjectT &&value)
const ViewerMtlsConfig & GetViewerMtlsConfig() const
DistributionConfig & WithAnycastIpListId(AnycastIpListIdT &&value)
DistributionConfig & WithPriceClass(PriceClass value)
DistributionConfig & WithDefaultRootObject(DefaultRootObjectT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String