AWS SDK for C++  0.14.3
AWS SDK for C++
ResourceTag.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 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 #pragma once
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace CloudTrail
31 {
32 namespace Model
33 {
34 
39  {
40  public:
41  ResourceTag();
42  ResourceTag(const Aws::Utils::Json::JsonValue& jsonValue);
43  ResourceTag& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
44  Aws::Utils::Json::JsonValue Jsonize() const;
45 
49  inline const Aws::String& GetResourceId() const{ return m_resourceId; }
50 
54  inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
55 
59  inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
60 
64  inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
65 
69  inline ResourceTag& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
70 
74  inline ResourceTag& WithResourceId(Aws::String&& value) { SetResourceId(value); return *this;}
75 
79  inline ResourceTag& WithResourceId(const char* value) { SetResourceId(value); return *this;}
80 
81 
82  inline const Aws::Vector<Tag>& GetTagsList() const{ return m_tagsList; }
83 
84 
85  inline void SetTagsList(const Aws::Vector<Tag>& value) { m_tagsListHasBeenSet = true; m_tagsList = value; }
86 
87 
88  inline void SetTagsList(Aws::Vector<Tag>&& value) { m_tagsListHasBeenSet = true; m_tagsList = value; }
89 
90 
91  inline ResourceTag& WithTagsList(const Aws::Vector<Tag>& value) { SetTagsList(value); return *this;}
92 
93 
94  inline ResourceTag& WithTagsList(Aws::Vector<Tag>&& value) { SetTagsList(value); return *this;}
95 
96 
97  inline ResourceTag& AddTagsList(const Tag& value) { m_tagsListHasBeenSet = true; m_tagsList.push_back(value); return *this; }
98 
99 
100  inline ResourceTag& AddTagsList(Tag&& value) { m_tagsListHasBeenSet = true; m_tagsList.push_back(value); return *this; }
101 
102  private:
103  Aws::String m_resourceId;
104  bool m_resourceIdHasBeenSet;
105  Aws::Vector<Tag> m_tagsList;
106  bool m_tagsListHasBeenSet;
107  };
108 
109 } // namespace Model
110 } // namespace CloudTrail
111 } // namespace Aws
void SetResourceId(Aws::String &&value)
Definition: ResourceTag.h:59
ResourceTag & AddTagsList(const Tag &value)
Definition: ResourceTag.h:97
const Aws::Vector< Tag > & GetTagsList() const
Definition: ResourceTag.h:82
const Aws::String & GetResourceId() const
Definition: ResourceTag.h:49
ResourceTag & WithTagsList(const Aws::Vector< Tag > &value)
Definition: ResourceTag.h:91
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
ResourceTag & WithResourceId(const char *value)
Definition: ResourceTag.h:79
ResourceTag & WithResourceId(const Aws::String &value)
Definition: ResourceTag.h:69
void SetResourceId(const char *value)
Definition: ResourceTag.h:64
ResourceTag & AddTagsList(Tag &&value)
Definition: ResourceTag.h:100
ResourceTag & WithResourceId(Aws::String &&value)
Definition: ResourceTag.h:74
void SetTagsList(const Aws::Vector< Tag > &value)
Definition: ResourceTag.h:85
void SetTagsList(Aws::Vector< Tag > &&value)
Definition: ResourceTag.h:88
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
#define AWS_CLOUDTRAIL_API
ResourceTag & WithTagsList(Aws::Vector< Tag > &&value)
Definition: ResourceTag.h:94
void SetResourceId(const Aws::String &value)
Definition: ResourceTag.h:54
JSON (JavaScript Object Notation).