AWS SDK for C++  0.14.3
AWS SDK for C++
GeoRestriction.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
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Xml
26 {
27  class XmlNode;
28 } // namespace Xml
29 } // namespace Utils
30 namespace CloudFront
31 {
32 namespace Model
33 {
34 
44  {
45  public:
48  GeoRestriction& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
49 
50  void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
51 
60  inline const GeoRestrictionType& GetRestrictionType() const{ return m_restrictionType; }
61 
70  inline void SetRestrictionType(const GeoRestrictionType& value) { m_restrictionTypeHasBeenSet = true; m_restrictionType = value; }
71 
80  inline void SetRestrictionType(GeoRestrictionType&& value) { m_restrictionTypeHasBeenSet = true; m_restrictionType = value; }
81 
90  inline GeoRestriction& WithRestrictionType(const GeoRestrictionType& value) { SetRestrictionType(value); return *this;}
91 
100  inline GeoRestriction& WithRestrictionType(GeoRestrictionType&& value) { SetRestrictionType(value); return *this;}
101 
107  inline int GetQuantity() const{ return m_quantity; }
108 
114  inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }
115 
121  inline GeoRestriction& WithQuantity(int value) { SetQuantity(value); return *this;}
122 
134  inline const Aws::Vector<Aws::String>& GetItems() const{ return m_items; }
135 
147  inline void SetItems(const Aws::Vector<Aws::String>& value) { m_itemsHasBeenSet = true; m_items = value; }
148 
160  inline void SetItems(Aws::Vector<Aws::String>&& value) { m_itemsHasBeenSet = true; m_items = value; }
161 
173  inline GeoRestriction& WithItems(const Aws::Vector<Aws::String>& value) { SetItems(value); return *this;}
174 
186  inline GeoRestriction& WithItems(Aws::Vector<Aws::String>&& value) { SetItems(value); return *this;}
187 
199  inline GeoRestriction& AddItems(const Aws::String& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }
200 
212  inline GeoRestriction& AddItems(Aws::String&& value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }
213 
225  inline GeoRestriction& AddItems(const char* value) { m_itemsHasBeenSet = true; m_items.push_back(value); return *this; }
226 
227  private:
228  GeoRestrictionType m_restrictionType;
229  bool m_restrictionTypeHasBeenSet;
230  int m_quantity;
231  bool m_quantityHasBeenSet;
232  Aws::Vector<Aws::String> m_items;
233  bool m_itemsHasBeenSet;
234  };
235 
236 } // namespace Model
237 } // namespace CloudFront
238 } // namespace Aws
const GeoRestrictionType & GetRestrictionType() const
GeoRestriction & AddItems(const char *value)
GeoRestriction & WithQuantity(int value)
void SetRestrictionType(const GeoRestrictionType &value)
GeoRestriction & WithRestrictionType(GeoRestrictionType &&value)
GeoRestriction & WithItems(Aws::Vector< Aws::String > &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
GeoRestriction & WithItems(const Aws::Vector< Aws::String > &value)
GeoRestriction & AddItems(const Aws::String &value)
GeoRestriction & AddItems(Aws::String &&value)
#define AWS_CLOUDFRONT_API
GeoRestriction & WithRestrictionType(const GeoRestrictionType &value)
void SetItems(Aws::Vector< Aws::String > &&value)
void SetItems(const Aws::Vector< Aws::String > &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
void SetRestrictionType(GeoRestrictionType &&value)
const Aws::Vector< Aws::String > & GetItems() const
JSON (JavaScript Object Notation).