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