1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/quicksight/model/AuroraParameters.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 QuickSight
17 {
18 namespace Model
19 {
20
AuroraParameters()21 AuroraParameters::AuroraParameters() :
22 m_hostHasBeenSet(false),
23 m_port(0),
24 m_portHasBeenSet(false),
25 m_databaseHasBeenSet(false)
26 {
27 }
28
AuroraParameters(JsonView jsonValue)29 AuroraParameters::AuroraParameters(JsonView jsonValue) :
30 m_hostHasBeenSet(false),
31 m_port(0),
32 m_portHasBeenSet(false),
33 m_databaseHasBeenSet(false)
34 {
35 *this = jsonValue;
36 }
37
operator =(JsonView jsonValue)38 AuroraParameters& AuroraParameters::operator =(JsonView jsonValue)
39 {
40 if(jsonValue.ValueExists("Host"))
41 {
42 m_host = jsonValue.GetString("Host");
43
44 m_hostHasBeenSet = true;
45 }
46
47 if(jsonValue.ValueExists("Port"))
48 {
49 m_port = jsonValue.GetInteger("Port");
50
51 m_portHasBeenSet = true;
52 }
53
54 if(jsonValue.ValueExists("Database"))
55 {
56 m_database = jsonValue.GetString("Database");
57
58 m_databaseHasBeenSet = true;
59 }
60
61 return *this;
62 }
63
Jsonize() const64 JsonValue AuroraParameters::Jsonize() const
65 {
66 JsonValue payload;
67
68 if(m_hostHasBeenSet)
69 {
70 payload.WithString("Host", m_host);
71
72 }
73
74 if(m_portHasBeenSet)
75 {
76 payload.WithInteger("Port", m_port);
77
78 }
79
80 if(m_databaseHasBeenSet)
81 {
82 payload.WithString("Database", m_database);
83
84 }
85
86 return payload;
87 }
88
89 } // namespace Model
90 } // namespace QuickSight
91 } // namespace Aws
92