AWS SDK for C++  0.14.3
AWS SDK for C++
DistributionConfig.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
27 
28 namespace Aws
29 {
30 namespace Utils
31 {
32 namespace Xml
33 {
34  class XmlNode;
35 } // namespace Xml
36 } // namespace Utils
37 namespace CloudFront
38 {
39 namespace Model
40 {
41 
46  {
47  public:
50  DistributionConfig& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
51 
52  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
53 
65  inline const Aws::String& GetCallerReference() const{ return m_callerReference; }
66 
78  inline void SetCallerReference(const Aws::String& value) { m_callerReferenceHasBeenSet = true; m_callerReference = value; }
79 
91  inline void SetCallerReference(Aws::String&& value) { m_callerReferenceHasBeenSet = true; m_callerReference = value; }
92 
104  inline void SetCallerReference(const char* value) { m_callerReferenceHasBeenSet = true; m_callerReference.assign(value); }
105 
117  inline DistributionConfig& WithCallerReference(const Aws::String& value) { SetCallerReference(value); return *this;}
118 
130  inline DistributionConfig& WithCallerReference(Aws::String&& value) { SetCallerReference(value); return *this;}
131 
143  inline DistributionConfig& WithCallerReference(const char* value) { SetCallerReference(value); return *this;}
144 
149  inline const Aliases& GetAliases() const{ return m_aliases; }
150 
155  inline void SetAliases(const Aliases& value) { m_aliasesHasBeenSet = true; m_aliases = value; }
156 
161  inline void SetAliases(Aliases&& value) { m_aliasesHasBeenSet = true; m_aliases = value; }
162 
167  inline DistributionConfig& WithAliases(const Aliases& value) { SetAliases(value); return *this;}
168 
173  inline DistributionConfig& WithAliases(Aliases&& value) { SetAliases(value); return *this;}
174 
187  inline const Aws::String& GetDefaultRootObject() const{ return m_defaultRootObject; }
188 
201  inline void SetDefaultRootObject(const Aws::String& value) { m_defaultRootObjectHasBeenSet = true; m_defaultRootObject = value; }
202 
215  inline void SetDefaultRootObject(Aws::String&& value) { m_defaultRootObjectHasBeenSet = true; m_defaultRootObject = value; }
216 
229  inline void SetDefaultRootObject(const char* value) { m_defaultRootObjectHasBeenSet = true; m_defaultRootObject.assign(value); }
230 
243  inline DistributionConfig& WithDefaultRootObject(const Aws::String& value) { SetDefaultRootObject(value); return *this;}
244 
257  inline DistributionConfig& WithDefaultRootObject(Aws::String&& value) { SetDefaultRootObject(value); return *this;}
258 
271  inline DistributionConfig& WithDefaultRootObject(const char* value) { SetDefaultRootObject(value); return *this;}
272 
276  inline const Origins& GetOrigins() const{ return m_origins; }
277 
281  inline void SetOrigins(const Origins& value) { m_originsHasBeenSet = true; m_origins = value; }
282 
286  inline void SetOrigins(Origins&& value) { m_originsHasBeenSet = true; m_origins = value; }
287 
291  inline DistributionConfig& WithOrigins(const Origins& value) { SetOrigins(value); return *this;}
292 
296  inline DistributionConfig& WithOrigins(Origins&& value) { SetOrigins(value); return *this;}
297 
303  inline const DefaultCacheBehavior& GetDefaultCacheBehavior() const{ return m_defaultCacheBehavior; }
304 
310  inline void SetDefaultCacheBehavior(const DefaultCacheBehavior& value) { m_defaultCacheBehaviorHasBeenSet = true; m_defaultCacheBehavior = value; }
311 
317  inline void SetDefaultCacheBehavior(DefaultCacheBehavior&& value) { m_defaultCacheBehaviorHasBeenSet = true; m_defaultCacheBehavior = value; }
318 
324  inline DistributionConfig& WithDefaultCacheBehavior(const DefaultCacheBehavior& value) { SetDefaultCacheBehavior(value); return *this;}
325 
331  inline DistributionConfig& WithDefaultCacheBehavior(DefaultCacheBehavior&& value) { SetDefaultCacheBehavior(value); return *this;}
332 
336  inline const CacheBehaviors& GetCacheBehaviors() const{ return m_cacheBehaviors; }
337 
341  inline void SetCacheBehaviors(const CacheBehaviors& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors = value; }
342 
346  inline void SetCacheBehaviors(CacheBehaviors&& value) { m_cacheBehaviorsHasBeenSet = true; m_cacheBehaviors = value; }
347 
351  inline DistributionConfig& WithCacheBehaviors(const CacheBehaviors& value) { SetCacheBehaviors(value); return *this;}
352 
356  inline DistributionConfig& WithCacheBehaviors(CacheBehaviors&& value) { SetCacheBehaviors(value); return *this;}
357 
361  inline const CustomErrorResponses& GetCustomErrorResponses() const{ return m_customErrorResponses; }
362 
366  inline void SetCustomErrorResponses(const CustomErrorResponses& value) { m_customErrorResponsesHasBeenSet = true; m_customErrorResponses = value; }
367 
371  inline void SetCustomErrorResponses(CustomErrorResponses&& value) { m_customErrorResponsesHasBeenSet = true; m_customErrorResponses = value; }
372 
376  inline DistributionConfig& WithCustomErrorResponses(const CustomErrorResponses& value) { SetCustomErrorResponses(value); return *this;}
377 
381  inline DistributionConfig& WithCustomErrorResponses(CustomErrorResponses&& value) { SetCustomErrorResponses(value); return *this;}
382 
386  inline const Aws::String& GetComment() const{ return m_comment; }
387 
391  inline void SetComment(const Aws::String& value) { m_commentHasBeenSet = true; m_comment = value; }
392 
396  inline void SetComment(Aws::String&& value) { m_commentHasBeenSet = true; m_comment = value; }
397 
401  inline void SetComment(const char* value) { m_commentHasBeenSet = true; m_comment.assign(value); }
402 
406  inline DistributionConfig& WithComment(const Aws::String& value) { SetComment(value); return *this;}
407 
411  inline DistributionConfig& WithComment(Aws::String&& value) { SetComment(value); return *this;}
412 
416  inline DistributionConfig& WithComment(const char* value) { SetComment(value); return *this;}
417 
422  inline const LoggingConfig& GetLogging() const{ return m_logging; }
423 
428  inline void SetLogging(const LoggingConfig& value) { m_loggingHasBeenSet = true; m_logging = value; }
429 
434  inline void SetLogging(LoggingConfig&& value) { m_loggingHasBeenSet = true; m_logging = value; }
435 
440  inline DistributionConfig& WithLogging(const LoggingConfig& value) { SetLogging(value); return *this;}
441 
446  inline DistributionConfig& WithLogging(LoggingConfig&& value) { SetLogging(value); return *this;}
447 
452  inline const PriceClass& GetPriceClass() const{ return m_priceClass; }
453 
458  inline void SetPriceClass(const PriceClass& value) { m_priceClassHasBeenSet = true; m_priceClass = value; }
459 
464  inline void SetPriceClass(PriceClass&& value) { m_priceClassHasBeenSet = true; m_priceClass = value; }
465 
470  inline DistributionConfig& WithPriceClass(const PriceClass& value) { SetPriceClass(value); return *this;}
471 
476  inline DistributionConfig& WithPriceClass(PriceClass&& value) { SetPriceClass(value); return *this;}
477 
481  inline bool GetEnabled() const{ return m_enabled; }
482 
486  inline void SetEnabled(bool value) { m_enabledHasBeenSet = true; m_enabled = value; }
487 
491  inline DistributionConfig& WithEnabled(bool value) { SetEnabled(value); return *this;}
492 
493 
494  inline const ViewerCertificate& GetViewerCertificate() const{ return m_viewerCertificate; }
495 
496 
497  inline void SetViewerCertificate(const ViewerCertificate& value) { m_viewerCertificateHasBeenSet = true; m_viewerCertificate = value; }
498 
499 
500  inline void SetViewerCertificate(ViewerCertificate&& value) { m_viewerCertificateHasBeenSet = true; m_viewerCertificate = value; }
501 
502 
503  inline DistributionConfig& WithViewerCertificate(const ViewerCertificate& value) { SetViewerCertificate(value); return *this;}
504 
505 
506  inline DistributionConfig& WithViewerCertificate(ViewerCertificate&& value) { SetViewerCertificate(value); return *this;}
507 
508 
509  inline const Restrictions& GetRestrictions() const{ return m_restrictions; }
510 
511 
512  inline void SetRestrictions(const Restrictions& value) { m_restrictionsHasBeenSet = true; m_restrictions = value; }
513 
514 
515  inline void SetRestrictions(Restrictions&& value) { m_restrictionsHasBeenSet = true; m_restrictions = value; }
516 
517 
518  inline DistributionConfig& WithRestrictions(const Restrictions& value) { SetRestrictions(value); return *this;}
519 
520 
521  inline DistributionConfig& WithRestrictions(Restrictions&& value) { SetRestrictions(value); return *this;}
522 
527  inline const Aws::String& GetWebACLId() const{ return m_webACLId; }
528 
533  inline void SetWebACLId(const Aws::String& value) { m_webACLIdHasBeenSet = true; m_webACLId = value; }
534 
539  inline void SetWebACLId(Aws::String&& value) { m_webACLIdHasBeenSet = true; m_webACLId = value; }
540 
545  inline void SetWebACLId(const char* value) { m_webACLIdHasBeenSet = true; m_webACLId.assign(value); }
546 
551  inline DistributionConfig& WithWebACLId(const Aws::String& value) { SetWebACLId(value); return *this;}
552 
557  inline DistributionConfig& WithWebACLId(Aws::String&& value) { SetWebACLId(value); return *this;}
558 
563  inline DistributionConfig& WithWebACLId(const char* value) { SetWebACLId(value); return *this;}
564 
565  private:
566  Aws::String m_callerReference;
567  bool m_callerReferenceHasBeenSet;
568  Aliases m_aliases;
569  bool m_aliasesHasBeenSet;
570  Aws::String m_defaultRootObject;
571  bool m_defaultRootObjectHasBeenSet;
572  Origins m_origins;
573  bool m_originsHasBeenSet;
574  DefaultCacheBehavior m_defaultCacheBehavior;
575  bool m_defaultCacheBehaviorHasBeenSet;
576  CacheBehaviors m_cacheBehaviors;
577  bool m_cacheBehaviorsHasBeenSet;
578  CustomErrorResponses m_customErrorResponses;
579  bool m_customErrorResponsesHasBeenSet;
580  Aws::String m_comment;
581  bool m_commentHasBeenSet;
582  LoggingConfig m_logging;
583  bool m_loggingHasBeenSet;
584  PriceClass m_priceClass;
585  bool m_priceClassHasBeenSet;
586  bool m_enabled;
587  bool m_enabledHasBeenSet;
588  ViewerCertificate m_viewerCertificate;
589  bool m_viewerCertificateHasBeenSet;
590  Restrictions m_restrictions;
591  bool m_restrictionsHasBeenSet;
592  Aws::String m_webACLId;
593  bool m_webACLIdHasBeenSet;
594  };
595 
596 } // namespace Model
597 } // namespace CloudFront
598 } // namespace Aws
void SetPriceClass(const PriceClass &value)
DistributionConfig & WithDefaultRootObject(Aws::String &&value)
void SetCacheBehaviors(const CacheBehaviors &value)
DistributionConfig & WithComment(const char *value)
void SetDefaultCacheBehavior(const DefaultCacheBehavior &value)
void SetRestrictions(const Restrictions &value)
DistributionConfig & WithPriceClass(const PriceClass &value)
DistributionConfig & WithViewerCertificate(const ViewerCertificate &value)
void SetViewerCertificate(const ViewerCertificate &value)
DistributionConfig & WithLogging(const LoggingConfig &value)
DistributionConfig & WithRestrictions(Restrictions &&value)
const Restrictions & GetRestrictions() const
void SetLogging(const LoggingConfig &value)
DistributionConfig & WithComment(Aws::String &&value)
DistributionConfig & WithEnabled(bool value)
DistributionConfig & WithAliases(Aliases &&value)
DistributionConfig & WithOrigins(const Origins &value)
const CustomErrorResponses & GetCustomErrorResponses() const
DistributionConfig & WithRestrictions(const Restrictions &value)
void SetComment(const Aws::String &value)
const DefaultCacheBehavior & GetDefaultCacheBehavior() const
DistributionConfig & WithWebACLId(const Aws::String &value)
void SetViewerCertificate(ViewerCertificate &&value)
DistributionConfig & WithCustomErrorResponses(CustomErrorResponses &&value)
#define AWS_CLOUDFRONT_API
DistributionConfig & WithDefaultRootObject(const Aws::String &value)
DistributionConfig & WithCacheBehaviors(const CacheBehaviors &value)
DistributionConfig & WithCallerReference(Aws::String &&value)
void SetDefaultCacheBehavior(DefaultCacheBehavior &&value)
DistributionConfig & WithDefaultCacheBehavior(DefaultCacheBehavior &&value)
void SetDefaultRootObject(const Aws::String &value)
DistributionConfig & WithCallerReference(const char *value)
void SetCallerReference(const Aws::String &value)
DistributionConfig & WithDefaultCacheBehavior(const DefaultCacheBehavior &value)
DistributionConfig & WithWebACLId(const char *value)
const LoggingConfig & GetLogging() const
DistributionConfig & WithComment(const Aws::String &value)
DistributionConfig & WithLogging(LoggingConfig &&value)
DistributionConfig & WithViewerCertificate(ViewerCertificate &&value)
DistributionConfig & WithCallerReference(const Aws::String &value)
DistributionConfig & WithPriceClass(PriceClass &&value)
void SetCacheBehaviors(CacheBehaviors &&value)
void SetCustomErrorResponses(const CustomErrorResponses &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
DistributionConfig & WithCustomErrorResponses(const CustomErrorResponses &value)
const ViewerCertificate & GetViewerCertificate() const
DistributionConfig & WithOrigins(Origins &&value)
const CacheBehaviors & GetCacheBehaviors() const
void SetCustomErrorResponses(CustomErrorResponses &&value)
DistributionConfig & WithAliases(const Aliases &value)
void SetWebACLId(const Aws::String &value)
DistributionConfig & WithDefaultRootObject(const char *value)
DistributionConfig & WithCacheBehaviors(CacheBehaviors &&value)
const Aws::String & GetDefaultRootObject() const
DistributionConfig & WithWebACLId(Aws::String &&value)
const Aws::String & GetCallerReference() const
JSON (JavaScript Object Notation).