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/fsx/FSx_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSString.h> 9 #include <utility> 10 11 namespace Aws 12 { 13 namespace Utils 14 { 15 namespace Json 16 { 17 class JsonValue; 18 class JsonView; 19 } // namespace Json 20 } // namespace Utils 21 namespace FSx 22 { 23 namespace Model 24 { 25 26 /** 27 * <p>Specifies a key-value pair for a resource tag.</p><p><h3>See Also:</h3> <a 28 * href="http://docs.aws.amazon.com/goto/WebAPI/fsx-2018-03-01/Tag">AWS API 29 * Reference</a></p> 30 */ 31 class AWS_FSX_API Tag 32 { 33 public: 34 Tag(); 35 Tag(Aws::Utils::Json::JsonView jsonValue); 36 Tag& operator=(Aws::Utils::Json::JsonView jsonValue); 37 Aws::Utils::Json::JsonValue Jsonize() const; 38 39 40 /** 41 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 42 * must be unique for the resource to which they are attached.</p> 43 */ GetKey()44 inline const Aws::String& GetKey() const{ return m_key; } 45 46 /** 47 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 48 * must be unique for the resource to which they are attached.</p> 49 */ KeyHasBeenSet()50 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; } 51 52 /** 53 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 54 * must be unique for the resource to which they are attached.</p> 55 */ SetKey(const Aws::String & value)56 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; } 57 58 /** 59 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 60 * must be unique for the resource to which they are attached.</p> 61 */ SetKey(Aws::String && value)62 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); } 63 64 /** 65 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 66 * must be unique for the resource to which they are attached.</p> 67 */ SetKey(const char * value)68 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); } 69 70 /** 71 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 72 * must be unique for the resource to which they are attached.</p> 73 */ WithKey(const Aws::String & value)74 inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;} 75 76 /** 77 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 78 * must be unique for the resource to which they are attached.</p> 79 */ WithKey(Aws::String && value)80 inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;} 81 82 /** 83 * <p>A value that specifies the <code>TagKey</code>, the name of the tag. Tag keys 84 * must be unique for the resource to which they are attached.</p> 85 */ WithKey(const char * value)86 inline Tag& WithKey(const char* value) { SetKey(value); return *this;} 87 88 89 /** 90 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 91 * corresponding tag key. Tag values can be null and don't have to be unique in a 92 * tag set. For example, you can have a key-value pair in a tag set of 93 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 94 */ GetValue()95 inline const Aws::String& GetValue() const{ return m_value; } 96 97 /** 98 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 99 * corresponding tag key. Tag values can be null and don't have to be unique in a 100 * tag set. For example, you can have a key-value pair in a tag set of 101 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 102 */ ValueHasBeenSet()103 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; } 104 105 /** 106 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 107 * corresponding tag key. Tag values can be null and don't have to be unique in a 108 * tag set. For example, you can have a key-value pair in a tag set of 109 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 110 */ SetValue(const Aws::String & value)111 inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; } 112 113 /** 114 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 115 * corresponding tag key. Tag values can be null and don't have to be unique in a 116 * tag set. For example, you can have a key-value pair in a tag set of 117 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 118 */ SetValue(Aws::String && value)119 inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); } 120 121 /** 122 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 123 * corresponding tag key. Tag values can be null and don't have to be unique in a 124 * tag set. For example, you can have a key-value pair in a tag set of 125 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 126 */ SetValue(const char * value)127 inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); } 128 129 /** 130 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 131 * corresponding tag key. Tag values can be null and don't have to be unique in a 132 * tag set. For example, you can have a key-value pair in a tag set of 133 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 134 */ WithValue(const Aws::String & value)135 inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;} 136 137 /** 138 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 139 * corresponding tag key. Tag values can be null and don't have to be unique in a 140 * tag set. For example, you can have a key-value pair in a tag set of 141 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 142 */ WithValue(Aws::String && value)143 inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;} 144 145 /** 146 * <p>A value that specifies the <code>TagValue</code>, the value assigned to the 147 * corresponding tag key. Tag values can be null and don't have to be unique in a 148 * tag set. For example, you can have a key-value pair in a tag set of 149 * <code>finances : April</code> and also of <code>payroll : April</code>.</p> 150 */ WithValue(const char * value)151 inline Tag& WithValue(const char* value) { SetValue(value); return *this;} 152 153 private: 154 155 Aws::String m_key; 156 bool m_keyHasBeenSet; 157 158 Aws::String m_value; 159 bool m_valueHasBeenSet; 160 }; 161 162 } // namespace Model 163 } // namespace FSx 164 } // namespace Aws 165