AWS SDK for C++

AWS SDK for C++ Version 1.11.768

Loading...
Searching...
No Matches
Resource.h
1
6#pragma once
7#include <aws/apigateway/APIGateway_EXPORTS.h>
8#include <aws/apigateway/model/Method.h>
9#include <aws/core/utils/memory/stl/AWSMap.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace APIGateway {
22namespace Model {
23
29class Resource {
30 public:
31 AWS_APIGATEWAY_API Resource() = default;
32 AWS_APIGATEWAY_API Resource(Aws::Utils::Json::JsonView jsonValue);
33 AWS_APIGATEWAY_API Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
34 AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
40 inline const Aws::String& GetId() const { return m_id; }
41 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
42 template <typename IdT = Aws::String>
43 void SetId(IdT&& value) {
44 m_idHasBeenSet = true;
45 m_id = std::forward<IdT>(value);
46 }
47 template <typename IdT = Aws::String>
48 Resource& WithId(IdT&& value) {
49 SetId(std::forward<IdT>(value));
50 return *this;
51 }
53
55
58 inline const Aws::String& GetParentId() const { return m_parentId; }
59 inline bool ParentIdHasBeenSet() const { return m_parentIdHasBeenSet; }
60 template <typename ParentIdT = Aws::String>
61 void SetParentId(ParentIdT&& value) {
62 m_parentIdHasBeenSet = true;
63 m_parentId = std::forward<ParentIdT>(value);
64 }
65 template <typename ParentIdT = Aws::String>
66 Resource& WithParentId(ParentIdT&& value) {
67 SetParentId(std::forward<ParentIdT>(value));
68 return *this;
69 }
71
73
76 inline const Aws::String& GetPathPart() const { return m_pathPart; }
77 inline bool PathPartHasBeenSet() const { return m_pathPartHasBeenSet; }
78 template <typename PathPartT = Aws::String>
79 void SetPathPart(PathPartT&& value) {
80 m_pathPartHasBeenSet = true;
81 m_pathPart = std::forward<PathPartT>(value);
82 }
83 template <typename PathPartT = Aws::String>
84 Resource& WithPathPart(PathPartT&& value) {
85 SetPathPart(std::forward<PathPartT>(value));
86 return *this;
87 }
89
91
94 inline const Aws::String& GetPath() const { return m_path; }
95 inline bool PathHasBeenSet() const { return m_pathHasBeenSet; }
96 template <typename PathT = Aws::String>
97 void SetPath(PathT&& value) {
98 m_pathHasBeenSet = true;
99 m_path = std::forward<PathT>(value);
100 }
101 template <typename PathT = Aws::String>
102 Resource& WithPath(PathT&& value) {
103 SetPath(std::forward<PathT>(value));
104 return *this;
105 }
107
109
112 inline const Aws::Map<Aws::String, Method>& GetResourceMethods() const { return m_resourceMethods; }
113 inline bool ResourceMethodsHasBeenSet() const { return m_resourceMethodsHasBeenSet; }
114 template <typename ResourceMethodsT = Aws::Map<Aws::String, Method>>
115 void SetResourceMethods(ResourceMethodsT&& value) {
116 m_resourceMethodsHasBeenSet = true;
117 m_resourceMethods = std::forward<ResourceMethodsT>(value);
118 }
119 template <typename ResourceMethodsT = Aws::Map<Aws::String, Method>>
120 Resource& WithResourceMethods(ResourceMethodsT&& value) {
121 SetResourceMethods(std::forward<ResourceMethodsT>(value));
122 return *this;
123 }
124 template <typename ResourceMethodsKeyT = Aws::String, typename ResourceMethodsValueT = Method>
125 Resource& AddResourceMethods(ResourceMethodsKeyT&& key, ResourceMethodsValueT&& value) {
126 m_resourceMethodsHasBeenSet = true;
127 m_resourceMethods.emplace(std::forward<ResourceMethodsKeyT>(key), std::forward<ResourceMethodsValueT>(value));
128 return *this;
129 }
131
133
134 inline const Aws::String& GetRequestId() const { return m_requestId; }
135 inline bool RequestIdHasBeenSet() const { return m_requestIdHasBeenSet; }
136 template <typename RequestIdT = Aws::String>
137 void SetRequestId(RequestIdT&& value) {
138 m_requestIdHasBeenSet = true;
139 m_requestId = std::forward<RequestIdT>(value);
140 }
141 template <typename RequestIdT = Aws::String>
142 Resource& WithRequestId(RequestIdT&& value) {
143 SetRequestId(std::forward<RequestIdT>(value));
144 return *this;
145 }
147 private:
148 Aws::String m_id;
149
150 Aws::String m_parentId;
151
152 Aws::String m_pathPart;
153
154 Aws::String m_path;
155
156 Aws::Map<Aws::String, Method> m_resourceMethods;
157
158 Aws::String m_requestId;
159 bool m_idHasBeenSet = false;
160 bool m_parentIdHasBeenSet = false;
161 bool m_pathPartHasBeenSet = false;
162 bool m_pathHasBeenSet = false;
163 bool m_resourceMethodsHasBeenSet = false;
164 bool m_requestIdHasBeenSet = false;
165};
166
167} // namespace Model
168} // namespace APIGateway
169} // namespace Aws
AWS_APIGATEWAY_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetPath() const
Definition Resource.h:94
AWS_APIGATEWAY_API Resource(Aws::Utils::Json::JsonView jsonValue)
AWS_APIGATEWAY_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
Resource & WithPath(PathT &&value)
Definition Resource.h:102
Resource & WithRequestId(RequestIdT &&value)
Definition Resource.h:142
const Aws::String & GetId() const
Definition Resource.h:40
Resource & WithResourceMethods(ResourceMethodsT &&value)
Definition Resource.h:120
void SetResourceMethods(ResourceMethodsT &&value)
Definition Resource.h:115
Resource & AddResourceMethods(ResourceMethodsKeyT &&key, ResourceMethodsValueT &&value)
Definition Resource.h:125
Resource & WithPathPart(PathPartT &&value)
Definition Resource.h:84
const Aws::String & GetPathPart() const
Definition Resource.h:76
void SetPath(PathT &&value)
Definition Resource.h:97
Resource & WithParentId(ParentIdT &&value)
Definition Resource.h:66
void SetRequestId(RequestIdT &&value)
Definition Resource.h:137
void SetParentId(ParentIdT &&value)
Definition Resource.h:61
bool ResourceMethodsHasBeenSet() const
Definition Resource.h:113
const Aws::Map< Aws::String, Method > & GetResourceMethods() const
Definition Resource.h:112
Resource & WithId(IdT &&value)
Definition Resource.h:48
AWS_APIGATEWAY_API Resource()=default
const Aws::String & GetRequestId() const
Definition Resource.h:134
void SetPathPart(PathPartT &&value)
Definition Resource.h:79
const Aws::String & GetParentId() const
Definition Resource.h:58
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue