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/codestar-connections/CodeStarconnections_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 CodeStarconnections
22 {
23 namespace Model
24 {
25 
26   /**
27    * <p>A tag is a key-value pair that is used to manage the resource.</p> <p>This
28    * tag is available for use by AWS services that support tags.</p><p><h3>See
29    * Also:</h3>   <a
30    * href="http://docs.aws.amazon.com/goto/WebAPI/codestar-connections-2019-12-01/Tag">AWS
31    * API Reference</a></p>
32    */
33   class AWS_CODESTARCONNECTIONS_API Tag
34   {
35   public:
36     Tag();
37     Tag(Aws::Utils::Json::JsonView jsonValue);
38     Tag& operator=(Aws::Utils::Json::JsonView jsonValue);
39     Aws::Utils::Json::JsonValue Jsonize() const;
40 
41 
42     /**
43      * <p>The tag's key.</p>
44      */
GetKey()45     inline const Aws::String& GetKey() const{ return m_key; }
46 
47     /**
48      * <p>The tag's key.</p>
49      */
KeyHasBeenSet()50     inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
51 
52     /**
53      * <p>The tag's key.</p>
54      */
SetKey(const Aws::String & value)55     inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
56 
57     /**
58      * <p>The tag's key.</p>
59      */
SetKey(Aws::String && value)60     inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
61 
62     /**
63      * <p>The tag's key.</p>
64      */
SetKey(const char * value)65     inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
66 
67     /**
68      * <p>The tag's key.</p>
69      */
WithKey(const Aws::String & value)70     inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
71 
72     /**
73      * <p>The tag's key.</p>
74      */
WithKey(Aws::String && value)75     inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
76 
77     /**
78      * <p>The tag's key.</p>
79      */
WithKey(const char * value)80     inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
81 
82 
83     /**
84      * <p>The tag's value.</p>
85      */
GetValue()86     inline const Aws::String& GetValue() const{ return m_value; }
87 
88     /**
89      * <p>The tag's value.</p>
90      */
ValueHasBeenSet()91     inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
92 
93     /**
94      * <p>The tag's value.</p>
95      */
SetValue(const Aws::String & value)96     inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
97 
98     /**
99      * <p>The tag's value.</p>
100      */
SetValue(Aws::String && value)101     inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
102 
103     /**
104      * <p>The tag's value.</p>
105      */
SetValue(const char * value)106     inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
107 
108     /**
109      * <p>The tag's value.</p>
110      */
WithValue(const Aws::String & value)111     inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
112 
113     /**
114      * <p>The tag's value.</p>
115      */
WithValue(Aws::String && value)116     inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
117 
118     /**
119      * <p>The tag's value.</p>
120      */
WithValue(const char * value)121     inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
122 
123   private:
124 
125     Aws::String m_key;
126     bool m_keyHasBeenSet;
127 
128     Aws::String m_value;
129     bool m_valueHasBeenSet;
130   };
131 
132 } // namespace Model
133 } // namespace CodeStarconnections
134 } // namespace Aws
135