AWS SDK for C++  1.9.131
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <aws/forecast/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace ForecastService
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 
45  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
46 
53  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
54 
61  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
62 
69  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
70 
77  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
78 
85  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
86 
93  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
94 
101  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
102 
103 
124  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
125 
146  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
147 
168  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
169 
190  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
191 
212  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
213 
234  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
235 
256  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
257 
278  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
279 
280  private:
281 
282  Aws::String m_resourceArn;
283  bool m_resourceArnHasBeenSet;
284 
285  Aws::Vector<Tag> m_tags;
286  bool m_tagsHasBeenSet;
287  };
288 
289 } // namespace Model
290 } // namespace ForecastService
291 } // namespace Aws
Aws::ForecastService::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:93
Aws::ForecastService::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:190
Aws::ForecastService::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:77
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::ForecastService::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:146
ForecastService_EXPORTS.h
Aws::ForecastService::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:101
Aws::ForecastService::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:234
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Aws::ForecastService::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:212
Aws::ForecastService::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:69
ForecastServiceRequest.h
AWSString.h
Aws::ForecastService::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:168
Aws::ForecastService::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::ForecastService::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:45
Tag.h
Aws::ForecastService::ForecastServiceRequest
Definition: ForecastServiceRequest.h:17
Aws::ForecastService::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws
Definition: AccessManagementClient.h:15
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::ForecastService::Model::Tag
Definition: Tag.h:50
Aws::ForecastService::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::ForecastService::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
AWS_FORECASTSERVICE_API
#define AWS_FORECASTSERVICE_API
Definition: ForecastService_EXPORTS.h:28
Aws::ForecastService::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:256
Aws::ForecastService::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::ForecastService::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:85
Aws::ForecastService::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:278
Aws::ForecastService::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:124
Aws::ForecastService::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:53
Aws::ForecastService::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:61