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/s3control/S3Control_EXPORTS.h>
8 #include <aws/core/utils/memory/stl/AWSString.h>
9 #include <aws/s3control/model/S3Tag.h>
10 #include <aws/s3control/model/LifecycleRuleAndOperator.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace Utils
16 {
17 namespace Xml
18 {
19   class XmlNode;
20 } // namespace Xml
21 } // namespace Utils
22 namespace S3Control
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>The container for the filter of the lifecycle rule.</p><p><h3>See Also:</h3>
29    * <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/s3control-2018-08-20/LifecycleRuleFilter">AWS
31    * API Reference</a></p>
32    */
33   class AWS_S3CONTROL_API LifecycleRuleFilter
34   {
35   public:
36     LifecycleRuleFilter();
37     LifecycleRuleFilter(const Aws::Utils::Xml::XmlNode& xmlNode);
38     LifecycleRuleFilter& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
39 
40     void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
41 
42 
43     /**
44      * <p>Prefix identifying one or more objects to which the rule applies.</p>
45      *  <p>Replacement must be made for object keys containing special
46      * characters (such as carriage returns) when using XML requests. For more
47      * information, see <a
48      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
49      * XML related object key constraints</a>.</p>
50      */
GetPrefix()51     inline const Aws::String& GetPrefix() const{ return m_prefix; }
52 
53     /**
54      * <p>Prefix identifying one or more objects to which the rule applies.</p>
55      *  <p>Replacement must be made for object keys containing special
56      * characters (such as carriage returns) when using XML requests. For more
57      * information, see <a
58      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
59      * XML related object key constraints</a>.</p>
60      */
PrefixHasBeenSet()61     inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
62 
63     /**
64      * <p>Prefix identifying one or more objects to which the rule applies.</p>
65      *  <p>Replacement must be made for object keys containing special
66      * characters (such as carriage returns) when using XML requests. For more
67      * information, see <a
68      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
69      * XML related object key constraints</a>.</p>
70      */
SetPrefix(const Aws::String & value)71     inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
72 
73     /**
74      * <p>Prefix identifying one or more objects to which the rule applies.</p>
75      *  <p>Replacement must be made for object keys containing special
76      * characters (such as carriage returns) when using XML requests. For more
77      * information, see <a
78      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
79      * XML related object key constraints</a>.</p>
80      */
SetPrefix(Aws::String && value)81     inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); }
82 
83     /**
84      * <p>Prefix identifying one or more objects to which the rule applies.</p>
85      *  <p>Replacement must be made for object keys containing special
86      * characters (such as carriage returns) when using XML requests. For more
87      * information, see <a
88      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
89      * XML related object key constraints</a>.</p>
90      */
SetPrefix(const char * value)91     inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
92 
93     /**
94      * <p>Prefix identifying one or more objects to which the rule applies.</p>
95      *  <p>Replacement must be made for object keys containing special
96      * characters (such as carriage returns) when using XML requests. For more
97      * information, see <a
98      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
99      * XML related object key constraints</a>.</p>
100      */
WithPrefix(const Aws::String & value)101     inline LifecycleRuleFilter& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
102 
103     /**
104      * <p>Prefix identifying one or more objects to which the rule applies.</p>
105      *  <p>Replacement must be made for object keys containing special
106      * characters (such as carriage returns) when using XML requests. For more
107      * information, see <a
108      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
109      * XML related object key constraints</a>.</p>
110      */
WithPrefix(Aws::String && value)111     inline LifecycleRuleFilter& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;}
112 
113     /**
114      * <p>Prefix identifying one or more objects to which the rule applies.</p>
115      *  <p>Replacement must be made for object keys containing special
116      * characters (such as carriage returns) when using XML requests. For more
117      * information, see <a
118      * href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints">
119      * XML related object key constraints</a>.</p>
120      */
WithPrefix(const char * value)121     inline LifecycleRuleFilter& WithPrefix(const char* value) { SetPrefix(value); return *this;}
122 
123 
124 
GetTag()125     inline const S3Tag& GetTag() const{ return m_tag; }
126 
127 
TagHasBeenSet()128     inline bool TagHasBeenSet() const { return m_tagHasBeenSet; }
129 
130 
SetTag(const S3Tag & value)131     inline void SetTag(const S3Tag& value) { m_tagHasBeenSet = true; m_tag = value; }
132 
133 
SetTag(S3Tag && value)134     inline void SetTag(S3Tag&& value) { m_tagHasBeenSet = true; m_tag = std::move(value); }
135 
136 
WithTag(const S3Tag & value)137     inline LifecycleRuleFilter& WithTag(const S3Tag& value) { SetTag(value); return *this;}
138 
139 
WithTag(S3Tag && value)140     inline LifecycleRuleFilter& WithTag(S3Tag&& value) { SetTag(std::move(value)); return *this;}
141 
142 
143     /**
144      * <p>The container for the <code>AND</code> condition for the lifecycle rule.</p>
145      */
GetAnd()146     inline const LifecycleRuleAndOperator& GetAnd() const{ return m_and; }
147 
148     /**
149      * <p>The container for the <code>AND</code> condition for the lifecycle rule.</p>
150      */
AndHasBeenSet()151     inline bool AndHasBeenSet() const { return m_andHasBeenSet; }
152 
153     /**
154      * <p>The container for the <code>AND</code> condition for the lifecycle rule.</p>
155      */
SetAnd(const LifecycleRuleAndOperator & value)156     inline void SetAnd(const LifecycleRuleAndOperator& value) { m_andHasBeenSet = true; m_and = value; }
157 
158     /**
159      * <p>The container for the <code>AND</code> condition for the lifecycle rule.</p>
160      */
SetAnd(LifecycleRuleAndOperator && value)161     inline void SetAnd(LifecycleRuleAndOperator&& value) { m_andHasBeenSet = true; m_and = std::move(value); }
162 
163     /**
164      * <p>The container for the <code>AND</code> condition for the lifecycle rule.</p>
165      */
WithAnd(const LifecycleRuleAndOperator & value)166     inline LifecycleRuleFilter& WithAnd(const LifecycleRuleAndOperator& value) { SetAnd(value); return *this;}
167 
168     /**
169      * <p>The container for the <code>AND</code> condition for the lifecycle rule.</p>
170      */
WithAnd(LifecycleRuleAndOperator && value)171     inline LifecycleRuleFilter& WithAnd(LifecycleRuleAndOperator&& value) { SetAnd(std::move(value)); return *this;}
172 
173   private:
174 
175     Aws::String m_prefix;
176     bool m_prefixHasBeenSet;
177 
178     S3Tag m_tag;
179     bool m_tagHasBeenSet;
180 
181     LifecycleRuleAndOperator m_and;
182     bool m_andHasBeenSet;
183   };
184 
185 } // namespace Model
186 } // namespace S3Control
187 } // namespace Aws
188