AWS SDK for C++

AWS SDK for C++ Version 1.11.788

Loading...
Searching...
No Matches
ContactMethod.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/lightsail/Lightsail_EXPORTS.h>
11#include <aws/lightsail/model/ContactMethodStatus.h>
12#include <aws/lightsail/model/ContactProtocol.h>
13#include <aws/lightsail/model/ResourceLocation.h>
14#include <aws/lightsail/model/ResourceType.h>
15#include <aws/lightsail/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace Utils {
21namespace Json {
22class JsonValue;
23class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Lightsail {
27namespace Model {
28
38 public:
39 AWS_LIGHTSAIL_API ContactMethod() = default;
40 AWS_LIGHTSAIL_API ContactMethod(Aws::Utils::Json::JsonView jsonValue);
41 AWS_LIGHTSAIL_API ContactMethod& operator=(Aws::Utils::Json::JsonView jsonValue);
42 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
49 inline const Aws::String& GetContactEndpoint() const { return m_contactEndpoint; }
50 inline bool ContactEndpointHasBeenSet() const { return m_contactEndpointHasBeenSet; }
51 template <typename ContactEndpointT = Aws::String>
52 void SetContactEndpoint(ContactEndpointT&& value) {
53 m_contactEndpointHasBeenSet = true;
54 m_contactEndpoint = std::forward<ContactEndpointT>(value);
55 }
56 template <typename ContactEndpointT = Aws::String>
57 ContactMethod& WithContactEndpoint(ContactEndpointT&& value) {
58 SetContactEndpoint(std::forward<ContactEndpointT>(value));
59 return *this;
60 }
62
64
72 inline ContactMethodStatus GetStatus() const { return m_status; }
73 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
74 inline void SetStatus(ContactMethodStatus value) {
75 m_statusHasBeenSet = true;
76 m_status = value;
77 }
79 SetStatus(value);
80 return *this;
81 }
83
85
89 inline ContactProtocol GetProtocol() const { return m_protocol; }
90 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
91 inline void SetProtocol(ContactProtocol value) {
92 m_protocolHasBeenSet = true;
93 m_protocol = value;
94 }
96 SetProtocol(value);
97 return *this;
98 }
100
102
105 inline const Aws::String& GetName() const { return m_name; }
106 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
107 template <typename NameT = Aws::String>
108 void SetName(NameT&& value) {
109 m_nameHasBeenSet = true;
110 m_name = std::forward<NameT>(value);
111 }
112 template <typename NameT = Aws::String>
113 ContactMethod& WithName(NameT&& value) {
114 SetName(std::forward<NameT>(value));
115 return *this;
116 }
118
120
123 inline const Aws::String& GetArn() const { return m_arn; }
124 inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; }
125 template <typename ArnT = Aws::String>
126 void SetArn(ArnT&& value) {
127 m_arnHasBeenSet = true;
128 m_arn = std::forward<ArnT>(value);
129 }
130 template <typename ArnT = Aws::String>
131 ContactMethod& WithArn(ArnT&& value) {
132 SetArn(std::forward<ArnT>(value));
133 return *this;
134 }
136
138
141 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
142 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
143 template <typename CreatedAtT = Aws::Utils::DateTime>
144 void SetCreatedAt(CreatedAtT&& value) {
145 m_createdAtHasBeenSet = true;
146 m_createdAt = std::forward<CreatedAtT>(value);
147 }
148 template <typename CreatedAtT = Aws::Utils::DateTime>
149 ContactMethod& WithCreatedAt(CreatedAtT&& value) {
150 SetCreatedAt(std::forward<CreatedAtT>(value));
151 return *this;
152 }
154
156
160 inline const ResourceLocation& GetLocation() const { return m_location; }
161 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
162 template <typename LocationT = ResourceLocation>
163 void SetLocation(LocationT&& value) {
164 m_locationHasBeenSet = true;
165 m_location = std::forward<LocationT>(value);
166 }
167 template <typename LocationT = ResourceLocation>
168 ContactMethod& WithLocation(LocationT&& value) {
169 SetLocation(std::forward<LocationT>(value));
170 return *this;
171 }
173
175
178 inline ResourceType GetResourceType() const { return m_resourceType; }
179 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
180 inline void SetResourceType(ResourceType value) {
181 m_resourceTypeHasBeenSet = true;
182 m_resourceType = value;
183 }
185 SetResourceType(value);
186 return *this;
187 }
189
191
196 inline const Aws::String& GetSupportCode() const { return m_supportCode; }
197 inline bool SupportCodeHasBeenSet() const { return m_supportCodeHasBeenSet; }
198 template <typename SupportCodeT = Aws::String>
199 void SetSupportCode(SupportCodeT&& value) {
200 m_supportCodeHasBeenSet = true;
201 m_supportCode = std::forward<SupportCodeT>(value);
202 }
203 template <typename SupportCodeT = Aws::String>
204 ContactMethod& WithSupportCode(SupportCodeT&& value) {
205 SetSupportCode(std::forward<SupportCodeT>(value));
206 return *this;
207 }
209
211
217 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
218 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
219 template <typename TagsT = Aws::Vector<Tag>>
220 void SetTags(TagsT&& value) {
221 m_tagsHasBeenSet = true;
222 m_tags = std::forward<TagsT>(value);
223 }
224 template <typename TagsT = Aws::Vector<Tag>>
225 ContactMethod& WithTags(TagsT&& value) {
226 SetTags(std::forward<TagsT>(value));
227 return *this;
228 }
229 template <typename TagsT = Tag>
230 ContactMethod& AddTags(TagsT&& value) {
231 m_tagsHasBeenSet = true;
232 m_tags.emplace_back(std::forward<TagsT>(value));
233 return *this;
234 }
236 private:
237 Aws::String m_contactEndpoint;
238
240
242
243 Aws::String m_name;
244
245 Aws::String m_arn;
246
247 Aws::Utils::DateTime m_createdAt{};
248
249 ResourceLocation m_location;
250
251 ResourceType m_resourceType{ResourceType::NOT_SET};
252
253 Aws::String m_supportCode;
254
255 Aws::Vector<Tag> m_tags;
256 bool m_contactEndpointHasBeenSet = false;
257 bool m_statusHasBeenSet = false;
258 bool m_protocolHasBeenSet = false;
259 bool m_nameHasBeenSet = false;
260 bool m_arnHasBeenSet = false;
261 bool m_createdAtHasBeenSet = false;
262 bool m_locationHasBeenSet = false;
263 bool m_resourceTypeHasBeenSet = false;
264 bool m_supportCodeHasBeenSet = false;
265 bool m_tagsHasBeenSet = false;
266};
267
268} // namespace Model
269} // namespace Lightsail
270} // namespace Aws
ContactProtocol GetProtocol() const
const Aws::String & GetName() const
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LIGHTSAIL_API ContactMethod(Aws::Utils::Json::JsonView jsonValue)
void SetContactEndpoint(ContactEndpointT &&value)
ContactMethod & WithName(NameT &&value)
void SetCreatedAt(CreatedAtT &&value)
ContactMethod & WithResourceType(ResourceType value)
AWS_LIGHTSAIL_API ContactMethod()=default
AWS_LIGHTSAIL_API ContactMethod & operator=(Aws::Utils::Json::JsonView jsonValue)
ContactMethod & AddTags(TagsT &&value)
const Aws::String & GetSupportCode() const
ContactMethod & WithCreatedAt(CreatedAtT &&value)
ContactMethod & WithLocation(LocationT &&value)
ContactMethod & WithContactEndpoint(ContactEndpointT &&value)
ContactMethodStatus GetStatus() const
ContactMethod & WithArn(ArnT &&value)
void SetStatus(ContactMethodStatus value)
void SetProtocol(ContactProtocol value)
ContactMethod & WithProtocol(ContactProtocol value)
ContactMethod & WithStatus(ContactMethodStatus value)
const Aws::Utils::DateTime & GetCreatedAt() const
const Aws::Vector< Tag > & GetTags() const
const Aws::String & GetContactEndpoint() const
void SetResourceType(ResourceType value)
ContactMethod & WithTags(TagsT &&value)
void SetLocation(LocationT &&value)
const ResourceLocation & GetLocation() const
ContactMethod & WithSupportCode(SupportCodeT &&value)
void SetSupportCode(SupportCodeT &&value)
const Aws::String & GetArn() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue