AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
AccessRestriction.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/geo-places/GeoPlaces_EXPORTS.h>
9#include <aws/geo-places/model/Category.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace GeoPlaces {
21namespace Model {
22
31 public:
32 AWS_GEOPLACES_API AccessRestriction() = default;
33 AWS_GEOPLACES_API AccessRestriction(Aws::Utils::Json::JsonView jsonValue);
35 AWS_GEOPLACES_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline bool GetRestricted() const { return m_restricted; }
42 inline bool RestrictedHasBeenSet() const { return m_restrictedHasBeenSet; }
43 inline void SetRestricted(bool value) {
44 m_restrictedHasBeenSet = true;
45 m_restricted = value;
46 }
47 inline AccessRestriction& WithRestricted(bool value) {
48 SetRestricted(value);
49 return *this;
50 }
52
54
57 inline const Aws::Vector<Category>& GetCategories() const { return m_categories; }
58 inline bool CategoriesHasBeenSet() const { return m_categoriesHasBeenSet; }
59 template <typename CategoriesT = Aws::Vector<Category>>
60 void SetCategories(CategoriesT&& value) {
61 m_categoriesHasBeenSet = true;
62 m_categories = std::forward<CategoriesT>(value);
63 }
64 template <typename CategoriesT = Aws::Vector<Category>>
65 AccessRestriction& WithCategories(CategoriesT&& value) {
66 SetCategories(std::forward<CategoriesT>(value));
67 return *this;
68 }
69 template <typename CategoriesT = Category>
70 AccessRestriction& AddCategories(CategoriesT&& value) {
71 m_categoriesHasBeenSet = true;
72 m_categories.emplace_back(std::forward<CategoriesT>(value));
73 return *this;
74 }
76 private:
77 bool m_restricted{false};
78
79 Aws::Vector<Category> m_categories;
80 bool m_restrictedHasBeenSet = false;
81 bool m_categoriesHasBeenSet = false;
82};
83
84} // namespace Model
85} // namespace GeoPlaces
86} // namespace Aws
AWS_GEOPLACES_API AccessRestriction()=default
AWS_GEOPLACES_API Aws::Utils::Json::JsonValue Jsonize() const
AccessRestriction & WithRestricted(bool value)
AccessRestriction & WithCategories(CategoriesT &&value)
AccessRestriction & AddCategories(CategoriesT &&value)
AWS_GEOPLACES_API AccessRestriction & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_GEOPLACES_API AccessRestriction(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Category > & GetCategories() const
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue