1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/securityhub/model/AwsRdsDbStatusInfo.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 SecurityHub
17 {
18 namespace Model
19 {
20 
AwsRdsDbStatusInfo()21 AwsRdsDbStatusInfo::AwsRdsDbStatusInfo() :
22     m_statusTypeHasBeenSet(false),
23     m_normal(false),
24     m_normalHasBeenSet(false),
25     m_statusHasBeenSet(false),
26     m_messageHasBeenSet(false)
27 {
28 }
29 
AwsRdsDbStatusInfo(JsonView jsonValue)30 AwsRdsDbStatusInfo::AwsRdsDbStatusInfo(JsonView jsonValue) :
31     m_statusTypeHasBeenSet(false),
32     m_normal(false),
33     m_normalHasBeenSet(false),
34     m_statusHasBeenSet(false),
35     m_messageHasBeenSet(false)
36 {
37   *this = jsonValue;
38 }
39 
operator =(JsonView jsonValue)40 AwsRdsDbStatusInfo& AwsRdsDbStatusInfo::operator =(JsonView jsonValue)
41 {
42   if(jsonValue.ValueExists("StatusType"))
43   {
44     m_statusType = jsonValue.GetString("StatusType");
45 
46     m_statusTypeHasBeenSet = true;
47   }
48 
49   if(jsonValue.ValueExists("Normal"))
50   {
51     m_normal = jsonValue.GetBool("Normal");
52 
53     m_normalHasBeenSet = true;
54   }
55 
56   if(jsonValue.ValueExists("Status"))
57   {
58     m_status = jsonValue.GetString("Status");
59 
60     m_statusHasBeenSet = true;
61   }
62 
63   if(jsonValue.ValueExists("Message"))
64   {
65     m_message = jsonValue.GetString("Message");
66 
67     m_messageHasBeenSet = true;
68   }
69 
70   return *this;
71 }
72 
Jsonize() const73 JsonValue AwsRdsDbStatusInfo::Jsonize() const
74 {
75   JsonValue payload;
76 
77   if(m_statusTypeHasBeenSet)
78   {
79    payload.WithString("StatusType", m_statusType);
80 
81   }
82 
83   if(m_normalHasBeenSet)
84   {
85    payload.WithBool("Normal", m_normal);
86 
87   }
88 
89   if(m_statusHasBeenSet)
90   {
91    payload.WithString("Status", m_status);
92 
93   }
94 
95   if(m_messageHasBeenSet)
96   {
97    payload.WithString("Message", m_message);
98 
99   }
100 
101   return payload;
102 }
103 
104 } // namespace Model
105 } // namespace SecurityHub
106 } // namespace Aws
107