1 /**
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  * SPDX-License-Identifier: Apache-2.0.
4  */
5 
6 #pragma once
7 #include <aws/dynamodb/DynamoDB_EXPORTS.h>
8 #include <aws/dynamodb/model/CreateReplicaAction.h>
9 #include <aws/dynamodb/model/DeleteReplicaAction.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Json
17 {
18   class JsonValue;
19   class JsonView;
20 } // namespace Json
21 } // namespace Utils
22 namespace DynamoDB
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>Represents one of the following:</p> <ul> <li> <p>A new replica to be added
29    * to an existing global table.</p> </li> <li> <p>New parameters for an existing
30    * replica.</p> </li> <li> <p>An existing replica to be removed from an existing
31    * global table.</p> </li> </ul><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/dynamodb-2012-08-10/ReplicaUpdate">AWS
33    * API Reference</a></p>
34    */
35   class AWS_DYNAMODB_API ReplicaUpdate
36   {
37   public:
38     ReplicaUpdate();
39     ReplicaUpdate(Aws::Utils::Json::JsonView jsonValue);
40     ReplicaUpdate& operator=(Aws::Utils::Json::JsonView jsonValue);
41     Aws::Utils::Json::JsonValue Jsonize() const;
42 
43 
44     /**
45      * <p>The parameters required for creating a replica on an existing global
46      * table.</p>
47      */
GetCreate()48     inline const CreateReplicaAction& GetCreate() const{ return m_create; }
49 
50     /**
51      * <p>The parameters required for creating a replica on an existing global
52      * table.</p>
53      */
CreateHasBeenSet()54     inline bool CreateHasBeenSet() const { return m_createHasBeenSet; }
55 
56     /**
57      * <p>The parameters required for creating a replica on an existing global
58      * table.</p>
59      */
SetCreate(const CreateReplicaAction & value)60     inline void SetCreate(const CreateReplicaAction& value) { m_createHasBeenSet = true; m_create = value; }
61 
62     /**
63      * <p>The parameters required for creating a replica on an existing global
64      * table.</p>
65      */
SetCreate(CreateReplicaAction && value)66     inline void SetCreate(CreateReplicaAction&& value) { m_createHasBeenSet = true; m_create = std::move(value); }
67 
68     /**
69      * <p>The parameters required for creating a replica on an existing global
70      * table.</p>
71      */
WithCreate(const CreateReplicaAction & value)72     inline ReplicaUpdate& WithCreate(const CreateReplicaAction& value) { SetCreate(value); return *this;}
73 
74     /**
75      * <p>The parameters required for creating a replica on an existing global
76      * table.</p>
77      */
WithCreate(CreateReplicaAction && value)78     inline ReplicaUpdate& WithCreate(CreateReplicaAction&& value) { SetCreate(std::move(value)); return *this;}
79 
80 
81     /**
82      * <p>The name of the existing replica to be removed.</p>
83      */
GetDelete()84     inline const DeleteReplicaAction& GetDelete() const{ return m_delete; }
85 
86     /**
87      * <p>The name of the existing replica to be removed.</p>
88      */
DeleteHasBeenSet()89     inline bool DeleteHasBeenSet() const { return m_deleteHasBeenSet; }
90 
91     /**
92      * <p>The name of the existing replica to be removed.</p>
93      */
SetDelete(const DeleteReplicaAction & value)94     inline void SetDelete(const DeleteReplicaAction& value) { m_deleteHasBeenSet = true; m_delete = value; }
95 
96     /**
97      * <p>The name of the existing replica to be removed.</p>
98      */
SetDelete(DeleteReplicaAction && value)99     inline void SetDelete(DeleteReplicaAction&& value) { m_deleteHasBeenSet = true; m_delete = std::move(value); }
100 
101     /**
102      * <p>The name of the existing replica to be removed.</p>
103      */
WithDelete(const DeleteReplicaAction & value)104     inline ReplicaUpdate& WithDelete(const DeleteReplicaAction& value) { SetDelete(value); return *this;}
105 
106     /**
107      * <p>The name of the existing replica to be removed.</p>
108      */
WithDelete(DeleteReplicaAction && value)109     inline ReplicaUpdate& WithDelete(DeleteReplicaAction&& value) { SetDelete(std::move(value)); return *this;}
110 
111   private:
112 
113     CreateReplicaAction m_create;
114     bool m_createHasBeenSet;
115 
116     DeleteReplicaAction m_delete;
117     bool m_deleteHasBeenSet;
118   };
119 
120 } // namespace Model
121 } // namespace DynamoDB
122 } // namespace Aws
123