AWS SDK for C++

AWS SDK for C++ Version 1.11.800

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/CacheTagConfig.h>
11#include <aws/cloudfront/model/ConnectionFunctionAssociation.h>
12#include <aws/cloudfront/model/ConnectionMode.h>
13#include <aws/cloudfront/model/CustomErrorResponses.h>
14#include <aws/cloudfront/model/DefaultCacheBehavior.h>
15#include <aws/cloudfront/model/HttpVersion.h>
16#include <aws/cloudfront/model/LoggingConfig.h>
17#include <aws/cloudfront/model/OriginGroups.h>
18#include <aws/cloudfront/model/Origins.h>
19#include <aws/cloudfront/model/PriceClass.h>
20#include <aws/cloudfront/model/Restrictions.h>
21#include <aws/cloudfront/model/TenantConfig.h>
22#include <aws/cloudfront/model/ViewerCertificate.h>
23#include <aws/cloudfront/model/ViewerMtlsConfig.h>
24#include <aws/core/utils/memory/stl/AWSString.h>
25
26#include <utility>
27
28namespace Aws {
29namespace Utils {
30namespace Xml {
31class XmlNode;
32} // namespace Xml
33} // namespace Utils
34namespace CloudFront {
35namespace Model {
36
43 public:
44 AWS_CLOUDFRONT_API DistributionConfig() = default;
45 AWS_CLOUDFRONT_API DistributionConfig(const Aws::Utils::Xml::XmlNode& xmlNode);
46 AWS_CLOUDFRONT_API DistributionConfig& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
47
48 AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
49
51
59 inline const Aws::String& GetCallerReference() const { return m_callerReference; }
60 inline bool CallerReferenceHasBeenSet() const { return m_callerReferenceHasBeenSet; }
61 template <typename CallerReferenceT = Aws::String>
62 void SetCallerReference(CallerReferenceT&& value) {
63 m_callerReferenceHasBeenSet = true;
64 m_callerReference = std::forward<CallerReferenceT>(value);
65 }
66 template <typename CallerReferenceT = Aws::String>
67 DistributionConfig& WithCallerReference(CallerReferenceT&& value) {
68 SetCallerReference(std::forward<CallerReferenceT>(value));
69 return *this;
70 }
72
74
82 inline const Aliases& GetAliases() const { return m_aliases; }
83 inline bool AliasesHasBeenSet() const { return m_aliasesHasBeenSet; }
84 template <typename AliasesT = Aliases>
85 void SetAliases(AliasesT&& value) {
86 m_aliasesHasBeenSet = true;
87 m_aliases = std::forward<AliasesT>(value);
88 }
89 template <typename AliasesT = Aliases>
90 DistributionConfig& WithAliases(AliasesT&& value) {
91 SetAliases(std::forward<AliasesT>(value));
92 return *this;
93 }
95
97
119 inline const Aws::String& GetDefaultRootObject() const { return m_defaultRootObject; }
120 inline bool DefaultRootObjectHasBeenSet() const { return m_defaultRootObjectHasBeenSet; }
121 template <typename DefaultRootObjectT = Aws::String>
122 void SetDefaultRootObject(DefaultRootObjectT&& value) {
123 m_defaultRootObjectHasBeenSet = true;
124 m_defaultRootObject = std::forward<DefaultRootObjectT>(value);
125 }
126 template <typename DefaultRootObjectT = Aws::String>
127 DistributionConfig& WithDefaultRootObject(DefaultRootObjectT&& value) {
128 SetDefaultRootObject(std::forward<DefaultRootObjectT>(value));
129 return *this;
130 }
132
134
138 inline const Origins& GetOrigins() const { return m_origins; }
139 inline bool OriginsHasBeenSet() const { return m_originsHasBeenSet; }
140 template <typename OriginsT = Origins>
141 void SetOrigins(OriginsT&& value) {
142 m_originsHasBeenSet = true;
143 m_origins = std::forward<OriginsT>(value);
144 }
145 template <typename OriginsT = Origins>
146 DistributionConfig& WithOrigins(OriginsT&& value) {
147 SetOrigins(std::forward<OriginsT>(value));
148 return *this;
149 }
151
153
157 inline const OriginGroups& GetOriginGroups() const { return m_originGroups; }
158 inline bool OriginGroupsHasBeenSet() const { return m_originGroupsHasBeenSet; }
159 template <typename OriginGroupsT = OriginGroups>
160 void SetOriginGroups(OriginGroupsT&& value) {
161 m_originGroupsHasBeenSet = true;
162 m_originGroups = std::forward<OriginGroupsT>(value);
163 }
164 template <typename OriginGroupsT = OriginGroups>
165 DistributionConfig& WithOriginGroups(OriginGroupsT&& value) {
166 SetOriginGroups(std::forward<OriginGroupsT>(value));
167 return *this;
168 }
170
172
178 inline const DefaultCacheBehavior& GetDefaultCacheBehavior() const { return m_defaultCacheBehavior; }
179 inline bool DefaultCacheBehaviorHasBeenSet() const { return m_defaultCacheBehaviorHasBeenSet; }
180 template <typename DefaultCacheBehaviorT = DefaultCacheBehavior>
181 void SetDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
182 m_defaultCacheBehaviorHasBeenSet = true;
183 m_defaultCacheBehavior = std::forward<DefaultCacheBehaviorT>(value);
184 }
185 template <typename DefaultCacheBehaviorT = DefaultCacheBehavior>
186 DistributionConfig& WithDefaultCacheBehavior(DefaultCacheBehaviorT&& value) {
187 SetDefaultCacheBehavior(std::forward<DefaultCacheBehaviorT>(value));
188 return *this;
189 }
191
193
197 inline const CacheBehaviors& GetCacheBehaviors() const { return m_cacheBehaviors; }
198 inline bool CacheBehaviorsHasBeenSet() const { return m_cacheBehaviorsHasBeenSet; }
199 template <typename CacheBehaviorsT = CacheBehaviors>
200 void SetCacheBehaviors(CacheBehaviorsT&& value) {
201 m_cacheBehaviorsHasBeenSet = true;
202 m_cacheBehaviors = std::forward<CacheBehaviorsT>(value);
203 }
204 template <typename CacheBehaviorsT = CacheBehaviors>
205 DistributionConfig& WithCacheBehaviors(CacheBehaviorsT&& value) {
206 SetCacheBehaviors(std::forward<CacheBehaviorsT>(value));
207 return *this;
208 }
210
212
221 inline const CustomErrorResponses& GetCustomErrorResponses() const { return m_customErrorResponses; }
222 inline bool CustomErrorResponsesHasBeenSet() const { return m_customErrorResponsesHasBeenSet; }
223 template <typename CustomErrorResponsesT = CustomErrorResponses>
224 void SetCustomErrorResponses(CustomErrorResponsesT&& value) {
225 m_customErrorResponsesHasBeenSet = true;
226 m_customErrorResponses = std::forward<CustomErrorResponsesT>(value);
227 }
228 template <typename CustomErrorResponsesT = CustomErrorResponses>
229 DistributionConfig& WithCustomErrorResponses(CustomErrorResponsesT&& value) {
230 SetCustomErrorResponses(std::forward<CustomErrorResponsesT>(value));
231 return *this;
232 }
234
236
240 inline const Aws::String& GetComment() const { return m_comment; }
241 inline bool CommentHasBeenSet() const { return m_commentHasBeenSet; }
242 template <typename CommentT = Aws::String>
243 void SetComment(CommentT&& value) {
244 m_commentHasBeenSet = true;
245 m_comment = std::forward<CommentT>(value);
246 }
247 template <typename CommentT = Aws::String>
248 DistributionConfig& WithComment(CommentT&& value) {
249 SetComment(std::forward<CommentT>(value));
250 return *this;
251 }
253
255
261 inline const LoggingConfig& GetLogging() const { return m_logging; }
262 inline bool LoggingHasBeenSet() const { return m_loggingHasBeenSet; }
263 template <typename LoggingT = LoggingConfig>
264 void SetLogging(LoggingT&& value) {
265 m_loggingHasBeenSet = true;
266 m_logging = std::forward<LoggingT>(value);
267 }
268 template <typename LoggingT = LoggingConfig>
269 DistributionConfig& WithLogging(LoggingT&& value) {
270 SetLogging(std::forward<LoggingT>(value));
271 return *this;
272 }
274
276
297 inline PriceClass GetPriceClass() const { return m_priceClass; }
298 inline bool PriceClassHasBeenSet() const { return m_priceClassHasBeenSet; }
299 inline void SetPriceClass(PriceClass value) {
300 m_priceClassHasBeenSet = true;
301 m_priceClass = value;
302 }
304 SetPriceClass(value);
305 return *this;
306 }
308
310
313 inline bool GetEnabled() const { return m_enabled; }
314 inline bool EnabledHasBeenSet() const { return m_enabledHasBeenSet; }
315 inline void SetEnabled(bool value) {
316 m_enabledHasBeenSet = true;
317 m_enabled = value;
318 }
319 inline DistributionConfig& WithEnabled(bool value) {
320 SetEnabled(value);
321 return *this;
322 }
324
326
330 inline const ViewerCertificate& GetViewerCertificate() const { return m_viewerCertificate; }
331 inline bool ViewerCertificateHasBeenSet() const { return m_viewerCertificateHasBeenSet; }
332 template <typename ViewerCertificateT = ViewerCertificate>
333 void SetViewerCertificate(ViewerCertificateT&& value) {
334 m_viewerCertificateHasBeenSet = true;
335 m_viewerCertificate = std::forward<ViewerCertificateT>(value);
336 }
337 template <typename ViewerCertificateT = ViewerCertificate>
338 DistributionConfig& WithViewerCertificate(ViewerCertificateT&& value) {
339 SetViewerCertificate(std::forward<ViewerCertificateT>(value));
340 return *this;
341 }
343
345
349 inline const Restrictions& GetRestrictions() const { return m_restrictions; }
350 inline bool RestrictionsHasBeenSet() const { return m_restrictionsHasBeenSet; }
351 template <typename RestrictionsT = Restrictions>
352 void SetRestrictions(RestrictionsT&& value) {
353 m_restrictionsHasBeenSet = true;
354 m_restrictions = std::forward<RestrictionsT>(value);
355 }
356 template <typename RestrictionsT = Restrictions>
357 DistributionConfig& WithRestrictions(RestrictionsT&& value) {
358 SetRestrictions(std::forward<RestrictionsT>(value));
359 return *this;
360 }
362
364
382 inline const Aws::String& GetWebACLId() const { return m_webACLId; }
383 inline bool WebACLIdHasBeenSet() const { return m_webACLIdHasBeenSet; }
384 template <typename WebACLIdT = Aws::String>
385 void SetWebACLId(WebACLIdT&& value) {
386 m_webACLIdHasBeenSet = true;
387 m_webACLId = std::forward<WebACLIdT>(value);
388 }
389 template <typename WebACLIdT = Aws::String>
390 DistributionConfig& WithWebACLId(WebACLIdT&& value) {
391 SetWebACLId(std::forward<WebACLIdT>(value));
392 return *this;
393 }
395
397
413 inline HttpVersion GetHttpVersion() const { return m_httpVersion; }
414 inline bool HttpVersionHasBeenSet() const { return m_httpVersionHasBeenSet; }
415 inline void SetHttpVersion(HttpVersion value) {
416 m_httpVersionHasBeenSet = true;
417 m_httpVersion = value;
418 }
420 SetHttpVersion(value);
421 return *this;
422 }
424
426
459 inline bool GetIsIPV6Enabled() const { return m_isIPV6Enabled; }
460 inline bool IsIPV6EnabledHasBeenSet() const { return m_isIPV6EnabledHasBeenSet; }
461 inline void SetIsIPV6Enabled(bool value) {
462 m_isIPV6EnabledHasBeenSet = true;
463 m_isIPV6Enabled = value;
464 }
466 SetIsIPV6Enabled(value);
467 return *this;
468 }
470
472
481 inline const Aws::String& GetContinuousDeploymentPolicyId() const { return m_continuousDeploymentPolicyId; }
482 inline bool ContinuousDeploymentPolicyIdHasBeenSet() const { return m_continuousDeploymentPolicyIdHasBeenSet; }
483 template <typename ContinuousDeploymentPolicyIdT = Aws::String>
484 void SetContinuousDeploymentPolicyId(ContinuousDeploymentPolicyIdT&& value) {
485 m_continuousDeploymentPolicyIdHasBeenSet = true;
486 m_continuousDeploymentPolicyId = std::forward<ContinuousDeploymentPolicyIdT>(value);
487 }
488 template <typename ContinuousDeploymentPolicyIdT = Aws::String>
489 DistributionConfig& WithContinuousDeploymentPolicyId(ContinuousDeploymentPolicyIdT&& value) {
490 SetContinuousDeploymentPolicyId(std::forward<ContinuousDeploymentPolicyIdT>(value));
491 return *this;
492 }
494
496
506 inline bool GetStaging() const { return m_staging; }
507 inline bool StagingHasBeenSet() const { return m_stagingHasBeenSet; }
508 inline void SetStaging(bool value) {
509 m_stagingHasBeenSet = true;
510 m_staging = value;
511 }
512 inline DistributionConfig& WithStaging(bool value) {
513 SetStaging(value);
514 return *this;
515 }
517
519
526 inline const Aws::String& GetAnycastIpListId() const { return m_anycastIpListId; }
527 inline bool AnycastIpListIdHasBeenSet() const { return m_anycastIpListIdHasBeenSet; }
528 template <typename AnycastIpListIdT = Aws::String>
529 void SetAnycastIpListId(AnycastIpListIdT&& value) {
530 m_anycastIpListIdHasBeenSet = true;
531 m_anycastIpListId = std::forward<AnycastIpListIdT>(value);
532 }
533 template <typename AnycastIpListIdT = Aws::String>
534 DistributionConfig& WithAnycastIpListId(AnycastIpListIdT&& value) {
535 SetAnycastIpListId(std::forward<AnycastIpListIdT>(value));
536 return *this;
537 }
539
541
548 inline const TenantConfig& GetTenantConfig() const { return m_tenantConfig; }
549 inline bool TenantConfigHasBeenSet() const { return m_tenantConfigHasBeenSet; }
550 template <typename TenantConfigT = TenantConfig>
551 void SetTenantConfig(TenantConfigT&& value) {
552 m_tenantConfigHasBeenSet = true;
553 m_tenantConfig = std::forward<TenantConfigT>(value);
554 }
555 template <typename TenantConfigT = TenantConfig>
556 DistributionConfig& WithTenantConfig(TenantConfigT&& value) {
557 SetTenantConfig(std::forward<TenantConfigT>(value));
558 return *this;
559 }
561
563
568 inline ConnectionMode GetConnectionMode() const { return m_connectionMode; }
569 inline bool ConnectionModeHasBeenSet() const { return m_connectionModeHasBeenSet; }
571 m_connectionModeHasBeenSet = true;
572 m_connectionMode = value;
573 }
575 SetConnectionMode(value);
576 return *this;
577 }
579
581
584 inline const ViewerMtlsConfig& GetViewerMtlsConfig() const { return m_viewerMtlsConfig; }
585 inline bool ViewerMtlsConfigHasBeenSet() const { return m_viewerMtlsConfigHasBeenSet; }
586 template <typename ViewerMtlsConfigT = ViewerMtlsConfig>
587 void SetViewerMtlsConfig(ViewerMtlsConfigT&& value) {
588 m_viewerMtlsConfigHasBeenSet = true;
589 m_viewerMtlsConfig = std::forward<ViewerMtlsConfigT>(value);
590 }
591 template <typename ViewerMtlsConfigT = ViewerMtlsConfig>
592 DistributionConfig& WithViewerMtlsConfig(ViewerMtlsConfigT&& value) {
593 SetViewerMtlsConfig(std::forward<ViewerMtlsConfigT>(value));
594 return *this;
595 }
597
599
602 inline const ConnectionFunctionAssociation& GetConnectionFunctionAssociation() const { return m_connectionFunctionAssociation; }
603 inline bool ConnectionFunctionAssociationHasBeenSet() const { return m_connectionFunctionAssociationHasBeenSet; }
604 template <typename ConnectionFunctionAssociationT = ConnectionFunctionAssociation>
605 void SetConnectionFunctionAssociation(ConnectionFunctionAssociationT&& value) {
606 m_connectionFunctionAssociationHasBeenSet = true;
607 m_connectionFunctionAssociation = std::forward<ConnectionFunctionAssociationT>(value);
608 }
609 template <typename ConnectionFunctionAssociationT = ConnectionFunctionAssociation>
610 DistributionConfig& WithConnectionFunctionAssociation(ConnectionFunctionAssociationT&& value) {
611 SetConnectionFunctionAssociation(std::forward<ConnectionFunctionAssociationT>(value));
612 return *this;
613 }
615
617
630 inline const CacheTagConfig& GetCacheTagConfig() const { return m_cacheTagConfig; }
631 inline bool CacheTagConfigHasBeenSet() const { return m_cacheTagConfigHasBeenSet; }
632 template <typename CacheTagConfigT = CacheTagConfig>
633 void SetCacheTagConfig(CacheTagConfigT&& value) {
634 m_cacheTagConfigHasBeenSet = true;
635 m_cacheTagConfig = std::forward<CacheTagConfigT>(value);
636 }
637 template <typename CacheTagConfigT = CacheTagConfig>
638 DistributionConfig& WithCacheTagConfig(CacheTagConfigT&& value) {
639 SetCacheTagConfig(std::forward<CacheTagConfigT>(value));
640 return *this;
641 }
643 private:
644 Aws::String m_callerReference;
645
646 Aliases m_aliases;
647
648 Aws::String m_defaultRootObject;
649
650 Origins m_origins;
651
652 OriginGroups m_originGroups;
653
654 DefaultCacheBehavior m_defaultCacheBehavior;
655
656 CacheBehaviors m_cacheBehaviors;
657
658 CustomErrorResponses m_customErrorResponses;
659
660 Aws::String m_comment;
661
662 LoggingConfig m_logging;
663
664 PriceClass m_priceClass{PriceClass::NOT_SET};
665
666 bool m_enabled{false};
667
668 ViewerCertificate m_viewerCertificate;
669
670 Restrictions m_restrictions;
671
672 Aws::String m_webACLId;
673
674 HttpVersion m_httpVersion{HttpVersion::NOT_SET};
675
676 bool m_isIPV6Enabled{false};
677
678 Aws::String m_continuousDeploymentPolicyId;
679
680 bool m_staging{false};
681
682 Aws::String m_anycastIpListId;
683
684 TenantConfig m_tenantConfig;
685
686 ConnectionMode m_connectionMode{ConnectionMode::NOT_SET};
687
688 ViewerMtlsConfig m_viewerMtlsConfig;
689
690 ConnectionFunctionAssociation m_connectionFunctionAssociation;
691
692 CacheTagConfig m_cacheTagConfig;
693 bool m_callerReferenceHasBeenSet = false;
694 bool m_aliasesHasBeenSet = false;
695 bool m_defaultRootObjectHasBeenSet = false;
696 bool m_originsHasBeenSet = false;
697 bool m_originGroupsHasBeenSet = false;
698 bool m_defaultCacheBehaviorHasBeenSet = false;
699 bool m_cacheBehaviorsHasBeenSet = false;
700 bool m_customErrorResponsesHasBeenSet = false;
701 bool m_commentHasBeenSet = false;
702 bool m_loggingHasBeenSet = false;
703 bool m_priceClassHasBeenSet = false;
704 bool m_enabledHasBeenSet = false;
705 bool m_viewerCertificateHasBeenSet = false;
706 bool m_restrictionsHasBeenSet = false;
707 bool m_webACLIdHasBeenSet = false;
708 bool m_httpVersionHasBeenSet = false;
709 bool m_isIPV6EnabledHasBeenSet = false;
710 bool m_continuousDeploymentPolicyIdHasBeenSet = false;
711 bool m_stagingHasBeenSet = false;
712 bool m_anycastIpListIdHasBeenSet = false;
713 bool m_tenantConfigHasBeenSet = false;
714 bool m_connectionModeHasBeenSet = false;
715 bool m_viewerMtlsConfigHasBeenSet = false;
716 bool m_connectionFunctionAssociationHasBeenSet = false;
717 bool m_cacheTagConfigHasBeenSet = false;
718};
719
720} // namespace Model
721} // namespace CloudFront
722} // 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)
const CacheTagConfig & GetCacheTagConfig() const
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)
DistributionConfig & WithCacheTagConfig(CacheTagConfigT &&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)
void SetCacheTagConfig(CacheTagConfigT &&value)
DistributionConfig & WithPriceClass(PriceClass value)
DistributionConfig & WithDefaultRootObject(DefaultRootObjectT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String