AWS SDK for C++

AWS SDK for C++ Version 1.11.837

Loading...
Searching...
No Matches
SharedResource.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/mq/MQ_EXPORTS.h>
10#include <aws/mq/model/SharedResourceError.h>
11#include <aws/mq/model/SharedResourceStatus.h>
12#include <aws/mq/model/SharedResourceType.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace MQ {
24namespace Model {
25
33 public:
34 AWS_MQ_API SharedResource() = default;
38
40
43 inline const Aws::Vector<Aws::String>& GetDnsNames() const { return m_dnsNames; }
44 inline bool DnsNamesHasBeenSet() const { return m_dnsNamesHasBeenSet; }
45 template <typename DnsNamesT = Aws::Vector<Aws::String>>
46 void SetDnsNames(DnsNamesT&& value) {
47 m_dnsNamesHasBeenSet = true;
48 m_dnsNames = std::forward<DnsNamesT>(value);
49 }
50 template <typename DnsNamesT = Aws::Vector<Aws::String>>
51 SharedResource& WithDnsNames(DnsNamesT&& value) {
52 SetDnsNames(std::forward<DnsNamesT>(value));
53 return *this;
54 }
55 template <typename DnsNamesT = Aws::String>
56 SharedResource& AddDnsNames(DnsNamesT&& value) {
57 m_dnsNamesHasBeenSet = true;
58 m_dnsNames.emplace_back(std::forward<DnsNamesT>(value));
59 return *this;
60 }
62
64
67 inline const SharedResourceError& GetError() const { return m_error; }
68 inline bool ErrorHasBeenSet() const { return m_errorHasBeenSet; }
69 template <typename ErrorT = SharedResourceError>
70 void SetError(ErrorT&& value) {
71 m_errorHasBeenSet = true;
72 m_error = std::forward<ErrorT>(value);
73 }
74 template <typename ErrorT = SharedResourceError>
75 SharedResource& WithError(ErrorT&& value) {
76 SetError(std::forward<ErrorT>(value));
77 return *this;
78 }
80
82
85 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
86 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
87 template <typename ResourceArnT = Aws::String>
88 void SetResourceArn(ResourceArnT&& value) {
89 m_resourceArnHasBeenSet = true;
90 m_resourceArn = std::forward<ResourceArnT>(value);
91 }
92 template <typename ResourceArnT = Aws::String>
93 SharedResource& WithResourceArn(ResourceArnT&& value) {
94 SetResourceArn(std::forward<ResourceArnT>(value));
95 return *this;
96 }
98
100
103 inline const Aws::Vector<Aws::String>& GetResourceShareArns() const { return m_resourceShareArns; }
104 inline bool ResourceShareArnsHasBeenSet() const { return m_resourceShareArnsHasBeenSet; }
105 template <typename ResourceShareArnsT = Aws::Vector<Aws::String>>
106 void SetResourceShareArns(ResourceShareArnsT&& value) {
107 m_resourceShareArnsHasBeenSet = true;
108 m_resourceShareArns = std::forward<ResourceShareArnsT>(value);
109 }
110 template <typename ResourceShareArnsT = Aws::Vector<Aws::String>>
111 SharedResource& WithResourceShareArns(ResourceShareArnsT&& value) {
112 SetResourceShareArns(std::forward<ResourceShareArnsT>(value));
113 return *this;
114 }
115 template <typename ResourceShareArnsT = Aws::String>
116 SharedResource& AddResourceShareArns(ResourceShareArnsT&& value) {
117 m_resourceShareArnsHasBeenSet = true;
118 m_resourceShareArns.emplace_back(std::forward<ResourceShareArnsT>(value));
119 return *this;
120 }
122
124
127 inline SharedResourceStatus GetStatus() const { return m_status; }
128 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
129 inline void SetStatus(SharedResourceStatus value) {
130 m_statusHasBeenSet = true;
131 m_status = value;
132 }
134 SetStatus(value);
135 return *this;
136 }
138
140
143 inline SharedResourceType GetType() const { return m_type; }
144 inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; }
145 inline void SetType(SharedResourceType value) {
146 m_typeHasBeenSet = true;
147 m_type = value;
148 }
150 SetType(value);
151 return *this;
152 }
154 private:
155 Aws::Vector<Aws::String> m_dnsNames;
156
157 SharedResourceError m_error;
158
159 Aws::String m_resourceArn;
160
161 Aws::Vector<Aws::String> m_resourceShareArns;
162
164
166 bool m_dnsNamesHasBeenSet = false;
167 bool m_errorHasBeenSet = false;
168 bool m_resourceArnHasBeenSet = false;
169 bool m_resourceShareArnsHasBeenSet = false;
170 bool m_statusHasBeenSet = false;
171 bool m_typeHasBeenSet = false;
172};
173
174} // namespace Model
175} // namespace MQ
176} // namespace Aws
SharedResourceStatus GetStatus() const
SharedResource & WithDnsNames(DnsNamesT &&value)
void SetStatus(SharedResourceStatus value)
const SharedResourceError & GetError() const
AWS_MQ_API SharedResource & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_MQ_API Aws::Utils::Json::JsonValue Jsonize() const
SharedResource & WithResourceShareArns(ResourceShareArnsT &&value)
AWS_MQ_API SharedResource(Aws::Utils::Json::JsonView jsonValue)
AWS_MQ_API SharedResource()=default
void SetType(SharedResourceType value)
void SetDnsNames(DnsNamesT &&value)
const Aws::String & GetResourceArn() const
void SetError(ErrorT &&value)
const Aws::Vector< Aws::String > & GetDnsNames() const
SharedResource & WithResourceArn(ResourceArnT &&value)
SharedResourceType GetType() const
const Aws::Vector< Aws::String > & GetResourceShareArns() const
void SetResourceArn(ResourceArnT &&value)
SharedResource & AddResourceShareArns(ResourceShareArnsT &&value)
SharedResource & WithStatus(SharedResourceStatus value)
void SetResourceShareArns(ResourceShareArnsT &&value)
SharedResource & WithError(ErrorT &&value)
SharedResource & WithType(SharedResourceType value)
SharedResource & AddDnsNames(DnsNamesT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue