1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/firehose/model/HttpEndpointDestinationConfiguration.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 Firehose
17 {
18 namespace Model
19 {
20
HttpEndpointDestinationConfiguration()21 HttpEndpointDestinationConfiguration::HttpEndpointDestinationConfiguration() :
22 m_endpointConfigurationHasBeenSet(false),
23 m_bufferingHintsHasBeenSet(false),
24 m_cloudWatchLoggingOptionsHasBeenSet(false),
25 m_requestConfigurationHasBeenSet(false),
26 m_processingConfigurationHasBeenSet(false),
27 m_roleARNHasBeenSet(false),
28 m_retryOptionsHasBeenSet(false),
29 m_s3BackupMode(HttpEndpointS3BackupMode::NOT_SET),
30 m_s3BackupModeHasBeenSet(false),
31 m_s3ConfigurationHasBeenSet(false)
32 {
33 }
34
HttpEndpointDestinationConfiguration(JsonView jsonValue)35 HttpEndpointDestinationConfiguration::HttpEndpointDestinationConfiguration(JsonView jsonValue) :
36 m_endpointConfigurationHasBeenSet(false),
37 m_bufferingHintsHasBeenSet(false),
38 m_cloudWatchLoggingOptionsHasBeenSet(false),
39 m_requestConfigurationHasBeenSet(false),
40 m_processingConfigurationHasBeenSet(false),
41 m_roleARNHasBeenSet(false),
42 m_retryOptionsHasBeenSet(false),
43 m_s3BackupMode(HttpEndpointS3BackupMode::NOT_SET),
44 m_s3BackupModeHasBeenSet(false),
45 m_s3ConfigurationHasBeenSet(false)
46 {
47 *this = jsonValue;
48 }
49
operator =(JsonView jsonValue)50 HttpEndpointDestinationConfiguration& HttpEndpointDestinationConfiguration::operator =(JsonView jsonValue)
51 {
52 if(jsonValue.ValueExists("EndpointConfiguration"))
53 {
54 m_endpointConfiguration = jsonValue.GetObject("EndpointConfiguration");
55
56 m_endpointConfigurationHasBeenSet = true;
57 }
58
59 if(jsonValue.ValueExists("BufferingHints"))
60 {
61 m_bufferingHints = jsonValue.GetObject("BufferingHints");
62
63 m_bufferingHintsHasBeenSet = true;
64 }
65
66 if(jsonValue.ValueExists("CloudWatchLoggingOptions"))
67 {
68 m_cloudWatchLoggingOptions = jsonValue.GetObject("CloudWatchLoggingOptions");
69
70 m_cloudWatchLoggingOptionsHasBeenSet = true;
71 }
72
73 if(jsonValue.ValueExists("RequestConfiguration"))
74 {
75 m_requestConfiguration = jsonValue.GetObject("RequestConfiguration");
76
77 m_requestConfigurationHasBeenSet = true;
78 }
79
80 if(jsonValue.ValueExists("ProcessingConfiguration"))
81 {
82 m_processingConfiguration = jsonValue.GetObject("ProcessingConfiguration");
83
84 m_processingConfigurationHasBeenSet = true;
85 }
86
87 if(jsonValue.ValueExists("RoleARN"))
88 {
89 m_roleARN = jsonValue.GetString("RoleARN");
90
91 m_roleARNHasBeenSet = true;
92 }
93
94 if(jsonValue.ValueExists("RetryOptions"))
95 {
96 m_retryOptions = jsonValue.GetObject("RetryOptions");
97
98 m_retryOptionsHasBeenSet = true;
99 }
100
101 if(jsonValue.ValueExists("S3BackupMode"))
102 {
103 m_s3BackupMode = HttpEndpointS3BackupModeMapper::GetHttpEndpointS3BackupModeForName(jsonValue.GetString("S3BackupMode"));
104
105 m_s3BackupModeHasBeenSet = true;
106 }
107
108 if(jsonValue.ValueExists("S3Configuration"))
109 {
110 m_s3Configuration = jsonValue.GetObject("S3Configuration");
111
112 m_s3ConfigurationHasBeenSet = true;
113 }
114
115 return *this;
116 }
117
Jsonize() const118 JsonValue HttpEndpointDestinationConfiguration::Jsonize() const
119 {
120 JsonValue payload;
121
122 if(m_endpointConfigurationHasBeenSet)
123 {
124 payload.WithObject("EndpointConfiguration", m_endpointConfiguration.Jsonize());
125
126 }
127
128 if(m_bufferingHintsHasBeenSet)
129 {
130 payload.WithObject("BufferingHints", m_bufferingHints.Jsonize());
131
132 }
133
134 if(m_cloudWatchLoggingOptionsHasBeenSet)
135 {
136 payload.WithObject("CloudWatchLoggingOptions", m_cloudWatchLoggingOptions.Jsonize());
137
138 }
139
140 if(m_requestConfigurationHasBeenSet)
141 {
142 payload.WithObject("RequestConfiguration", m_requestConfiguration.Jsonize());
143
144 }
145
146 if(m_processingConfigurationHasBeenSet)
147 {
148 payload.WithObject("ProcessingConfiguration", m_processingConfiguration.Jsonize());
149
150 }
151
152 if(m_roleARNHasBeenSet)
153 {
154 payload.WithString("RoleARN", m_roleARN);
155
156 }
157
158 if(m_retryOptionsHasBeenSet)
159 {
160 payload.WithObject("RetryOptions", m_retryOptions.Jsonize());
161
162 }
163
164 if(m_s3BackupModeHasBeenSet)
165 {
166 payload.WithString("S3BackupMode", HttpEndpointS3BackupModeMapper::GetNameForHttpEndpointS3BackupMode(m_s3BackupMode));
167 }
168
169 if(m_s3ConfigurationHasBeenSet)
170 {
171 payload.WithObject("S3Configuration", m_s3Configuration.Jsonize());
172
173 }
174
175 return payload;
176 }
177
178 } // namespace Model
179 } // namespace Firehose
180 } // namespace Aws
181