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 conjunction (logical AND) of predicates, which is used in evaluating a
39 * metrics filter. The operator must have at least two predicates in any
40 * combination, and an object must match all of the predicates for the filter to
41 * apply.</p><p><h3>See Also:</h3> <a
42 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/AnalyticsAndOperator">AWS
43 * API Reference</a></p>
44 */
45 class AWS_S3_API AnalyticsAndOperator
46 {
47 public:
48 AnalyticsAndOperator();
49 AnalyticsAndOperator(const Aws::Utils::Xml::XmlNode& xmlNode);
50 AnalyticsAndOperator& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
51
52 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
53
54
55 /**
56 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
57 * must have to be included in the metrics results.</p>
58 */
59 inline const Aws::String& GetPrefix() const{ return m_prefix; }
60
61 /**
62 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
63 * must have to be included in the metrics results.</p>
64 */
65 inline bool PrefixHasBeenSet() const { return m_prefixHasBeenSet; }
66
67 /**
68 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
69 * must have to be included in the metrics results.</p>
70 */
71 inline void SetPrefix(const Aws::String& value) { m_prefixHasBeenSet = true; m_prefix = value; }
72
73 /**
74 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
75 * must have to be included in the metrics results.</p>
76 */
77 inline void SetPrefix(Aws::String&& value) { m_prefixHasBeenSet = true; m_prefix = std::move(value); }
78
79 /**
80 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
81 * must have to be included in the metrics results.</p>
82 */
83 inline void SetPrefix(const char* value) { m_prefixHasBeenSet = true; m_prefix.assign(value); }
84
85 /**
86 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
87 * must have to be included in the metrics results.</p>
88 */
89 inline AnalyticsAndOperator& WithPrefix(const Aws::String& value) { SetPrefix(value); return *this;}
90
91 /**
92 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
93 * must have to be included in the metrics results.</p>
94 */
95 inline AnalyticsAndOperator& WithPrefix(Aws::String&& value) { SetPrefix(std::move(value)); return *this;}
96
97 /**
98 * <p>The prefix to use when evaluating an AND predicate: The prefix that an object
99 * must have to be included in the metrics results.</p>
100 */
101 inline AnalyticsAndOperator& WithPrefix(const char* value) { SetPrefix(value); return *this;}
102
103
104 /**
105 * <p>The list of tags to use when evaluating an AND predicate.</p>
106 */
107 inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
108
109 /**
110 * <p>The list of tags to use when evaluating an AND predicate.</p>
111 */
112 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
113
114 /**
115 * <p>The list of tags to use when evaluating an AND predicate.</p>
116 */
117 inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
118
119 /**
120 * <p>The list of tags to use when evaluating an AND predicate.</p>
121 */
122 inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
123
124 /**
125 * <p>The list of tags to use when evaluating an AND predicate.</p>
126 */
127 inline AnalyticsAndOperator& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
128
129 /**
130 * <p>The list of tags to use when evaluating an AND predicate.</p>
131 */
132 inline AnalyticsAndOperator& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
133
134 /**
135 * <p>The list of tags to use when evaluating an AND predicate.</p>
136 */
137 inline AnalyticsAndOperator& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
138
139 /**
140 * <p>The list of tags to use when evaluating an AND predicate.</p>
141 */
142 inline AnalyticsAndOperator& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
143
144 private:
145
146 Aws::String m_prefix;
147 bool m_prefixHasBeenSet;
148
149 Aws::Vector<Tag> m_tags;
150 bool m_tagsHasBeenSet;
151 };
152
153} // namespace Model
154} // namespace S3
155} // namespace Aws
156