1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/route53domains/model/TransferDomainRequest.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8
9 #include <utility>
10
11 using namespace Aws::Route53Domains::Model;
12 using namespace Aws::Utils::Json;
13 using namespace Aws::Utils;
14
TransferDomainRequest()15 TransferDomainRequest::TransferDomainRequest() :
16 m_domainNameHasBeenSet(false),
17 m_idnLangCodeHasBeenSet(false),
18 m_durationInYears(0),
19 m_durationInYearsHasBeenSet(false),
20 m_nameserversHasBeenSet(false),
21 m_authCodeHasBeenSet(false),
22 m_autoRenew(false),
23 m_autoRenewHasBeenSet(false),
24 m_adminContactHasBeenSet(false),
25 m_registrantContactHasBeenSet(false),
26 m_techContactHasBeenSet(false),
27 m_privacyProtectAdminContact(false),
28 m_privacyProtectAdminContactHasBeenSet(false),
29 m_privacyProtectRegistrantContact(false),
30 m_privacyProtectRegistrantContactHasBeenSet(false),
31 m_privacyProtectTechContact(false),
32 m_privacyProtectTechContactHasBeenSet(false)
33 {
34 }
35
SerializePayload() const36 Aws::String TransferDomainRequest::SerializePayload() const
37 {
38 JsonValue payload;
39
40 if(m_domainNameHasBeenSet)
41 {
42 payload.WithString("DomainName", m_domainName);
43
44 }
45
46 if(m_idnLangCodeHasBeenSet)
47 {
48 payload.WithString("IdnLangCode", m_idnLangCode);
49
50 }
51
52 if(m_durationInYearsHasBeenSet)
53 {
54 payload.WithInteger("DurationInYears", m_durationInYears);
55
56 }
57
58 if(m_nameserversHasBeenSet)
59 {
60 Array<JsonValue> nameserversJsonList(m_nameservers.size());
61 for(unsigned nameserversIndex = 0; nameserversIndex < nameserversJsonList.GetLength(); ++nameserversIndex)
62 {
63 nameserversJsonList[nameserversIndex].AsObject(m_nameservers[nameserversIndex].Jsonize());
64 }
65 payload.WithArray("Nameservers", std::move(nameserversJsonList));
66
67 }
68
69 if(m_authCodeHasBeenSet)
70 {
71 payload.WithString("AuthCode", m_authCode);
72
73 }
74
75 if(m_autoRenewHasBeenSet)
76 {
77 payload.WithBool("AutoRenew", m_autoRenew);
78
79 }
80
81 if(m_adminContactHasBeenSet)
82 {
83 payload.WithObject("AdminContact", m_adminContact.Jsonize());
84
85 }
86
87 if(m_registrantContactHasBeenSet)
88 {
89 payload.WithObject("RegistrantContact", m_registrantContact.Jsonize());
90
91 }
92
93 if(m_techContactHasBeenSet)
94 {
95 payload.WithObject("TechContact", m_techContact.Jsonize());
96
97 }
98
99 if(m_privacyProtectAdminContactHasBeenSet)
100 {
101 payload.WithBool("PrivacyProtectAdminContact", m_privacyProtectAdminContact);
102
103 }
104
105 if(m_privacyProtectRegistrantContactHasBeenSet)
106 {
107 payload.WithBool("PrivacyProtectRegistrantContact", m_privacyProtectRegistrantContact);
108
109 }
110
111 if(m_privacyProtectTechContactHasBeenSet)
112 {
113 payload.WithBool("PrivacyProtectTechContact", m_privacyProtectTechContact);
114
115 }
116
117 return payload.View().WriteReadable();
118 }
119
GetRequestSpecificHeaders() const120 Aws::Http::HeaderValueCollection TransferDomainRequest::GetRequestSpecificHeaders() const
121 {
122 Aws::Http::HeaderValueCollection headers;
123 headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "Route53Domains_v20140515.TransferDomain"));
124 return headers;
125
126 }
127
128
129
130
131