1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/appmesh/model/ListenerTlsCertificate.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 AppMesh
17 {
18 namespace Model
19 {
20 
ListenerTlsCertificate()21 ListenerTlsCertificate::ListenerTlsCertificate() :
22     m_acmHasBeenSet(false),
23     m_fileHasBeenSet(false),
24     m_sdsHasBeenSet(false)
25 {
26 }
27 
ListenerTlsCertificate(JsonView jsonValue)28 ListenerTlsCertificate::ListenerTlsCertificate(JsonView jsonValue) :
29     m_acmHasBeenSet(false),
30     m_fileHasBeenSet(false),
31     m_sdsHasBeenSet(false)
32 {
33   *this = jsonValue;
34 }
35 
operator =(JsonView jsonValue)36 ListenerTlsCertificate& ListenerTlsCertificate::operator =(JsonView jsonValue)
37 {
38   if(jsonValue.ValueExists("acm"))
39   {
40     m_acm = jsonValue.GetObject("acm");
41 
42     m_acmHasBeenSet = true;
43   }
44 
45   if(jsonValue.ValueExists("file"))
46   {
47     m_file = jsonValue.GetObject("file");
48 
49     m_fileHasBeenSet = true;
50   }
51 
52   if(jsonValue.ValueExists("sds"))
53   {
54     m_sds = jsonValue.GetObject("sds");
55 
56     m_sdsHasBeenSet = true;
57   }
58 
59   return *this;
60 }
61 
Jsonize() const62 JsonValue ListenerTlsCertificate::Jsonize() const
63 {
64   JsonValue payload;
65 
66   if(m_acmHasBeenSet)
67   {
68    payload.WithObject("acm", m_acm.Jsonize());
69 
70   }
71 
72   if(m_fileHasBeenSet)
73   {
74    payload.WithObject("file", m_file.Jsonize());
75 
76   }
77 
78   if(m_sdsHasBeenSet)
79   {
80    payload.WithObject("sds", m_sds.Jsonize());
81 
82   }
83 
84   return payload;
85 }
86 
87 } // namespace Model
88 } // namespace AppMesh
89 } // namespace Aws
90