1/*
2* Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3*
4* Licensed under the Apache License, Version 2.0 (the "License").
5* You may not use this file except in compliance with the License.
6* A copy of the License is located at
7*
8* http://aws.amazon.com/apache2.0
9*
10* or in the "license" file accompanying this file. This file is distributed
11* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12* express or implied. See the License for the specific language governing
13* permissions and limitations under the License.
14*/
15
16#pragma once
17#include <aws/s3/S3_EXPORTS.h>
18#include <aws/core/utils/memory/stl/AWSString.h>
19#include <aws/core/utils/memory/stl/AWSVector.h>
20#include <aws/s3/model/Tag.h>
21#include <utility>
22
23namespace Aws
24{
25namespace Utils
26{
27namespace Xml
28{
29 class XmlNode;
30} // namespace Xml
31} // namespace Utils
32namespace S3
33{
34namespace Model
35{
36
37 /**
38 * <p>A container for specifying rule filters. The filters determine the subset of
39 * objects to which the rule applies. This element is required only if you specify
40 * more than one filter. </p> <p>For example:</p> <ul> <li> <p>If you specify both
41 * a <code>Prefix</code> and a <code>Tag</code> filter, wrap these filters in an
42 * <code>And</code> tag. </p> </li> <li> <p>If you specify a filter based on
43 * multiple tags, wrap the <code>Tag</code> elements in an <code>And</code> tag</p>
44 * </li> </ul><p><h3>See Also:</h3> <a
45 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/ReplicationRuleAndOperator">AWS
46 * API Reference</a></p>
47 */
48 class AWS_S3_API ReplicationRuleAndOperator
49 {
50 public:
51 ReplicationRuleAndOperator();
52 ReplicationRuleAndOperator(const Aws::Utils::Xml::XmlNode& xmlNode);
53 ReplicationRuleAndOperator& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
54
55 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
56
57
58 /**
59 * <p>An object key name prefix that identifies the subset of objects to which the
60 * rule applies.</p>
61 */
62 inline const Aws::String& GetPrefix() const{ return m_prefix; }
63
64 /**
65 * <p>An object key name prefix that identifies the subset of objects to which the
66 * rule applies.</p>
67 */
68 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
69
70 /**
71 * <p>An object key name prefix that identifies the subset of objects to which the
72 * rule applies.</p>
73 */
74 inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
75
76 /**
77 * <p>An object key name prefix that identifies the subset of objects to which the
78 * rule applies.</p>
79 */
80 inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); }
81
82 /**
83 * <p>An object key name prefix that identifies the subset of objects to which the
84 * rule applies.</p>
85 */
86 inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
87
88 /**
89 * <p>An object key name prefix that identifies the subset of objects to which the
90 * rule applies.</p>
91 */
92 inline ReplicationRuleAndOperator& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
93
94 /**
95 * <p>An object key name prefix that identifies the subset of objects to which the
96 * rule applies.</p>
97 */
98 inline ReplicationRuleAndOperator& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;}
99
100 /**
101 * <p>An object key name prefix that identifies the subset of objects to which the
102 * rule applies.</p>
103 */
104 inline ReplicationRuleAndOperator& WithPrefix(const char* value) { SetPrefix(value); return *this;}
105
106
107 /**
108 * <p>An array of tags containing key and value pairs.</p>
109 */
110 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
111
112 /**
113 * <p>An array of tags containing key and value pairs.</p>
114 */
115 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
116
117 /**
118 * <p>An array of tags containing key and value pairs.</p>
119 */
120 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
121
122 /**
123 * <p>An array of tags containing key and value pairs.</p>
124 */
125 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
126
127 /**
128 * <p>An array of tags containing key and value pairs.</p>
129 */
130 inline ReplicationRuleAndOperator& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
131
132 /**
133 * <p>An array of tags containing key and value pairs.</p>
134 */
135 inline ReplicationRuleAndOperator& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
136
137 /**
138 * <p>An array of tags containing key and value pairs.</p>
139 */
140 inline ReplicationRuleAndOperator& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
141
142 /**
143 * <p>An array of tags containing key and value pairs.</p>
144 */
145 inline ReplicationRuleAndOperator& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
146
147 private:
148
149 Aws::String m_prefix;
150 bool m_prefixHasBeenSet;
151
152 Aws::Vector<Tag> m_tags;
153 bool m_tagsHasBeenSet;
154 };
155
156} // namespace Model
157} // namespace S3
158} // namespace Aws
159