AWS SDK for C++  0.14.3
AWS SDK for C++
Origins.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
19 
20 namespace Aws
21 {
22 namespace Utils
23 {
24 namespace Xml
25 {
26  class XmlNode;
27 } // namespace Xml
28 } // namespace Utils
29 namespace CloudFront
30 {
31 namespace Model
32 {
33 
38  {
39  public:
40  Origins();
41  Origins(const Aws::Utils::Xml::XmlNode& xmlNode);
42  Origins& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
43 
44  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
45 
49  inline int GetQuantity() const{ return m_quantity; }
50 
54  inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }
55 
59  inline Origins& WithQuantity(int value) { SetQuantity(value); return *this;}
60 
64  inline const Aws::Vector<Origin>& GetItems() const{ return m_items; }
65 
69  inline void SetItems(const Aws::Vector<Origin>& value) { m_itemsHasBeenSet = true; m_items = value; }
70 
74  inline void SetItems(Aws::Vector<Origin>&& value) { m_itemsHasBeenSet = true; m_items = value; }
75 
79  inline Origins& WithItems(const Aws::Vector<Origin>& value) { SetItems(value); return *this;}
80 
84  inline Origins& WithItems(Aws::Vector<Origin>&& value) { SetItems(value); return *this;}
85 
89  inline Origins& AddItems(const Origin& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }
90 
94  inline Origins& AddItems(Origin&& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }
95 
96  private:
97  int m_quantity;
98  bool m_quantityHasBeenSet;
99  Aws::Vector<Origin> m_items;
100  bool m_itemsHasBeenSet;
101  };
102 
103 } // namespace Model
104 } // namespace CloudFront
105 } // namespace Aws
void SetItems(const Aws::Vector< Origin > &value)
Definition: Origins.h:69
void SetItems(Aws::Vector< Origin > &&value)
Definition: Origins.h:74
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
const Aws::Vector< Origin > & GetItems() const
Definition: Origins.h:64
#define AWS_CLOUDFRONT_API
Origins & WithItems(Aws::Vector< Origin > &&value)
Definition: Origins.h:84
Origins & AddItems(Origin &&value)
Definition: Origins.h:94
Origins & WithQuantity(int value)
Definition: Origins.h:59
void SetQuantity(int value)
Definition: Origins.h:54
Origins & WithItems(const Aws::Vector< Origin > &value)
Definition: Origins.h:79
JSON (JavaScript Object Notation).
Origins & AddItems(const Origin &value)
Definition: Origins.h:89