AWS SDK for C++  0.12.9
AWS SDK for C++
CacheBehavior.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
22 
23 namespace Aws
24 {
25 namespace Utils
26 {
27 namespace Xml
28 {
29  class XmlNode;
30 } // namespace Xml
31 } // namespace Utils
32 namespace CloudFront
33 {
34 namespace Model
35 {
36 
55  {
56  public:
57  CacheBehavior();
59  CacheBehavior& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
60 
61  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
62 
72  inline const Aws::String& GetPathPattern() const{ return m_pathPattern; }
73 
83  inline void SetPathPattern(const Aws::String& value) { m_pathPatternHasBeenSet = true; m_pathPattern = value; }
84 
94  inline void SetPathPattern(Aws::String&& value) { m_pathPatternHasBeenSet = true; m_pathPattern = value; }
95 
105  inline void SetPathPattern(const char* value) { m_pathPatternHasBeenSet = true; m_pathPattern.assign(value); }
106 
116  inline CacheBehavior& WithPathPattern(const Aws::String& value) { SetPathPattern(value); return *this;}
117 
127  inline CacheBehavior& WithPathPattern(Aws::String&& value) { SetPathPattern(value); return *this;}
128 
138  inline CacheBehavior& WithPathPattern(const char* value) { SetPathPattern(value); return *this;}
139 
145  inline const Aws::String& GetTargetOriginId() const{ return m_targetOriginId; }
146 
152  inline void SetTargetOriginId(const Aws::String& value) { m_targetOriginIdHasBeenSet = true; m_targetOriginId = value; }
153 
159  inline void SetTargetOriginId(Aws::String&& value) { m_targetOriginIdHasBeenSet = true; m_targetOriginId = value; }
160 
166  inline void SetTargetOriginId(const char* value) { m_targetOriginIdHasBeenSet = true; m_targetOriginId.assign(value); }
167 
173  inline CacheBehavior& WithTargetOriginId(const Aws::String& value) { SetTargetOriginId(value); return *this;}
174 
180  inline CacheBehavior& WithTargetOriginId(Aws::String&& value) { SetTargetOriginId(value); return *this;}
181 
187  inline CacheBehavior& WithTargetOriginId(const char* value) { SetTargetOriginId(value); return *this;}
188 
193  inline const ForwardedValues& GetForwardedValues() const{ return m_forwardedValues; }
194 
199  inline void SetForwardedValues(const ForwardedValues& value) { m_forwardedValuesHasBeenSet = true; m_forwardedValues = value; }
200 
205  inline void SetForwardedValues(ForwardedValues&& value) { m_forwardedValuesHasBeenSet = true; m_forwardedValues = value; }
206 
211  inline CacheBehavior& WithForwardedValues(const ForwardedValues& value) { SetForwardedValues(value); return *this;}
212 
217  inline CacheBehavior& WithForwardedValues(ForwardedValues&& value) { SetForwardedValues(value); return *this;}
218 
232  inline const TrustedSigners& GetTrustedSigners() const{ return m_trustedSigners; }
233 
247  inline void SetTrustedSigners(const TrustedSigners& value) { m_trustedSignersHasBeenSet = true; m_trustedSigners = value; }
248 
262  inline void SetTrustedSigners(TrustedSigners&& value) { m_trustedSignersHasBeenSet = true; m_trustedSigners = value; }
263 
277  inline CacheBehavior& WithTrustedSigners(const TrustedSigners& value) { SetTrustedSigners(value); return *this;}
278 
292  inline CacheBehavior& WithTrustedSigners(TrustedSigners&& value) { SetTrustedSigners(value); return *this;}
293 
303  inline const ViewerProtocolPolicy& GetViewerProtocolPolicy() const{ return m_viewerProtocolPolicy; }
304 
314  inline void SetViewerProtocolPolicy(const ViewerProtocolPolicy& value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy = value; }
315 
325  inline void SetViewerProtocolPolicy(ViewerProtocolPolicy&& value) { m_viewerProtocolPolicyHasBeenSet = true; m_viewerProtocolPolicy = value; }
326 
336  inline CacheBehavior& WithViewerProtocolPolicy(const ViewerProtocolPolicy& value) { SetViewerProtocolPolicy(value); return *this;}
337 
347  inline CacheBehavior& WithViewerProtocolPolicy(ViewerProtocolPolicy&& value) { SetViewerProtocolPolicy(value); return *this;}
348 
354  inline long long GetMinTTL() const{ return m_minTTL; }
355 
361  inline void SetMinTTL(long long value) { m_minTTLHasBeenSet = true; m_minTTL = value; }
362 
368  inline CacheBehavior& WithMinTTL(long long value) { SetMinTTL(value); return *this;}
369 
370 
371  inline const AllowedMethods& GetAllowedMethods() const{ return m_allowedMethods; }
372 
373 
374  inline void SetAllowedMethods(const AllowedMethods& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = value; }
375 
376 
377  inline void SetAllowedMethods(AllowedMethods&& value) { m_allowedMethodsHasBeenSet = true; m_allowedMethods = value; }
378 
379 
380  inline CacheBehavior& WithAllowedMethods(const AllowedMethods& value) { SetAllowedMethods(value); return *this;}
381 
382 
383  inline CacheBehavior& WithAllowedMethods(AllowedMethods&& value) { SetAllowedMethods(value); return *this;}
384 
390  inline bool GetSmoothStreaming() const{ return m_smoothStreaming; }
391 
397  inline void SetSmoothStreaming(bool value) { m_smoothStreamingHasBeenSet = true; m_smoothStreaming = value; }
398 
404  inline CacheBehavior& WithSmoothStreaming(bool value) { SetSmoothStreaming(value); return *this;}
405 
415  inline long long GetDefaultTTL() const{ return m_defaultTTL; }
416 
426  inline void SetDefaultTTL(long long value) { m_defaultTTLHasBeenSet = true; m_defaultTTL = value; }
427 
437  inline CacheBehavior& WithDefaultTTL(long long value) { SetDefaultTTL(value); return *this;}
438 
447  inline long long GetMaxTTL() const{ return m_maxTTL; }
448 
457  inline void SetMaxTTL(long long value) { m_maxTTLHasBeenSet = true; m_maxTTL = value; }
458 
467  inline CacheBehavior& WithMaxTTL(long long value) { SetMaxTTL(value); return *this;}
468 
487  inline bool GetCompress() const{ return m_compress; }
488 
507  inline void SetCompress(bool value) { m_compressHasBeenSet = true; m_compress = value; }
508 
527  inline CacheBehavior& WithCompress(bool value) { SetCompress(value); return *this;}
528 
529  private:
530  Aws::String m_pathPattern;
531  bool m_pathPatternHasBeenSet;
532  Aws::String m_targetOriginId;
533  bool m_targetOriginIdHasBeenSet;
534  ForwardedValues m_forwardedValues;
535  bool m_forwardedValuesHasBeenSet;
536  TrustedSigners m_trustedSigners;
537  bool m_trustedSignersHasBeenSet;
538  ViewerProtocolPolicy m_viewerProtocolPolicy;
539  bool m_viewerProtocolPolicyHasBeenSet;
540  long long m_minTTL;
541  bool m_minTTLHasBeenSet;
542  AllowedMethods m_allowedMethods;
543  bool m_allowedMethodsHasBeenSet;
544  bool m_smoothStreaming;
545  bool m_smoothStreamingHasBeenSet;
546  long long m_defaultTTL;
547  bool m_defaultTTLHasBeenSet;
548  long long m_maxTTL;
549  bool m_maxTTLHasBeenSet;
550  bool m_compress;
551  bool m_compressHasBeenSet;
552  };
553 
554 } // namespace Model
555 } // namespace CloudFront
556 } // namespace Aws
void SetForwardedValues(const ForwardedValues &value)
CacheBehavior & WithTargetOriginId(const char *value)
void SetViewerProtocolPolicy(const ViewerProtocolPolicy &value)
CacheBehavior & WithPathPattern(Aws::String &&value)
void SetPathPattern(Aws::String &&value)
Definition: CacheBehavior.h:94
const AllowedMethods & GetAllowedMethods() const
const ViewerProtocolPolicy & GetViewerProtocolPolicy() const
void SetPathPattern(const char *value)
void SetForwardedValues(ForwardedValues &&value)
void SetAllowedMethods(const AllowedMethods &value)
const Aws::String & GetPathPattern() const
Definition: CacheBehavior.h:72
CacheBehavior & WithSmoothStreaming(bool value)
CacheBehavior & WithTargetOriginId(Aws::String &&value)
void SetAllowedMethods(AllowedMethods &&value)
CacheBehavior & WithPathPattern(const char *value)
CacheBehavior & WithAllowedMethods(AllowedMethods &&value)
void SetViewerProtocolPolicy(ViewerProtocolPolicy &&value)
#define AWS_CLOUDFRONT_API
CacheBehavior & WithViewerProtocolPolicy(ViewerProtocolPolicy &&value)
CacheBehavior & WithTrustedSigners(TrustedSigners &&value)
void SetTargetOriginId(const char *value)
void SetTargetOriginId(Aws::String &&value)
CacheBehavior & WithPathPattern(const Aws::String &value)
void SetTrustedSigners(TrustedSigners &&value)
CacheBehavior & WithTrustedSigners(const TrustedSigners &value)
CacheBehavior & WithCompress(bool value)
const TrustedSigners & GetTrustedSigners() const
CacheBehavior & WithDefaultTTL(long long value)
void SetTargetOriginId(const Aws::String &value)
CacheBehavior & WithMaxTTL(long long value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
CacheBehavior & WithTargetOriginId(const Aws::String &value)
void SetPathPattern(const Aws::String &value)
Definition: CacheBehavior.h:83
void SetTrustedSigners(const TrustedSigners &value)
const ForwardedValues & GetForwardedValues() const
const Aws::String & GetTargetOriginId() const
CacheBehavior & WithAllowedMethods(const AllowedMethods &value)
CacheBehavior & WithViewerProtocolPolicy(const ViewerProtocolPolicy &value)
CacheBehavior & WithMinTTL(long long value)
CacheBehavior & WithForwardedValues(ForwardedValues &&value)
JSON (JavaScript Object Notation).
CacheBehavior & WithForwardedValues(const ForwardedValues &value)