AWS SDK for C++

AWS SDK for C++ Version 1.11.936

Loading...
Searching...
No Matches
Resource.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/resource-explorer-2/ResourceExplorer2_EXPORTS.h>
11#include <aws/resource-explorer-2/model/ResourceProperty.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace ResourceExplorer2 {
23namespace Model {
24
33class Resource {
34 public:
35 AWS_RESOURCEEXPLORER2_API Resource() = default;
36 AWS_RESOURCEEXPLORER2_API Resource(Aws::Utils::Json::JsonView jsonValue);
37 AWS_RESOURCEEXPLORER2_API Resource& operator=(Aws::Utils::Json::JsonView jsonValue);
38 AWS_RESOURCEEXPLORER2_API Aws::Utils::Json::JsonValue Jsonize() const;
39
41
46 inline const Aws::String& GetArn() const { return m_arn; }
47 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
48 template <typename ArnT = Aws::String>
49 void SetArn(ArnT&& value) {
50 m_arnHasBeenSet = true;
51 m_arn = std::forward<ArnT>(value);
52 }
53 template <typename ArnT = Aws::String>
54 Resource& WithArn(ArnT&& value) {
55 SetArn(std::forward<ArnT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetOwningAccountId() const { return m_owningAccountId; }
65 inline bool OwningAccountIdHasBeenSet() const { return m_owningAccountIdHasBeenSet; }
66 template <typename OwningAccountIdT = Aws::String>
67 void SetOwningAccountId(OwningAccountIdT&& value) {
68 m_owningAccountIdHasBeenSet = true;
69 m_owningAccountId = std::forward<OwningAccountIdT>(value);
70 }
71 template <typename OwningAccountIdT = Aws::String>
72 Resource& WithOwningAccountId(OwningAccountIdT&& value) {
73 SetOwningAccountId(std::forward<OwningAccountIdT>(value));
74 return *this;
75 }
77
79
83 inline const Aws::String& GetRegion() const { return m_region; }
84 inline bool RegionHasBeenSet() const { return m_regionHasBeenSet; }
85 template <typename RegionT = Aws::String>
86 void SetRegion(RegionT&& value) {
87 m_regionHasBeenSet = true;
88 m_region = std::forward<RegionT>(value);
89 }
90 template <typename RegionT = Aws::String>
91 Resource& WithRegion(RegionT&& value) {
92 SetRegion(std::forward<RegionT>(value));
93 return *this;
94 }
96
98
101 inline const Aws::String& GetResourceType() const { return m_resourceType; }
102 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
103 template <typename ResourceTypeT = Aws::String>
104 void SetResourceType(ResourceTypeT&& value) {
105 m_resourceTypeHasBeenSet = true;
106 m_resourceType = std::forward<ResourceTypeT>(value);
107 }
108 template <typename ResourceTypeT = Aws::String>
109 Resource& WithResourceType(ResourceTypeT&& value) {
110 SetResourceType(std::forward<ResourceTypeT>(value));
111 return *this;
112 }
114
116
120 inline const Aws::String& GetService() const { return m_service; }
121 inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; }
122 template <typename ServiceT = Aws::String>
123 void SetService(ServiceT&& value) {
124 m_serviceHasBeenSet = true;
125 m_service = std::forward<ServiceT>(value);
126 }
127 template <typename ServiceT = Aws::String>
128 Resource& WithService(ServiceT&& value) {
129 SetService(std::forward<ServiceT>(value));
130 return *this;
131 }
133
135
139 inline const Aws::String& GetCfnResourceType() const { return m_cfnResourceType; }
140 inline bool CfnResourceTypeHasBeenSet() const { return m_cfnResourceTypeHasBeenSet; }
141 template <typename CfnResourceTypeT = Aws::String>
142 void SetCfnResourceType(CfnResourceTypeT&& value) {
143 m_cfnResourceTypeHasBeenSet = true;
144 m_cfnResourceType = std::forward<CfnResourceTypeT>(value);
145 }
146 template <typename CfnResourceTypeT = Aws::String>
147 Resource& WithCfnResourceType(CfnResourceTypeT&& value) {
148 SetCfnResourceType(std::forward<CfnResourceTypeT>(value));
149 return *this;
150 }
152
154
158 inline const Aws::Utils::DateTime& GetLastReportedAt() const { return m_lastReportedAt; }
159 inline bool LastReportedAtHasBeenSet() const { return m_lastReportedAtHasBeenSet; }
160 template <typename LastReportedAtT = Aws::Utils::DateTime>
161 void SetLastReportedAt(LastReportedAtT&& value) {
162 m_lastReportedAtHasBeenSet = true;
163 m_lastReportedAt = std::forward<LastReportedAtT>(value);
164 }
165 template <typename LastReportedAtT = Aws::Utils::DateTime>
166 Resource& WithLastReportedAt(LastReportedAtT&& value) {
167 SetLastReportedAt(std::forward<LastReportedAtT>(value));
168 return *this;
169 }
171
173
178 inline const Aws::Vector<ResourceProperty>& GetProperties() const { return m_properties; }
179 inline bool PropertiesHasBeenSet() const { return m_propertiesHasBeenSet; }
180 template <typename PropertiesT = Aws::Vector<ResourceProperty>>
181 void SetProperties(PropertiesT&& value) {
182 m_propertiesHasBeenSet = true;
183 m_properties = std::forward<PropertiesT>(value);
184 }
185 template <typename PropertiesT = Aws::Vector<ResourceProperty>>
186 Resource& WithProperties(PropertiesT&& value) {
187 SetProperties(std::forward<PropertiesT>(value));
188 return *this;
189 }
190 template <typename PropertiesT = ResourceProperty>
191 Resource& AddProperties(PropertiesT&& value) {
192 m_propertiesHasBeenSet = true;
193 m_properties.emplace_back(std::forward<PropertiesT>(value));
194 return *this;
195 }
197 private:
198 Aws::String m_arn;
199
200 Aws::String m_owningAccountId;
201
202 Aws::String m_region;
203
204 Aws::String m_resourceType;
205
206 Aws::String m_service;
207
208 Aws::String m_cfnResourceType;
209
210 Aws::Utils::DateTime m_lastReportedAt{};
211
213 bool m_arnHasBeenSet = false;
214 bool m_owningAccountIdHasBeenSet = false;
215 bool m_regionHasBeenSet = false;
216 bool m_resourceTypeHasBeenSet = false;
217 bool m_serviceHasBeenSet = false;
218 bool m_cfnResourceTypeHasBeenSet = false;
219 bool m_lastReportedAtHasBeenSet = false;
220 bool m_propertiesHasBeenSet = false;
221};
222
223} // namespace Model
224} // namespace ResourceExplorer2
225} // namespace Aws
const Aws::String & GetOwningAccountId() const
Definition Resource.h:64
void SetProperties(PropertiesT &&value)
Definition Resource.h:181
Resource & WithProperties(PropertiesT &&value)
Definition Resource.h:186
AWS_RESOURCEEXPLORER2_API Resource & operator=(Aws::Utils::Json::JsonView jsonValue)
Resource & WithOwningAccountId(OwningAccountIdT &&value)
Definition Resource.h:72
AWS_RESOURCEEXPLORER2_API Resource()=default
Resource & WithResourceType(ResourceTypeT &&value)
Definition Resource.h:109
Resource & WithArn(ArnT &&value)
Definition Resource.h:54
Resource & WithRegion(RegionT &&value)
Definition Resource.h:91
AWS_RESOURCEEXPLORER2_API Resource(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetLastReportedAt() const
Definition Resource.h:158
void SetLastReportedAt(LastReportedAtT &&value)
Definition Resource.h:161
const Aws::String & GetRegion() const
Definition Resource.h:83
Resource & WithService(ServiceT &&value)
Definition Resource.h:128
void SetCfnResourceType(CfnResourceTypeT &&value)
Definition Resource.h:142
void SetService(ServiceT &&value)
Definition Resource.h:123
void SetResourceType(ResourceTypeT &&value)
Definition Resource.h:104
const Aws::Vector< ResourceProperty > & GetProperties() const
Definition Resource.h:178
const Aws::String & GetCfnResourceType() const
Definition Resource.h:139
void SetOwningAccountId(OwningAccountIdT &&value)
Definition Resource.h:67
Resource & AddProperties(PropertiesT &&value)
Definition Resource.h:191
const Aws::String & GetService() const
Definition Resource.h:120
Resource & WithCfnResourceType(CfnResourceTypeT &&value)
Definition Resource.h:147
void SetRegion(RegionT &&value)
Definition Resource.h:86
AWS_RESOURCEEXPLORER2_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::String & GetArn() const
Definition Resource.h:46
const Aws::String & GetResourceType() const
Definition Resource.h:101
Resource & WithLastReportedAt(LastReportedAtT &&value)
Definition Resource.h:166
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue