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/macie2/Macie2_EXPORTS.h> 8 #include <aws/macie2/model/JobComparator.h> 9 #include <aws/core/utils/memory/stl/AWSString.h> 10 #include <aws/core/utils/memory/stl/AWSVector.h> 11 #include <aws/macie2/model/TagTarget.h> 12 #include <aws/macie2/model/TagValuePair.h> 13 #include <utility> 14 15 namespace Aws 16 { 17 namespace Utils 18 { 19 namespace Json 20 { 21 class JsonValue; 22 class JsonView; 23 } // namespace Json 24 } // namespace Utils 25 namespace Macie2 26 { 27 namespace Model 28 { 29 30 /** 31 * <p>Specifies a tag-based condition that determines whether an S3 object is 32 * included or excluded from a classification job.</p><p><h3>See Also:</h3> <a 33 * href="http://docs.aws.amazon.com/goto/WebAPI/macie2-2020-01-01/TagScopeTerm">AWS 34 * API Reference</a></p> 35 */ 36 class AWS_MACIE2_API TagScopeTerm 37 { 38 public: 39 TagScopeTerm(); 40 TagScopeTerm(Aws::Utils::Json::JsonView jsonValue); 41 TagScopeTerm& operator=(Aws::Utils::Json::JsonView jsonValue); 42 Aws::Utils::Json::JsonValue Jsonize() const; 43 44 45 /** 46 * <p>The operator to use in the condition. Valid values are EQ (equals) or NE (not 47 * equals).</p> 48 */ GetComparator()49 inline const JobComparator& GetComparator() const{ return m_comparator; } 50 51 /** 52 * <p>The operator to use in the condition. Valid values are EQ (equals) or NE (not 53 * equals).</p> 54 */ ComparatorHasBeenSet()55 inline bool ComparatorHasBeenSet() const { return m_comparatorHasBeenSet; } 56 57 /** 58 * <p>The operator to use in the condition. Valid values are EQ (equals) or NE (not 59 * equals).</p> 60 */ SetComparator(const JobComparator & value)61 inline void SetComparator(const JobComparator& value) { m_comparatorHasBeenSet = true; m_comparator = value; } 62 63 /** 64 * <p>The operator to use in the condition. Valid values are EQ (equals) or NE (not 65 * equals).</p> 66 */ SetComparator(JobComparator && value)67 inline void SetComparator(JobComparator&& value) { m_comparatorHasBeenSet = true; m_comparator = std::move(value); } 68 69 /** 70 * <p>The operator to use in the condition. Valid values are EQ (equals) or NE (not 71 * equals).</p> 72 */ WithComparator(const JobComparator & value)73 inline TagScopeTerm& WithComparator(const JobComparator& value) { SetComparator(value); return *this;} 74 75 /** 76 * <p>The operator to use in the condition. Valid values are EQ (equals) or NE (not 77 * equals).</p> 78 */ WithComparator(JobComparator && value)79 inline TagScopeTerm& WithComparator(JobComparator&& value) { SetComparator(std::move(value)); return *this;} 80 81 82 /** 83 * <p>The object property to use in the condition. The only valid value is TAG.</p> 84 */ GetKey()85 inline const Aws::String& GetKey() const{ return m_key; } 86 87 /** 88 * <p>The object property to use in the condition. The only valid value is TAG.</p> 89 */ KeyHasBeenSet()90 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } 91 92 /** 93 * <p>The object property to use in the condition. The only valid value is TAG.</p> 94 */ SetKey(const Aws::String & value)95 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } 96 97 /** 98 * <p>The object property to use in the condition. The only valid value is TAG.</p> 99 */ SetKey(Aws::String && value)100 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } 101 102 /** 103 * <p>The object property to use in the condition. The only valid value is TAG.</p> 104 */ SetKey(const char * value)105 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } 106 107 /** 108 * <p>The object property to use in the condition. The only valid value is TAG.</p> 109 */ WithKey(const Aws::String & value)110 inline TagScopeTerm& WithKey(const Aws::String& value) { SetKey(value); return *this;} 111 112 /** 113 * <p>The object property to use in the condition. The only valid value is TAG.</p> 114 */ WithKey(Aws::String && value)115 inline TagScopeTerm& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} 116 117 /** 118 * <p>The object property to use in the condition. The only valid value is TAG.</p> 119 */ WithKey(const char * value)120 inline TagScopeTerm& WithKey(const char* value) { SetKey(value); return *this;} 121 122 123 /** 124 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 125 * only tag keys in a condition, specify the keys in this array and set the value 126 * for each associated tag value to an empty string.</p> 127 */ GetTagValues()128 inline const Aws::Vector<TagValuePair>& GetTagValues() const{ return m_tagValues; } 129 130 /** 131 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 132 * only tag keys in a condition, specify the keys in this array and set the value 133 * for each associated tag value to an empty string.</p> 134 */ TagValuesHasBeenSet()135 inline bool TagValuesHasBeenSet() const { return m_tagValuesHasBeenSet; } 136 137 /** 138 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 139 * only tag keys in a condition, specify the keys in this array and set the value 140 * for each associated tag value to an empty string.</p> 141 */ SetTagValues(const Aws::Vector<TagValuePair> & value)142 inline void SetTagValues(const Aws::Vector<TagValuePair>& value) { m_tagValuesHasBeenSet = true; m_tagValues = value; } 143 144 /** 145 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 146 * only tag keys in a condition, specify the keys in this array and set the value 147 * for each associated tag value to an empty string.</p> 148 */ SetTagValues(Aws::Vector<TagValuePair> && value)149 inline void SetTagValues(Aws::Vector<TagValuePair>&& value) { m_tagValuesHasBeenSet = true; m_tagValues = std::move(value); } 150 151 /** 152 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 153 * only tag keys in a condition, specify the keys in this array and set the value 154 * for each associated tag value to an empty string.</p> 155 */ WithTagValues(const Aws::Vector<TagValuePair> & value)156 inline TagScopeTerm& WithTagValues(const Aws::Vector<TagValuePair>& value) { SetTagValues(value); return *this;} 157 158 /** 159 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 160 * only tag keys in a condition, specify the keys in this array and set the value 161 * for each associated tag value to an empty string.</p> 162 */ WithTagValues(Aws::Vector<TagValuePair> && value)163 inline TagScopeTerm& WithTagValues(Aws::Vector<TagValuePair>&& value) { SetTagValues(std::move(value)); return *this;} 164 165 /** 166 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 167 * only tag keys in a condition, specify the keys in this array and set the value 168 * for each associated tag value to an empty string.</p> 169 */ AddTagValues(const TagValuePair & value)170 inline TagScopeTerm& AddTagValues(const TagValuePair& value) { m_tagValuesHasBeenSet = true; m_tagValues.push_back(value); return *this; } 171 172 /** 173 * <p>The tag keys or tag key and value pairs to use in the condition. To specify 174 * only tag keys in a condition, specify the keys in this array and set the value 175 * for each associated tag value to an empty string.</p> 176 */ AddTagValues(TagValuePair && value)177 inline TagScopeTerm& AddTagValues(TagValuePair&& value) { m_tagValuesHasBeenSet = true; m_tagValues.push_back(std::move(value)); return *this; } 178 179 180 /** 181 * <p>The type of object to apply the condition to.</p> 182 */ GetTarget()183 inline const TagTarget& GetTarget() const{ return m_target; } 184 185 /** 186 * <p>The type of object to apply the condition to.</p> 187 */ TargetHasBeenSet()188 inline bool TargetHasBeenSet() const { return m_targetHasBeenSet; } 189 190 /** 191 * <p>The type of object to apply the condition to.</p> 192 */ SetTarget(const TagTarget & value)193 inline void SetTarget(const TagTarget& value) { m_targetHasBeenSet = true; m_target = value; } 194 195 /** 196 * <p>The type of object to apply the condition to.</p> 197 */ SetTarget(TagTarget && value)198 inline void SetTarget(TagTarget&& value) { m_targetHasBeenSet = true; m_target = std::move(value); } 199 200 /** 201 * <p>The type of object to apply the condition to.</p> 202 */ WithTarget(const TagTarget & value)203 inline TagScopeTerm& WithTarget(const TagTarget& value) { SetTarget(value); return *this;} 204 205 /** 206 * <p>The type of object to apply the condition to.</p> 207 */ WithTarget(TagTarget && value)208 inline TagScopeTerm& WithTarget(TagTarget&& value) { SetTarget(std::move(value)); return *this;} 209 210 private: 211 212 JobComparator m_comparator; 213 bool m_comparatorHasBeenSet; 214 215 Aws::String m_key; 216 bool m_keyHasBeenSet; 217 218 Aws::Vector<TagValuePair> m_tagValues; 219 bool m_tagValuesHasBeenSet; 220 221 TagTarget m_target; 222 bool m_targetHasBeenSet; 223 }; 224 225 } // namespace Model 226 } // namespace Macie2 227 } // namespace Aws 228