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/s3-crt/S3Crt_EXPORTS.h>
8 #include <aws/core/utils/DateTime.h>
9 #include <aws/s3-crt/model/TransitionStorageClass.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 S3Crt
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>Specifies when an object transitions to a specified storage class. For more
28    * information about Amazon S3 lifecycle configuration rules, see <a
29    * href="https://docs.aws.amazon.com/AmazonS3/latest/dev/lifecycle-transition-general-considerations.html">Transitioning
30    * Objects Using Amazon S3 Lifecycle</a> in the <i>Amazon S3 User
31    * Guide</i>.</p><p><h3>See Also:</h3>   <a
32    * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Transition">AWS API
33    * Reference</a></p>
34    */
35   class AWS_S3CRT_API Transition
36   {
37   public:
38     Transition();
39     Transition(const Aws::Utils::Xml::XmlNode& xmlNode);
40     Transition& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
41 
42     void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
43 
44 
45     /**
46      * <p>Indicates when objects are transitioned to the specified storage class. The
47      * date value must be in ISO 8601 format. The time is always midnight UTC.</p>
48      */
GetDate()49     inline const Aws::Utils::DateTime& GetDate() const{ return m_date; }
50 
51     /**
52      * <p>Indicates when objects are transitioned to the specified storage class. The
53      * date value must be in ISO 8601 format. The time is always midnight UTC.</p>
54      */
DateHasBeenSet()55     inline bool DateHasBeenSet() const { return m_dateHasBeenSet; }
56 
57     /**
58      * <p>Indicates when objects are transitioned to the specified storage class. The
59      * date value must be in ISO 8601 format. The time is always midnight UTC.</p>
60      */
SetDate(const Aws::Utils::DateTime & value)61     inline void SetDate(const Aws::Utils::DateTime& value) { m_dateHasBeenSet = true; m_date = value; }
62 
63     /**
64      * <p>Indicates when objects are transitioned to the specified storage class. The
65      * date value must be in ISO 8601 format. The time is always midnight UTC.</p>
66      */
SetDate(Aws::Utils::DateTime && value)67     inline void SetDate(Aws::Utils::DateTime&& value) { m_dateHasBeenSet = true; m_date = std::move(value); }
68 
69     /**
70      * <p>Indicates when objects are transitioned to the specified storage class. The
71      * date value must be in ISO 8601 format. The time is always midnight UTC.</p>
72      */
WithDate(const Aws::Utils::DateTime & value)73     inline Transition& WithDate(const Aws::Utils::DateTime& value) { SetDate(value); return *this;}
74 
75     /**
76      * <p>Indicates when objects are transitioned to the specified storage class. The
77      * date value must be in ISO 8601 format. The time is always midnight UTC.</p>
78      */
WithDate(Aws::Utils::DateTime && value)79     inline Transition& WithDate(Aws::Utils::DateTime&& value) { SetDate(std::move(value)); return *this;}
80 
81 
82     /**
83      * <p>Indicates the number of days after creation when objects are transitioned to
84      * the specified storage class. The value must be a positive integer.</p>
85      */
GetDays()86     inline int GetDays() const{ return m_days; }
87 
88     /**
89      * <p>Indicates the number of days after creation when objects are transitioned to
90      * the specified storage class. The value must be a positive integer.</p>
91      */
DaysHasBeenSet()92     inline bool DaysHasBeenSet() const { return m_daysHasBeenSet; }
93 
94     /**
95      * <p>Indicates the number of days after creation when objects are transitioned to
96      * the specified storage class. The value must be a positive integer.</p>
97      */
SetDays(int value)98     inline void SetDays(int value) { m_daysHasBeenSet = true; m_days = value; }
99 
100     /**
101      * <p>Indicates the number of days after creation when objects are transitioned to
102      * the specified storage class. The value must be a positive integer.</p>
103      */
WithDays(int value)104     inline Transition& WithDays(int value) { SetDays(value); return *this;}
105 
106 
107     /**
108      * <p>The storage class to which you want the object to transition.</p>
109      */
GetStorageClass()110     inline const TransitionStorageClass& GetStorageClass() const{ return m_storageClass; }
111 
112     /**
113      * <p>The storage class to which you want the object to transition.</p>
114      */
StorageClassHasBeenSet()115     inline bool StorageClassHasBeenSet() const { return m_storageClassHasBeenSet; }
116 
117     /**
118      * <p>The storage class to which you want the object to transition.</p>
119      */
SetStorageClass(const TransitionStorageClass & value)120     inline void SetStorageClass(const TransitionStorageClass& value) { m_storageClassHasBeenSet = true; m_storageClass = value; }
121 
122     /**
123      * <p>The storage class to which you want the object to transition.</p>
124      */
SetStorageClass(TransitionStorageClass && value)125     inline void SetStorageClass(TransitionStorageClass&& value) { m_storageClassHasBeenSet = true; m_storageClass = std::move(value); }
126 
127     /**
128      * <p>The storage class to which you want the object to transition.</p>
129      */
WithStorageClass(const TransitionStorageClass & value)130     inline Transition& WithStorageClass(const TransitionStorageClass& value) { SetStorageClass(value); return *this;}
131 
132     /**
133      * <p>The storage class to which you want the object to transition.</p>
134      */
WithStorageClass(TransitionStorageClass && value)135     inline Transition& WithStorageClass(TransitionStorageClass&& value) { SetStorageClass(std::move(value)); return *this;}
136 
137   private:
138 
139     Aws::Utils::DateTime m_date;
140     bool m_dateHasBeenSet;
141 
142     int m_days;
143     bool m_daysHasBeenSet;
144 
145     TransitionStorageClass m_storageClass;
146     bool m_storageClassHasBeenSet;
147   };
148 
149 } // namespace Model
150 } // namespace S3Crt
151 } // namespace Aws
152