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/AWSVector.h> |
19 | #include <aws/s3/model/Tag.h> |
20 | #include <utility> |
21 | |
22 | namespace Aws |
23 | { |
24 | namespace Utils |
25 | { |
26 | namespace Xml |
27 | { |
28 | class XmlNode; |
29 | } // namespace Xml |
30 | } // namespace Utils |
31 | namespace S3 |
32 | { |
33 | namespace Model |
34 | { |
35 | |
36 | /** |
37 | * <p>Container for <code>TagSet</code> elements.</p><p><h3>See Also:</h3> <a |
38 | * href="http://docs.aws.amazon.com/goto/WebAPI/s3-2006-03-01/Tagging">AWS API |
39 | * Reference</a></p> |
40 | */ |
41 | class AWS_S3_API Tagging |
42 | { |
43 | public: |
44 | Tagging(); |
45 | Tagging(const Aws::Utils::Xml::XmlNode& xmlNode); |
46 | Tagging& operator=(const Aws::Utils::Xml::XmlNode& xmlNode); |
47 | |
48 | void AddToNode(Aws::Utils::Xml::XmlNode& parentNode) const; |
49 | |
50 | |
51 | /** |
52 | * <p>A collection for a set of tags</p> |
53 | */ |
54 | inline const Aws::Vector<Tag>& GetTagSet() const{ return m_tagSet; } |
55 | |
56 | /** |
57 | * <p>A collection for a set of tags</p> |
58 | */ |
59 | inline bool TagSetHasBeenSet() const { return m_tagSetHasBeenSet; } |
60 | |
61 | /** |
62 | * <p>A collection for a set of tags</p> |
63 | */ |
64 | inline void SetTagSet(const Aws::Vector<Tag>& value) { m_tagSetHasBeenSet = true; m_tagSet = value; } |
65 | |
66 | /** |
67 | * <p>A collection for a set of tags</p> |
68 | */ |
69 | inline void SetTagSet(Aws::Vector<Tag>&& value) { m_tagSetHasBeenSet = true; m_tagSet = std::move(value); } |
70 | |
71 | /** |
72 | * <p>A collection for a set of tags</p> |
73 | */ |
74 | inline Tagging& WithTagSet(const Aws::Vector<Tag>& value) { SetTagSet(value); return *this;} |
75 | |
76 | /** |
77 | * <p>A collection for a set of tags</p> |
78 | */ |
79 | inline Tagging& WithTagSet(Aws::Vector<Tag>&& value) { SetTagSet(std::move(value)); return *this;} |
80 | |
81 | /** |
82 | * <p>A collection for a set of tags</p> |
83 | */ |
84 | inline Tagging& AddTagSet(const Tag& value) { m_tagSetHasBeenSet = true; m_tagSet.push_back(value); return *this; } |
85 | |
86 | /** |
87 | * <p>A collection for a set of tags</p> |
88 | */ |
89 | inline Tagging& AddTagSet(Tag&& value) { m_tagSetHasBeenSet = true; m_tagSet.push_back(std::move(value)); return *this; } |
90 | |
91 | private: |
92 | |
93 | Aws::Vector<Tag> m_tagSet; |
94 | bool m_tagSetHasBeenSet; |
95 | }; |
96 | |
97 | } // namespace Model |
98 | } // namespace S3 |
99 | } // namespace Aws |
100 | |