1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/kafkaconnect/model/CustomPluginDescription.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 KafkaConnect
17 {
18 namespace Model
19 {
20 
CustomPluginDescription()21 CustomPluginDescription::CustomPluginDescription() :
22     m_customPluginArnHasBeenSet(false),
23     m_revision(0),
24     m_revisionHasBeenSet(false)
25 {
26 }
27 
CustomPluginDescription(JsonView jsonValue)28 CustomPluginDescription::CustomPluginDescription(JsonView jsonValue) :
29     m_customPluginArnHasBeenSet(false),
30     m_revision(0),
31     m_revisionHasBeenSet(false)
32 {
33   *this = jsonValue;
34 }
35 
operator =(JsonView jsonValue)36 CustomPluginDescription& CustomPluginDescription::operator =(JsonView jsonValue)
37 {
38   if(jsonValue.ValueExists("customPluginArn"))
39   {
40     m_customPluginArn = jsonValue.GetString("customPluginArn");
41 
42     m_customPluginArnHasBeenSet = true;
43   }
44 
45   if(jsonValue.ValueExists("revision"))
46   {
47     m_revision = jsonValue.GetInt64("revision");
48 
49     m_revisionHasBeenSet = true;
50   }
51 
52   return *this;
53 }
54 
Jsonize() const55 JsonValue CustomPluginDescription::Jsonize() const
56 {
57   JsonValue payload;
58 
59   if(m_customPluginArnHasBeenSet)
60   {
61    payload.WithString("customPluginArn", m_customPluginArn);
62 
63   }
64 
65   if(m_revisionHasBeenSet)
66   {
67    payload.WithInt64("revision", m_revision);
68 
69   }
70 
71   return payload;
72 }
73 
74 } // namespace Model
75 } // namespace KafkaConnect
76 } // namespace Aws
77