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