1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/dms/model/KinesisSettings.h>
7 #include <aws/core/utils/json/JsonSerializer.h>
8
9 #include <utility>
10
11 using namespace Aws::Utils::Json;
12 using namespace Aws::Utils;
13
14 namespace Aws
15 {
16 namespace DatabaseMigrationService
17 {
18 namespace Model
19 {
20
KinesisSettings()21 KinesisSettings::KinesisSettings() :
22 m_streamArnHasBeenSet(false),
23 m_messageFormat(MessageFormatValue::NOT_SET),
24 m_messageFormatHasBeenSet(false),
25 m_serviceAccessRoleArnHasBeenSet(false),
26 m_includeTransactionDetails(false),
27 m_includeTransactionDetailsHasBeenSet(false),
28 m_includePartitionValue(false),
29 m_includePartitionValueHasBeenSet(false),
30 m_partitionIncludeSchemaTable(false),
31 m_partitionIncludeSchemaTableHasBeenSet(false),
32 m_includeTableAlterOperations(false),
33 m_includeTableAlterOperationsHasBeenSet(false),
34 m_includeControlDetails(false),
35 m_includeControlDetailsHasBeenSet(false),
36 m_includeNullAndEmpty(false),
37 m_includeNullAndEmptyHasBeenSet(false),
38 m_noHexPrefix(false),
39 m_noHexPrefixHasBeenSet(false)
40 {
41 }
42
KinesisSettings(JsonView jsonValue)43 KinesisSettings::KinesisSettings(JsonView jsonValue) :
44 m_streamArnHasBeenSet(false),
45 m_messageFormat(MessageFormatValue::NOT_SET),
46 m_messageFormatHasBeenSet(false),
47 m_serviceAccessRoleArnHasBeenSet(false),
48 m_includeTransactionDetails(false),
49 m_includeTransactionDetailsHasBeenSet(false),
50 m_includePartitionValue(false),
51 m_includePartitionValueHasBeenSet(false),
52 m_partitionIncludeSchemaTable(false),
53 m_partitionIncludeSchemaTableHasBeenSet(false),
54 m_includeTableAlterOperations(false),
55 m_includeTableAlterOperationsHasBeenSet(false),
56 m_includeControlDetails(false),
57 m_includeControlDetailsHasBeenSet(false),
58 m_includeNullAndEmpty(false),
59 m_includeNullAndEmptyHasBeenSet(false),
60 m_noHexPrefix(false),
61 m_noHexPrefixHasBeenSet(false)
62 {
63 *this = jsonValue;
64 }
65
operator =(JsonView jsonValue)66 KinesisSettings& KinesisSettings::operator =(JsonView jsonValue)
67 {
68 if(jsonValue.ValueExists("StreamArn"))
69 {
70 m_streamArn = jsonValue.GetString("StreamArn");
71
72 m_streamArnHasBeenSet = true;
73 }
74
75 if(jsonValue.ValueExists("MessageFormat"))
76 {
77 m_messageFormat = MessageFormatValueMapper::GetMessageFormatValueForName(jsonValue.GetString("MessageFormat"));
78
79 m_messageFormatHasBeenSet = true;
80 }
81
82 if(jsonValue.ValueExists("ServiceAccessRoleArn"))
83 {
84 m_serviceAccessRoleArn = jsonValue.GetString("ServiceAccessRoleArn");
85
86 m_serviceAccessRoleArnHasBeenSet = true;
87 }
88
89 if(jsonValue.ValueExists("IncludeTransactionDetails"))
90 {
91 m_includeTransactionDetails = jsonValue.GetBool("IncludeTransactionDetails");
92
93 m_includeTransactionDetailsHasBeenSet = true;
94 }
95
96 if(jsonValue.ValueExists("IncludePartitionValue"))
97 {
98 m_includePartitionValue = jsonValue.GetBool("IncludePartitionValue");
99
100 m_includePartitionValueHasBeenSet = true;
101 }
102
103 if(jsonValue.ValueExists("PartitionIncludeSchemaTable"))
104 {
105 m_partitionIncludeSchemaTable = jsonValue.GetBool("PartitionIncludeSchemaTable");
106
107 m_partitionIncludeSchemaTableHasBeenSet = true;
108 }
109
110 if(jsonValue.ValueExists("IncludeTableAlterOperations"))
111 {
112 m_includeTableAlterOperations = jsonValue.GetBool("IncludeTableAlterOperations");
113
114 m_includeTableAlterOperationsHasBeenSet = true;
115 }
116
117 if(jsonValue.ValueExists("IncludeControlDetails"))
118 {
119 m_includeControlDetails = jsonValue.GetBool("IncludeControlDetails");
120
121 m_includeControlDetailsHasBeenSet = true;
122 }
123
124 if(jsonValue.ValueExists("IncludeNullAndEmpty"))
125 {
126 m_includeNullAndEmpty = jsonValue.GetBool("IncludeNullAndEmpty");
127
128 m_includeNullAndEmptyHasBeenSet = true;
129 }
130
131 if(jsonValue.ValueExists("NoHexPrefix"))
132 {
133 m_noHexPrefix = jsonValue.GetBool("NoHexPrefix");
134
135 m_noHexPrefixHasBeenSet = true;
136 }
137
138 return *this;
139 }
140
Jsonize() const141 JsonValue KinesisSettings::Jsonize() const
142 {
143 JsonValue payload;
144
145 if(m_streamArnHasBeenSet)
146 {
147 payload.WithString("StreamArn", m_streamArn);
148
149 }
150
151 if(m_messageFormatHasBeenSet)
152 {
153 payload.WithString("MessageFormat", MessageFormatValueMapper::GetNameForMessageFormatValue(m_messageFormat));
154 }
155
156 if(m_serviceAccessRoleArnHasBeenSet)
157 {
158 payload.WithString("ServiceAccessRoleArn", m_serviceAccessRoleArn);
159
160 }
161
162 if(m_includeTransactionDetailsHasBeenSet)
163 {
164 payload.WithBool("IncludeTransactionDetails", m_includeTransactionDetails);
165
166 }
167
168 if(m_includePartitionValueHasBeenSet)
169 {
170 payload.WithBool("IncludePartitionValue", m_includePartitionValue);
171
172 }
173
174 if(m_partitionIncludeSchemaTableHasBeenSet)
175 {
176 payload.WithBool("PartitionIncludeSchemaTable", m_partitionIncludeSchemaTable);
177
178 }
179
180 if(m_includeTableAlterOperationsHasBeenSet)
181 {
182 payload.WithBool("IncludeTableAlterOperations", m_includeTableAlterOperations);
183
184 }
185
186 if(m_includeControlDetailsHasBeenSet)
187 {
188 payload.WithBool("IncludeControlDetails", m_includeControlDetails);
189
190 }
191
192 if(m_includeNullAndEmptyHasBeenSet)
193 {
194 payload.WithBool("IncludeNullAndEmpty", m_includeNullAndEmpty);
195
196 }
197
198 if(m_noHexPrefixHasBeenSet)
199 {
200 payload.WithBool("NoHexPrefix", m_noHexPrefix);
201
202 }
203
204 return payload;
205 }
206
207 } // namespace Model
208 } // namespace DatabaseMigrationService
209 } // namespace Aws
210