1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/amplify/Amplify_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/amplify/model/DomainStatus.h>
11 #include <aws/amplify/model/SubDomain.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Utils
17 {
18 namespace Json
19 {
20   class JsonValue;
21   class JsonView;
22 } // namespace Json
23 } // namespace Utils
24 namespace Amplify
25 {
26 namespace Model
27 {
28 
29   /**
30    * <p> Describes a domain association that associates a custom domain with an
31    * Amplify app. </p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/DomainAssociation">AWS
33    * API Reference</a></p>
34    */
35   class AWS_AMPLIFY_API DomainAssociation
36   {
37   public:
38     DomainAssociation();
39     DomainAssociation(Aws::Utils::Json::JsonView jsonValue);
40     DomainAssociation& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
46      */
GetDomainAssociationArn()47     inline const Aws::String& GetDomainAssociationArn() const{ return m_domainAssociationArn; }
48 
49     /**
50      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
51      */
DomainAssociationArnHasBeenSet()52     inline bool DomainAssociationArnHasBeenSet() const { return m_domainAssociationArnHasBeenSet; }
53 
54     /**
55      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
56      */
SetDomainAssociationArn(const Aws::String & value)57     inline void SetDomainAssociationArn(const Aws::String& value) { m_domainAssociationArnHasBeenSet = true; m_domainAssociationArn = value; }
58 
59     /**
60      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
61      */
SetDomainAssociationArn(Aws::String && value)62     inline void SetDomainAssociationArn(Aws::String&& value) { m_domainAssociationArnHasBeenSet = true; m_domainAssociationArn = std::move(value); }
63 
64     /**
65      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
66      */
SetDomainAssociationArn(const char * value)67     inline void SetDomainAssociationArn(const char* value) { m_domainAssociationArnHasBeenSet = true; m_domainAssociationArn.assign(value); }
68 
69     /**
70      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
71      */
WithDomainAssociationArn(const Aws::String & value)72     inline DomainAssociation& WithDomainAssociationArn(const Aws::String& value) { SetDomainAssociationArn(value); return *this;}
73 
74     /**
75      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
76      */
WithDomainAssociationArn(Aws::String && value)77     inline DomainAssociation& WithDomainAssociationArn(Aws::String&& value) { SetDomainAssociationArn(std::move(value)); return *this;}
78 
79     /**
80      * <p> The Amazon Resource Name (ARN) for the domain association. </p>
81      */
WithDomainAssociationArn(const char * value)82     inline DomainAssociation& WithDomainAssociationArn(const char* value) { SetDomainAssociationArn(value); return *this;}
83 
84 
85     /**
86      * <p> The name of the domain. </p>
87      */
GetDomainName()88     inline const Aws::String& GetDomainName() const{ return m_domainName; }
89 
90     /**
91      * <p> The name of the domain. </p>
92      */
DomainNameHasBeenSet()93     inline bool DomainNameHasBeenSet() const { return m_domainNameHasBeenSet; }
94 
95     /**
96      * <p> The name of the domain. </p>
97      */
SetDomainName(const Aws::String & value)98     inline void SetDomainName(const Aws::String& value) { m_domainNameHasBeenSet = true; m_domainName = value; }
99 
100     /**
101      * <p> The name of the domain. </p>
102      */
SetDomainName(Aws::String && value)103     inline void SetDomainName(Aws::String&& value) { m_domainNameHasBeenSet = true; m_domainName = std::move(value); }
104 
105     /**
106      * <p> The name of the domain. </p>
107      */
SetDomainName(const char * value)108     inline void SetDomainName(const char* value) { m_domainNameHasBeenSet = true; m_domainName.assign(value); }
109 
110     /**
111      * <p> The name of the domain. </p>
112      */
WithDomainName(const Aws::String & value)113     inline DomainAssociation& WithDomainName(const Aws::String& value) { SetDomainName(value); return *this;}
114 
115     /**
116      * <p> The name of the domain. </p>
117      */
WithDomainName(Aws::String && value)118     inline DomainAssociation& WithDomainName(Aws::String&& value) { SetDomainName(std::move(value)); return *this;}
119 
120     /**
121      * <p> The name of the domain. </p>
122      */
WithDomainName(const char * value)123     inline DomainAssociation& WithDomainName(const char* value) { SetDomainName(value); return *this;}
124 
125 
126     /**
127      * <p> Enables the automated creation of subdomains for branches. </p>
128      */
GetEnableAutoSubDomain()129     inline bool GetEnableAutoSubDomain() const{ return m_enableAutoSubDomain; }
130 
131     /**
132      * <p> Enables the automated creation of subdomains for branches. </p>
133      */
EnableAutoSubDomainHasBeenSet()134     inline bool EnableAutoSubDomainHasBeenSet() const { return m_enableAutoSubDomainHasBeenSet; }
135 
136     /**
137      * <p> Enables the automated creation of subdomains for branches. </p>
138      */
SetEnableAutoSubDomain(bool value)139     inline void SetEnableAutoSubDomain(bool value) { m_enableAutoSubDomainHasBeenSet = true; m_enableAutoSubDomain = value; }
140 
141     /**
142      * <p> Enables the automated creation of subdomains for branches. </p>
143      */
WithEnableAutoSubDomain(bool value)144     inline DomainAssociation& WithEnableAutoSubDomain(bool value) { SetEnableAutoSubDomain(value); return *this;}
145 
146 
147     /**
148      * <p> Sets branch patterns for automatic subdomain creation. </p>
149      */
GetAutoSubDomainCreationPatterns()150     inline const Aws::Vector<Aws::String>& GetAutoSubDomainCreationPatterns() const{ return m_autoSubDomainCreationPatterns; }
151 
152     /**
153      * <p> Sets branch patterns for automatic subdomain creation. </p>
154      */
AutoSubDomainCreationPatternsHasBeenSet()155     inline bool AutoSubDomainCreationPatternsHasBeenSet() const { return m_autoSubDomainCreationPatternsHasBeenSet; }
156 
157     /**
158      * <p> Sets branch patterns for automatic subdomain creation. </p>
159      */
SetAutoSubDomainCreationPatterns(const Aws::Vector<Aws::String> & value)160     inline void SetAutoSubDomainCreationPatterns(const Aws::Vector<Aws::String>& value) { m_autoSubDomainCreationPatternsHasBeenSet = true; m_autoSubDomainCreationPatterns = value; }
161 
162     /**
163      * <p> Sets branch patterns for automatic subdomain creation. </p>
164      */
SetAutoSubDomainCreationPatterns(Aws::Vector<Aws::String> && value)165     inline void SetAutoSubDomainCreationPatterns(Aws::Vector<Aws::String>&& value) { m_autoSubDomainCreationPatternsHasBeenSet = true; m_autoSubDomainCreationPatterns = std::move(value); }
166 
167     /**
168      * <p> Sets branch patterns for automatic subdomain creation. </p>
169      */
WithAutoSubDomainCreationPatterns(const Aws::Vector<Aws::String> & value)170     inline DomainAssociation& WithAutoSubDomainCreationPatterns(const Aws::Vector<Aws::String>& value) { SetAutoSubDomainCreationPatterns(value); return *this;}
171 
172     /**
173      * <p> Sets branch patterns for automatic subdomain creation. </p>
174      */
WithAutoSubDomainCreationPatterns(Aws::Vector<Aws::String> && value)175     inline DomainAssociation& WithAutoSubDomainCreationPatterns(Aws::Vector<Aws::String>&& value) { SetAutoSubDomainCreationPatterns(std::move(value)); return *this;}
176 
177     /**
178      * <p> Sets branch patterns for automatic subdomain creation. </p>
179      */
AddAutoSubDomainCreationPatterns(const Aws::String & value)180     inline DomainAssociation& AddAutoSubDomainCreationPatterns(const Aws::String& value) { m_autoSubDomainCreationPatternsHasBeenSet = true; m_autoSubDomainCreationPatterns.push_back(value); return *this; }
181 
182     /**
183      * <p> Sets branch patterns for automatic subdomain creation. </p>
184      */
AddAutoSubDomainCreationPatterns(Aws::String && value)185     inline DomainAssociation& AddAutoSubDomainCreationPatterns(Aws::String&& value) { m_autoSubDomainCreationPatternsHasBeenSet = true; m_autoSubDomainCreationPatterns.push_back(std::move(value)); return *this; }
186 
187     /**
188      * <p> Sets branch patterns for automatic subdomain creation. </p>
189      */
AddAutoSubDomainCreationPatterns(const char * value)190     inline DomainAssociation& AddAutoSubDomainCreationPatterns(const char* value) { m_autoSubDomainCreationPatternsHasBeenSet = true; m_autoSubDomainCreationPatterns.push_back(value); return *this; }
191 
192 
193     /**
194      * <p> The required AWS Identity and Access Management (IAM) service role for the
195      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
196      */
GetAutoSubDomainIAMRole()197     inline const Aws::String& GetAutoSubDomainIAMRole() const{ return m_autoSubDomainIAMRole; }
198 
199     /**
200      * <p> The required AWS Identity and Access Management (IAM) service role for the
201      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
202      */
AutoSubDomainIAMRoleHasBeenSet()203     inline bool AutoSubDomainIAMRoleHasBeenSet() const { return m_autoSubDomainIAMRoleHasBeenSet; }
204 
205     /**
206      * <p> The required AWS Identity and Access Management (IAM) service role for the
207      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
208      */
SetAutoSubDomainIAMRole(const Aws::String & value)209     inline void SetAutoSubDomainIAMRole(const Aws::String& value) { m_autoSubDomainIAMRoleHasBeenSet = true; m_autoSubDomainIAMRole = value; }
210 
211     /**
212      * <p> The required AWS Identity and Access Management (IAM) service role for the
213      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
214      */
SetAutoSubDomainIAMRole(Aws::String && value)215     inline void SetAutoSubDomainIAMRole(Aws::String&& value) { m_autoSubDomainIAMRoleHasBeenSet = true; m_autoSubDomainIAMRole = std::move(value); }
216 
217     /**
218      * <p> The required AWS Identity and Access Management (IAM) service role for the
219      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
220      */
SetAutoSubDomainIAMRole(const char * value)221     inline void SetAutoSubDomainIAMRole(const char* value) { m_autoSubDomainIAMRoleHasBeenSet = true; m_autoSubDomainIAMRole.assign(value); }
222 
223     /**
224      * <p> The required AWS Identity and Access Management (IAM) service role for the
225      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
226      */
WithAutoSubDomainIAMRole(const Aws::String & value)227     inline DomainAssociation& WithAutoSubDomainIAMRole(const Aws::String& value) { SetAutoSubDomainIAMRole(value); return *this;}
228 
229     /**
230      * <p> The required AWS Identity and Access Management (IAM) service role for the
231      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
232      */
WithAutoSubDomainIAMRole(Aws::String && value)233     inline DomainAssociation& WithAutoSubDomainIAMRole(Aws::String&& value) { SetAutoSubDomainIAMRole(std::move(value)); return *this;}
234 
235     /**
236      * <p> The required AWS Identity and Access Management (IAM) service role for the
237      * Amazon Resource Name (ARN) for automatically creating subdomains. </p>
238      */
WithAutoSubDomainIAMRole(const char * value)239     inline DomainAssociation& WithAutoSubDomainIAMRole(const char* value) { SetAutoSubDomainIAMRole(value); return *this;}
240 
241 
242     /**
243      * <p> The current status of the domain association. </p>
244      */
GetDomainStatus()245     inline const DomainStatus& GetDomainStatus() const{ return m_domainStatus; }
246 
247     /**
248      * <p> The current status of the domain association. </p>
249      */
DomainStatusHasBeenSet()250     inline bool DomainStatusHasBeenSet() const { return m_domainStatusHasBeenSet; }
251 
252     /**
253      * <p> The current status of the domain association. </p>
254      */
SetDomainStatus(const DomainStatus & value)255     inline void SetDomainStatus(const DomainStatus& value) { m_domainStatusHasBeenSet = true; m_domainStatus = value; }
256 
257     /**
258      * <p> The current status of the domain association. </p>
259      */
SetDomainStatus(DomainStatus && value)260     inline void SetDomainStatus(DomainStatus&& value) { m_domainStatusHasBeenSet = true; m_domainStatus = std::move(value); }
261 
262     /**
263      * <p> The current status of the domain association. </p>
264      */
WithDomainStatus(const DomainStatus & value)265     inline DomainAssociation& WithDomainStatus(const DomainStatus& value) { SetDomainStatus(value); return *this;}
266 
267     /**
268      * <p> The current status of the domain association. </p>
269      */
WithDomainStatus(DomainStatus && value)270     inline DomainAssociation& WithDomainStatus(DomainStatus&& value) { SetDomainStatus(std::move(value)); return *this;}
271 
272 
273     /**
274      * <p> The reason for the current status of the domain association. </p>
275      */
GetStatusReason()276     inline const Aws::String& GetStatusReason() const{ return m_statusReason; }
277 
278     /**
279      * <p> The reason for the current status of the domain association. </p>
280      */
StatusReasonHasBeenSet()281     inline bool StatusReasonHasBeenSet() const { return m_statusReasonHasBeenSet; }
282 
283     /**
284      * <p> The reason for the current status of the domain association. </p>
285      */
SetStatusReason(const Aws::String & value)286     inline void SetStatusReason(const Aws::String& value) { m_statusReasonHasBeenSet = true; m_statusReason = value; }
287 
288     /**
289      * <p> The reason for the current status of the domain association. </p>
290      */
SetStatusReason(Aws::String && value)291     inline void SetStatusReason(Aws::String&& value) { m_statusReasonHasBeenSet = true; m_statusReason = std::move(value); }
292 
293     /**
294      * <p> The reason for the current status of the domain association. </p>
295      */
SetStatusReason(const char * value)296     inline void SetStatusReason(const char* value) { m_statusReasonHasBeenSet = true; m_statusReason.assign(value); }
297 
298     /**
299      * <p> The reason for the current status of the domain association. </p>
300      */
WithStatusReason(const Aws::String & value)301     inline DomainAssociation& WithStatusReason(const Aws::String& value) { SetStatusReason(value); return *this;}
302 
303     /**
304      * <p> The reason for the current status of the domain association. </p>
305      */
WithStatusReason(Aws::String && value)306     inline DomainAssociation& WithStatusReason(Aws::String&& value) { SetStatusReason(std::move(value)); return *this;}
307 
308     /**
309      * <p> The reason for the current status of the domain association. </p>
310      */
WithStatusReason(const char * value)311     inline DomainAssociation& WithStatusReason(const char* value) { SetStatusReason(value); return *this;}
312 
313 
314     /**
315      * <p> The DNS record for certificate verification. </p>
316      */
GetCertificateVerificationDNSRecord()317     inline const Aws::String& GetCertificateVerificationDNSRecord() const{ return m_certificateVerificationDNSRecord; }
318 
319     /**
320      * <p> The DNS record for certificate verification. </p>
321      */
CertificateVerificationDNSRecordHasBeenSet()322     inline bool CertificateVerificationDNSRecordHasBeenSet() const { return m_certificateVerificationDNSRecordHasBeenSet; }
323 
324     /**
325      * <p> The DNS record for certificate verification. </p>
326      */
SetCertificateVerificationDNSRecord(const Aws::String & value)327     inline void SetCertificateVerificationDNSRecord(const Aws::String& value) { m_certificateVerificationDNSRecordHasBeenSet = true; m_certificateVerificationDNSRecord = value; }
328 
329     /**
330      * <p> The DNS record for certificate verification. </p>
331      */
SetCertificateVerificationDNSRecord(Aws::String && value)332     inline void SetCertificateVerificationDNSRecord(Aws::String&& value) { m_certificateVerificationDNSRecordHasBeenSet = true; m_certificateVerificationDNSRecord = std::move(value); }
333 
334     /**
335      * <p> The DNS record for certificate verification. </p>
336      */
SetCertificateVerificationDNSRecord(const char * value)337     inline void SetCertificateVerificationDNSRecord(const char* value) { m_certificateVerificationDNSRecordHasBeenSet = true; m_certificateVerificationDNSRecord.assign(value); }
338 
339     /**
340      * <p> The DNS record for certificate verification. </p>
341      */
WithCertificateVerificationDNSRecord(const Aws::String & value)342     inline DomainAssociation& WithCertificateVerificationDNSRecord(const Aws::String& value) { SetCertificateVerificationDNSRecord(value); return *this;}
343 
344     /**
345      * <p> The DNS record for certificate verification. </p>
346      */
WithCertificateVerificationDNSRecord(Aws::String && value)347     inline DomainAssociation& WithCertificateVerificationDNSRecord(Aws::String&& value) { SetCertificateVerificationDNSRecord(std::move(value)); return *this;}
348 
349     /**
350      * <p> The DNS record for certificate verification. </p>
351      */
WithCertificateVerificationDNSRecord(const char * value)352     inline DomainAssociation& WithCertificateVerificationDNSRecord(const char* value) { SetCertificateVerificationDNSRecord(value); return *this;}
353 
354 
355     /**
356      * <p> The subdomains for the domain association. </p>
357      */
GetSubDomains()358     inline const Aws::Vector<SubDomain>& GetSubDomains() const{ return m_subDomains; }
359 
360     /**
361      * <p> The subdomains for the domain association. </p>
362      */
SubDomainsHasBeenSet()363     inline bool SubDomainsHasBeenSet() const { return m_subDomainsHasBeenSet; }
364 
365     /**
366      * <p> The subdomains for the domain association. </p>
367      */
SetSubDomains(const Aws::Vector<SubDomain> & value)368     inline void SetSubDomains(const Aws::Vector<SubDomain>& value) { m_subDomainsHasBeenSet = true; m_subDomains = value; }
369 
370     /**
371      * <p> The subdomains for the domain association. </p>
372      */
SetSubDomains(Aws::Vector<SubDomain> && value)373     inline void SetSubDomains(Aws::Vector<SubDomain>&& value) { m_subDomainsHasBeenSet = true; m_subDomains = std::move(value); }
374 
375     /**
376      * <p> The subdomains for the domain association. </p>
377      */
WithSubDomains(const Aws::Vector<SubDomain> & value)378     inline DomainAssociation& WithSubDomains(const Aws::Vector<SubDomain>& value) { SetSubDomains(value); return *this;}
379 
380     /**
381      * <p> The subdomains for the domain association. </p>
382      */
WithSubDomains(Aws::Vector<SubDomain> && value)383     inline DomainAssociation& WithSubDomains(Aws::Vector<SubDomain>&& value) { SetSubDomains(std::move(value)); return *this;}
384 
385     /**
386      * <p> The subdomains for the domain association. </p>
387      */
AddSubDomains(const SubDomain & value)388     inline DomainAssociation& AddSubDomains(const SubDomain& value) { m_subDomainsHasBeenSet = true; m_subDomains.push_back(value); return *this; }
389 
390     /**
391      * <p> The subdomains for the domain association. </p>
392      */
AddSubDomains(SubDomain && value)393     inline DomainAssociation& AddSubDomains(SubDomain&& value) { m_subDomainsHasBeenSet = true; m_subDomains.push_back(std::move(value)); return *this; }
394 
395   private:
396 
397     Aws::String m_domainAssociationArn;
398     bool m_domainAssociationArnHasBeenSet;
399 
400     Aws::String m_domainName;
401     bool m_domainNameHasBeenSet;
402 
403     bool m_enableAutoSubDomain;
404     bool m_enableAutoSubDomainHasBeenSet;
405 
406     Aws::Vector<Aws::String> m_autoSubDomainCreationPatterns;
407     bool m_autoSubDomainCreationPatternsHasBeenSet;
408 
409     Aws::String m_autoSubDomainIAMRole;
410     bool m_autoSubDomainIAMRoleHasBeenSet;
411 
412     DomainStatus m_domainStatus;
413     bool m_domainStatusHasBeenSet;
414 
415     Aws::String m_statusReason;
416     bool m_statusReasonHasBeenSet;
417 
418     Aws::String m_certificateVerificationDNSRecord;
419     bool m_certificateVerificationDNSRecordHasBeenSet;
420 
421     Aws::Vector<SubDomain> m_subDomains;
422     bool m_subDomainsHasBeenSet;
423   };
424 
425 } // namespace Model
426 } // namespace Amplify
427 } // namespace Aws
428