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/memory/stl/AWSString.h>
9 #include <aws/core/utils/memory/stl/AWSVector.h>
10 #include <aws/s3-crt/model/Tag.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 S3Crt
23 {
24 namespace Model
25 {
26 
27   /**
28    * <p>A container for specifying rule filters. The filters determine the subset of
29    * objects to which the rule applies. This element is required only if you specify
30    * more than one filter. </p> <p>For example:</p> <ul> <li> <p>If you specify both
31    * a <code>Prefix</code> and a <code>Tag</code> filter, wrap these filters in an
32    * <code>And</code> tag. </p> </li> <li> <p>If you specify a filter based on
33    * multiple tags, wrap the <code>Tag</code> elements in an <code>And</code>
34    * tag.</p> </li> </ul><p><h3>See Also:</h3>   <a
35    * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRuleAndOperator">AWS
36    * API Reference</a></p>
37    */
38   class AWS_S3CRT_API ReplicationRuleAndOperator
39   {
40   public:
41     ReplicationRuleAndOperator();
42     ReplicationRuleAndOperator(const Aws::Utils::Xml::XmlNode& xmlNode);
43     ReplicationRuleAndOperator& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
44 
45     void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
46 
47 
48     /**
49      * <p>An object key name prefix that identifies the subset of objects to which the
50      * rule applies.</p>
51      */
GetPrefix()52     inline const Aws::String& GetPrefix() const{ return m_prefix; }
53 
54     /**
55      * <p>An object key name prefix that identifies the subset of objects to which the
56      * rule applies.</p>
57      */
PrefixHasBeenSet()58     inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
59 
60     /**
61      * <p>An object key name prefix that identifies the subset of objects to which the
62      * rule applies.</p>
63      */
SetPrefix(const Aws::String & value)64     inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
65 
66     /**
67      * <p>An object key name prefix that identifies the subset of objects to which the
68      * rule applies.</p>
69      */
SetPrefix(Aws::String && value)70     inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); }
71 
72     /**
73      * <p>An object key name prefix that identifies the subset of objects to which the
74      * rule applies.</p>
75      */
SetPrefix(const char * value)76     inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
77 
78     /**
79      * <p>An object key name prefix that identifies the subset of objects to which the
80      * rule applies.</p>
81      */
WithPrefix(const Aws::String & value)82     inline ReplicationRuleAndOperator& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
83 
84     /**
85      * <p>An object key name prefix that identifies the subset of objects to which the
86      * rule applies.</p>
87      */
WithPrefix(Aws::String && value)88     inline ReplicationRuleAndOperator& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;}
89 
90     /**
91      * <p>An object key name prefix that identifies the subset of objects to which the
92      * rule applies.</p>
93      */
WithPrefix(const char * value)94     inline ReplicationRuleAndOperator& WithPrefix(const char* value) { SetPrefix(value); return *this;}
95 
96 
97     /**
98      * <p>An array of tags containing key and value pairs.</p>
99      */
GetTags()100     inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
101 
102     /**
103      * <p>An array of tags containing key and value pairs.</p>
104      */
TagsHasBeenSet()105     inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
106 
107     /**
108      * <p>An array of tags containing key and value pairs.</p>
109      */
SetTags(const Aws::Vector<Tag> & value)110     inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
111 
112     /**
113      * <p>An array of tags containing key and value pairs.</p>
114      */
SetTags(Aws::Vector<Tag> && value)115     inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
116 
117     /**
118      * <p>An array of tags containing key and value pairs.</p>
119      */
WithTags(const Aws::Vector<Tag> & value)120     inline ReplicationRuleAndOperator& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
121 
122     /**
123      * <p>An array of tags containing key and value pairs.</p>
124      */
WithTags(Aws::Vector<Tag> && value)125     inline ReplicationRuleAndOperator& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
126 
127     /**
128      * <p>An array of tags containing key and value pairs.</p>
129      */
AddTags(const Tag & value)130     inline ReplicationRuleAndOperator& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
131 
132     /**
133      * <p>An array of tags containing key and value pairs.</p>
134      */
AddTags(Tag && value)135     inline ReplicationRuleAndOperator& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
136 
137   private:
138 
139     Aws::String m_prefix;
140     bool m_prefixHasBeenSet;
141 
142     Aws::Vector<Tag> m_tags;
143     bool m_tagsHasBeenSet;
144   };
145 
146 } // namespace Model
147 } // namespace S3Crt
148 } // namespace Aws
149