1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #include <aws/memorydb/model/ShardConfigurationRequest.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 MemoryDB
17 {
18 namespace Model
19 {
20 
ShardConfigurationRequest()21 ShardConfigurationRequest::ShardConfigurationRequest() :
22     m_shardCount(0),
23     m_shardCountHasBeenSet(false)
24 {
25 }
26 
ShardConfigurationRequest(JsonView jsonValue)27 ShardConfigurationRequest::ShardConfigurationRequest(JsonView jsonValue) :
28     m_shardCount(0),
29     m_shardCountHasBeenSet(false)
30 {
31   *this = jsonValue;
32 }
33 
operator =(JsonView jsonValue)34 ShardConfigurationRequest& ShardConfigurationRequest::operator =(JsonView jsonValue)
35 {
36   if(jsonValue.ValueExists("ShardCount"))
37   {
38     m_shardCount = jsonValue.GetInteger("ShardCount");
39 
40     m_shardCountHasBeenSet = true;
41   }
42 
43   return *this;
44 }
45 
Jsonize() const46 JsonValue ShardConfigurationRequest::Jsonize() const
47 {
48   JsonValue payload;
49 
50   if(m_shardCountHasBeenSet)
51   {
52    payload.WithInteger("ShardCount", m_shardCount);
53 
54   }
55 
56   return payload;
57 }
58 
59 } // namespace Model
60 } // namespace MemoryDB
61 } // namespace Aws
62