AWS SDK for C++  1.9.20
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace Lightsail
17 {
18 namespace Model
19 {
20 
24  {
25  public:
27 
28  // Service request name is the Operation name which will send this request out,
29  // each operation should has unique request name, so that we can get operation's name from this request.
30  // Note: this is not true for response, multiple operations may have the same response name,
31  // so we can not get operation's name from response.
32  inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
33 
34  Aws::String SerializePayload() const override;
35 
37 
38 
42  inline const Aws::String& GetResourceName() const{ return m_resourceName; }
43 
47  inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; }
48 
52  inline void SetResourceName(const Aws::String& value) { m_resourceNameHasBeenSet = true; m_resourceName = value; }
53 
57  inline void SetResourceName(Aws::String&& value) { m_resourceNameHasBeenSet = true; m_resourceName = std::move(value); }
58 
62  inline void SetResourceName(const char* value) { m_resourceNameHasBeenSet = true; m_resourceName.assign(value); }
63 
67  inline TagResourceRequest& WithResourceName(const Aws::String& value) { SetResourceName(value); return *this;}
68 
72  inline TagResourceRequest& WithResourceName(Aws::String&& value) { SetResourceName(std::move(value)); return *this;}
73 
77  inline TagResourceRequest& WithResourceName(const char* value) { SetResourceName(value); return *this;}
78 
79 
84  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
85 
90  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
91 
96  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
97 
102  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
103 
108  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
109 
114  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
115 
120  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
121 
126  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
127 
128 
132  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
133 
137  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
138 
142  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
143 
147  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
148 
152  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
153 
157  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
158 
162  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
163 
167  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
168 
169  private:
170 
171  Aws::String m_resourceName;
172  bool m_resourceNameHasBeenSet;
173 
174  Aws::String m_resourceArn;
175  bool m_resourceArnHasBeenSet;
176 
177  Aws::Vector<Tag> m_tags;
178  bool m_tagsHasBeenSet;
179  };
180 
181 } // namespace Model
182 } // namespace Lightsail
183 } // namespace Aws
Aws::Lightsail::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:108
Aws::Lightsail::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:147
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::Lightsail::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:157
Aws::Lightsail::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::Lightsail::Model::TagResourceRequest::ResourceNameHasBeenSet
bool ResourceNameHasBeenSet() const
Definition: TagResourceRequest.h:47
Aws::Lightsail::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:96
Aws::Lightsail::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:120
Aws::Lightsail::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
Aws::Lightsail::Model::TagResourceRequest::GetResourceName
const Aws::String & GetResourceName() const
Definition: TagResourceRequest.h:42
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Lightsail::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:102
AWSVector.h
LightsailRequest.h
Aws::Lightsail::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:142
Aws::Lightsail::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:84
Aws::Lightsail::Model::TagResourceRequest::SetResourceName
void SetResourceName(Aws::String &&value)
Definition: TagResourceRequest.h:57
Aws::Lightsail::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:167
Aws::Lightsail::Model::TagResourceRequest::WithResourceName
TagResourceRequest & WithResourceName(const char *value)
Definition: TagResourceRequest.h:77
Aws::Lightsail::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::Lightsail::Model::TagResourceRequest::WithResourceName
TagResourceRequest & WithResourceName(Aws::String &&value)
Definition: TagResourceRequest.h:72
Aws::Lightsail::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::Lightsail::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:137
Tag.h
Aws::Lightsail::LightsailRequest
Definition: LightsailRequest.h:17
Aws::Lightsail::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:152
Aws::Lightsail::Model::Tag
Definition: Tag.h:35
AWSString.h
Aws::Lightsail::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:126
Lightsail_EXPORTS.h
Aws::Lightsail::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::Lightsail::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:132
Aws::Lightsail::Model::TagResourceRequest::SetResourceName
void SetResourceName(const char *value)
Definition: TagResourceRequest.h:62
Aws::Lightsail::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:162
Aws::Lightsail::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:114
Aws::Lightsail::Model::TagResourceRequest::WithResourceName
TagResourceRequest & WithResourceName(const Aws::String &value)
Definition: TagResourceRequest.h:67
Aws
Definition: AccessManagementClient.h:15
Aws::Lightsail::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:90
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::Lightsail::Model::TagResourceRequest::SetResourceName
void SetResourceName(const Aws::String &value)
Definition: TagResourceRequest.h:52
AWS_LIGHTSAIL_API
#define AWS_LIGHTSAIL_API
Definition: Lightsail_EXPORTS.h:28