AWS SDK for C++

AWS SDK for C++ Version 1.11.744

Loading...
Searching...
No Matches
GeoRestriction.h
1
6#pragma once
7#include <aws/cloudfront/CloudFront_EXPORTS.h>
8#include <aws/cloudfront/model/GeoRestrictionType.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Xml {
17class XmlNode;
18} // namespace Xml
19} // namespace Utils
20namespace CloudFront {
21namespace Model {
22
31 public:
32 AWS_CLOUDFRONT_API GeoRestriction() = default;
33 AWS_CLOUDFRONT_API GeoRestriction(const Aws::Utils::Xml::XmlNode& xmlNode);
34 AWS_CLOUDFRONT_API GeoRestriction& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
35
36 AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
37
39
49 inline GeoRestrictionType GetRestrictionType() const { return m_restrictionType; }
50 inline bool RestrictionTypeHasBeenSet() const { return m_restrictionTypeHasBeenSet; }
52 m_restrictionTypeHasBeenSet = true;
53 m_restrictionType = value;
54 }
56 SetRestrictionType(value);
57 return *this;
58 }
60
62
68 inline int GetQuantity() const { return m_quantity; }
69 inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
70 inline void SetQuantity(int value) {
71 m_quantityHasBeenSet = true;
72 m_quantity = value;
73 }
74 inline GeoRestriction& WithQuantity(int value) {
75 SetQuantity(value);
76 return *this;
77 }
79
81
95 inline const Aws::Vector<Aws::String>& GetItems() const { return m_items; }
96 inline bool ItemsHasBeenSet() const { return m_itemsHasBeenSet; }
97 template <typename ItemsT = Aws::Vector<Aws::String>>
98 void SetItems(ItemsT&& value) {
99 m_itemsHasBeenSet = true;
100 m_items = std::forward<ItemsT>(value);
101 }
102 template <typename ItemsT = Aws::Vector<Aws::String>>
103 GeoRestriction& WithItems(ItemsT&& value) {
104 SetItems(std::forward<ItemsT>(value));
105 return *this;
106 }
107 template <typename ItemsT = Aws::String>
108 GeoRestriction& AddItems(ItemsT&& value) {
109 m_itemsHasBeenSet = true;
110 m_items.emplace_back(std::forward<ItemsT>(value));
111 return *this;
112 }
114 private:
116
117 int m_quantity{0};
118
120 bool m_restrictionTypeHasBeenSet = false;
121 bool m_quantityHasBeenSet = false;
122 bool m_itemsHasBeenSet = false;
123};
124
125} // namespace Model
126} // namespace CloudFront
127} // namespace Aws
AWS_CLOUDFRONT_API GeoRestriction()=default
AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode &parentNode) const
void SetRestrictionType(GeoRestrictionType value)
const Aws::Vector< Aws::String > & GetItems() const
GeoRestriction & WithItems(ItemsT &&value)
AWS_CLOUDFRONT_API GeoRestriction & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
GeoRestriction & AddItems(ItemsT &&value)
GeoRestriction & WithRestrictionType(GeoRestrictionType value)
GeoRestriction & WithQuantity(int value)
GeoRestrictionType GetRestrictionType() const
AWS_CLOUDFRONT_API GeoRestriction(const Aws::Utils::Xml::XmlNode &xmlNode)
std::vector< T, Aws::Allocator< T > > Vector