AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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/AWSVector.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Xml
18{
19 class XmlNode;
20} // namespace Xml
21} // namespace Utils
22namespace CloudFront
23{
24namespace Model
25{
26
35 {
36 public:
37 AWS_CLOUDFRONT_API GeoRestriction() = default;
38 AWS_CLOUDFRONT_API GeoRestriction(const Aws::Utils::Xml::XmlNode& xmlNode);
39 AWS_CLOUDFRONT_API GeoRestriction& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
40
41 AWS_CLOUDFRONT_API void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
42
43
45
55 inline GeoRestrictionType GetRestrictionType() const { return m_restrictionType; }
56 inline bool RestrictionTypeHasBeenSet() const { return m_restrictionTypeHasBeenSet; }
57 inline void SetRestrictionType(GeoRestrictionType value) { m_restrictionTypeHasBeenSet = true; m_restrictionType = value; }
60
62
68 inline int GetQuantity() const { return m_quantity; }
69 inline bool QuantityHasBeenSet() const { return m_quantityHasBeenSet; }
70 inline void SetQuantity(int value) { m_quantityHasBeenSet = true; m_quantity = value; }
71 inline GeoRestriction& WithQuantity(int value) { SetQuantity(value); return *this;}
73
75
89 inline const Aws::Vector<Aws::String>& GetItems() const { return m_items; }
90 inline bool ItemsHasBeenSet() const { return m_itemsHasBeenSet; }
91 template<typename ItemsT = Aws::Vector<Aws::String>>
92 void SetItems(ItemsT&& value) { m_itemsHasBeenSet = true; m_items = std::forward<ItemsT>(value); }
93 template<typename ItemsT = Aws::Vector<Aws::String>>
94 GeoRestriction& WithItems(ItemsT&& value) { SetItems(std::forward<ItemsT>(value)); return *this;}
95 template<typename ItemsT = Aws::String>
96 GeoRestriction& AddItems(ItemsT&& value) { m_itemsHasBeenSet = true; m_items.emplace_back(std::forward<ItemsT>(value)); return *this; }
98 private:
99
101 bool m_restrictionTypeHasBeenSet = false;
102
103 int m_quantity{0};
104 bool m_quantityHasBeenSet = false;
105
107 bool m_itemsHasBeenSet = false;
108 };
109
110} // namespace Model
111} // namespace CloudFront
112} // 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