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 <utility>
20
21namespace Aws
22{
23namespace Utils
24{
25namespace Xml
26{
27 class XmlNode;
28} // namespace Xml
29} // namespace Utils
30namespace S3
31{
32namespace Model
33{
34
35 /**
36 * <p>A container of a key value name pair.</p><p><h3>See Also:</h3> <a
37 * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tag">AWS API
38 * Reference</a></p>
39 */
40 class AWS_S3_API Tag
41 {
42 public:
43 Tag();
44 Tag(const Aws::Utils::Xml::XmlNode& xmlNode);
45 Tag& operator=(const Aws::Utils::Xml::XmlNode& xmlNode);
46
47 void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const;
48
49
50 /**
51 * <p>Name of the tag.</p>
52 */
53 inline const Aws::String& GetKey() const{ return m_key; }
54
55 /**
56 * <p>Name of the tag.</p>
57 */
58 inline bool KeyHasBeenSet() const { return m_keyHasBeenSet; }
59
60 /**
61 * <p>Name of the tag.</p>
62 */
63 inline void SetKey(const Aws::String& value) { m_keyHasBeenSet = true; m_key = value; }
64
65 /**
66 * <p>Name of the tag.</p>
67 */
68 inline void SetKey(Aws::String&& value) { m_keyHasBeenSet = true; m_key = std::move(value); }
69
70 /**
71 * <p>Name of the tag.</p>
72 */
73 inline void SetKey(const char* value) { m_keyHasBeenSet = true; m_key.assign(value); }
74
75 /**
76 * <p>Name of the tag.</p>
77 */
78 inline Tag& WithKey(const Aws::String& value) { SetKey(value); return *this;}
79
80 /**
81 * <p>Name of the tag.</p>
82 */
83 inline Tag& WithKey(Aws::String&& value) { SetKey(std::move(value)); return *this;}
84
85 /**
86 * <p>Name of the tag.</p>
87 */
88 inline Tag& WithKey(const char* value) { SetKey(value); return *this;}
89
90
91 /**
92 * <p>Value of the tag.</p>
93 */
94 inline const Aws::String& GetValue() const{ return m_value; }
95
96 /**
97 * <p>Value of the tag.</p>
98 */
99 inline bool ValueHasBeenSet() const { return m_valueHasBeenSet; }
100
101 /**
102 * <p>Value of the tag.</p>
103 */
104 inline void SetValue(const Aws::String& value) { m_valueHasBeenSet = true; m_value = value; }
105
106 /**
107 * <p>Value of the tag.</p>
108 */
109 inline void SetValue(Aws::String&& value) { m_valueHasBeenSet = true; m_value = std::move(value); }
110
111 /**
112 * <p>Value of the tag.</p>
113 */
114 inline void SetValue(const char* value) { m_valueHasBeenSet = true; m_value.assign(value); }
115
116 /**
117 * <p>Value of the tag.</p>
118 */
119 inline Tag& WithValue(const Aws::String& value) { SetValue(value); return *this;}
120
121 /**
122 * <p>Value of the tag.</p>
123 */
124 inline Tag& WithValue(Aws::String&& value) { SetValue(std::move(value)); return *this;}
125
126 /**
127 * <p>Value of the tag.</p>
128 */
129 inline Tag& WithValue(const char* value) { SetValue(value); return *this;}
130
131 private:
132
133 Aws::String m_key;
134 bool m_keyHasBeenSet;
135
136 Aws::String m_value;
137 bool m_valueHasBeenSet;
138 };
139
140} // namespace Model
141} // namespace S3
142} // namespace Aws
143