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/redshift/Redshift_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9 #include <aws/core/utils/memory/stl/AWSString.h>
10 #include <utility>
11 
12 namespace Aws
13 {
14 namespace Utils
15 {
16 namespace Xml
17 {
18   class XmlNode;
19 } // namespace Xml
20 } // namespace Utils
21 namespace Redshift
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Returns the destination region and retention period that are configured for
28    * cross-region snapshot copy.</p><p><h3>See Also:</h3>   <a
29    * href="http://docs.aws.amazon.com/goto/WebAPI/redshift-2012-12-01/ClusterSnapshotCopyStatus">AWS
30    * API Reference</a></p>
31    */
32   class AWS_REDSHIFT_API ClusterSnapshotCopyStatus
33   {
34   public:
35     ClusterSnapshotCopyStatus();
36     ClusterSnapshotCopyStatus(const Aws::Utils::Xml::XmlNode& xmlNode);
37     ClusterSnapshotCopyStatus& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
38 
39     void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
40     void OutputToStream(Aws::OStream& oStream, const char* location) const;
41 
42 
43     /**
44      * <p>The destination region that snapshots are automatically copied to when
45      * cross-region snapshot copy is enabled.</p>
46      */
GetDestinationRegion()47     inline const Aws::String& GetDestinationRegion() const{ return m_destinationRegion; }
48 
49     /**
50      * <p>The destination region that snapshots are automatically copied to when
51      * cross-region snapshot copy is enabled.</p>
52      */
DestinationRegionHasBeenSet()53     inline bool DestinationRegionHasBeenSet() const { return m_destinationRegionHasBeenSet; }
54 
55     /**
56      * <p>The destination region that snapshots are automatically copied to when
57      * cross-region snapshot copy is enabled.</p>
58      */
SetDestinationRegion(const Aws::String & value)59     inline void SetDestinationRegion(const Aws::String& value) { m_destinationRegionHasBeenSet = true; m_destinationRegion = value; }
60 
61     /**
62      * <p>The destination region that snapshots are automatically copied to when
63      * cross-region snapshot copy is enabled.</p>
64      */
SetDestinationRegion(Aws::String && value)65     inline void SetDestinationRegion(Aws::String&& value) { m_destinationRegionHasBeenSet = true; m_destinationRegion = std::move(value); }
66 
67     /**
68      * <p>The destination region that snapshots are automatically copied to when
69      * cross-region snapshot copy is enabled.</p>
70      */
SetDestinationRegion(const char * value)71     inline void SetDestinationRegion(const char* value) { m_destinationRegionHasBeenSet = true; m_destinationRegion.assign(value); }
72 
73     /**
74      * <p>The destination region that snapshots are automatically copied to when
75      * cross-region snapshot copy is enabled.</p>
76      */
WithDestinationRegion(const Aws::String & value)77     inline ClusterSnapshotCopyStatus& WithDestinationRegion(const Aws::String& value) { SetDestinationRegion(value); return *this;}
78 
79     /**
80      * <p>The destination region that snapshots are automatically copied to when
81      * cross-region snapshot copy is enabled.</p>
82      */
WithDestinationRegion(Aws::String && value)83     inline ClusterSnapshotCopyStatus& WithDestinationRegion(Aws::String&& value) { SetDestinationRegion(std::move(value)); return *this;}
84 
85     /**
86      * <p>The destination region that snapshots are automatically copied to when
87      * cross-region snapshot copy is enabled.</p>
88      */
WithDestinationRegion(const char * value)89     inline ClusterSnapshotCopyStatus& WithDestinationRegion(const char* value) { SetDestinationRegion(value); return *this;}
90 
91 
92     /**
93      * <p>The number of days that automated snapshots are retained in the destination
94      * region after they are copied from a source region.</p>
95      */
GetRetentionPeriod()96     inline long long GetRetentionPeriod() const{ return m_retentionPeriod; }
97 
98     /**
99      * <p>The number of days that automated snapshots are retained in the destination
100      * region after they are copied from a source region.</p>
101      */
RetentionPeriodHasBeenSet()102     inline bool RetentionPeriodHasBeenSet() const { return m_retentionPeriodHasBeenSet; }
103 
104     /**
105      * <p>The number of days that automated snapshots are retained in the destination
106      * region after they are copied from a source region.</p>
107      */
SetRetentionPeriod(long long value)108     inline void SetRetentionPeriod(long long value) { m_retentionPeriodHasBeenSet = true; m_retentionPeriod = value; }
109 
110     /**
111      * <p>The number of days that automated snapshots are retained in the destination
112      * region after they are copied from a source region.</p>
113      */
WithRetentionPeriod(long long value)114     inline ClusterSnapshotCopyStatus& WithRetentionPeriod(long long value) { SetRetentionPeriod(value); return *this;}
115 
116 
117     /**
118      * <p>The number of days that automated snapshots are retained in the destination
119      * region after they are copied from a source region. If the value is -1, the
120      * manual snapshot is retained indefinitely. </p> <p>The value must be either -1 or
121      * an integer between 1 and 3,653.</p>
122      */
GetManualSnapshotRetentionPeriod()123     inline int GetManualSnapshotRetentionPeriod() const{ return m_manualSnapshotRetentionPeriod; }
124 
125     /**
126      * <p>The number of days that automated snapshots are retained in the destination
127      * region after they are copied from a source region. If the value is -1, the
128      * manual snapshot is retained indefinitely. </p> <p>The value must be either -1 or
129      * an integer between 1 and 3,653.</p>
130      */
ManualSnapshotRetentionPeriodHasBeenSet()131     inline bool ManualSnapshotRetentionPeriodHasBeenSet() const { return m_manualSnapshotRetentionPeriodHasBeenSet; }
132 
133     /**
134      * <p>The number of days that automated snapshots are retained in the destination
135      * region after they are copied from a source region. If the value is -1, the
136      * manual snapshot is retained indefinitely. </p> <p>The value must be either -1 or
137      * an integer between 1 and 3,653.</p>
138      */
SetManualSnapshotRetentionPeriod(int value)139     inline void SetManualSnapshotRetentionPeriod(int value) { m_manualSnapshotRetentionPeriodHasBeenSet = true; m_manualSnapshotRetentionPeriod = value; }
140 
141     /**
142      * <p>The number of days that automated snapshots are retained in the destination
143      * region after they are copied from a source region. If the value is -1, the
144      * manual snapshot is retained indefinitely. </p> <p>The value must be either -1 or
145      * an integer between 1 and 3,653.</p>
146      */
WithManualSnapshotRetentionPeriod(int value)147     inline ClusterSnapshotCopyStatus& WithManualSnapshotRetentionPeriod(int value) { SetManualSnapshotRetentionPeriod(value); return *this;}
148 
149 
150     /**
151      * <p>The name of the snapshot copy grant.</p>
152      */
GetSnapshotCopyGrantName()153     inline const Aws::String& GetSnapshotCopyGrantName() const{ return m_snapshotCopyGrantName; }
154 
155     /**
156      * <p>The name of the snapshot copy grant.</p>
157      */
SnapshotCopyGrantNameHasBeenSet()158     inline bool SnapshotCopyGrantNameHasBeenSet() const { return m_snapshotCopyGrantNameHasBeenSet; }
159 
160     /**
161      * <p>The name of the snapshot copy grant.</p>
162      */
SetSnapshotCopyGrantName(const Aws::String & value)163     inline void SetSnapshotCopyGrantName(const Aws::String& value) { m_snapshotCopyGrantNameHasBeenSet = true; m_snapshotCopyGrantName = value; }
164 
165     /**
166      * <p>The name of the snapshot copy grant.</p>
167      */
SetSnapshotCopyGrantName(Aws::String && value)168     inline void SetSnapshotCopyGrantName(Aws::String&& value) { m_snapshotCopyGrantNameHasBeenSet = true; m_snapshotCopyGrantName = std::move(value); }
169 
170     /**
171      * <p>The name of the snapshot copy grant.</p>
172      */
SetSnapshotCopyGrantName(const char * value)173     inline void SetSnapshotCopyGrantName(const char* value) { m_snapshotCopyGrantNameHasBeenSet = true; m_snapshotCopyGrantName.assign(value); }
174 
175     /**
176      * <p>The name of the snapshot copy grant.</p>
177      */
WithSnapshotCopyGrantName(const Aws::String & value)178     inline ClusterSnapshotCopyStatus& WithSnapshotCopyGrantName(const Aws::String& value) { SetSnapshotCopyGrantName(value); return *this;}
179 
180     /**
181      * <p>The name of the snapshot copy grant.</p>
182      */
WithSnapshotCopyGrantName(Aws::String && value)183     inline ClusterSnapshotCopyStatus& WithSnapshotCopyGrantName(Aws::String&& value) { SetSnapshotCopyGrantName(std::move(value)); return *this;}
184 
185     /**
186      * <p>The name of the snapshot copy grant.</p>
187      */
WithSnapshotCopyGrantName(const char * value)188     inline ClusterSnapshotCopyStatus& WithSnapshotCopyGrantName(const char* value) { SetSnapshotCopyGrantName(value); return *this;}
189 
190   private:
191 
192     Aws::String m_destinationRegion;
193     bool m_destinationRegionHasBeenSet;
194 
195     long long m_retentionPeriod;
196     bool m_retentionPeriodHasBeenSet;
197 
198     int m_manualSnapshotRetentionPeriod;
199     bool m_manualSnapshotRetentionPeriodHasBeenSet;
200 
201     Aws::String m_snapshotCopyGrantName;
202     bool m_snapshotCopyGrantNameHasBeenSet;
203   };
204 
205 } // namespace Model
206 } // namespace Redshift
207 } // namespace Aws
208