AWS SDK for C++  1.9.153
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 DataSync
17 {
18 namespace Model
19 {
20 
27  {
28  public:
30 
31  // Service request name is the Operation name which will send this request out,
32  // each operation should has unique request name, so that we can get operation's name from this request.
33  // Note: this is not true for response, multiple operations may have the same response name,
34  // so we can not get operation's name from response.
35  inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
36 
37  Aws::String SerializePayload() const override;
38 
40 
41 
45  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
46 
50  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
51 
55  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
56 
60  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
61 
65  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
66 
70  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
71 
75  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
76 
80  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
81 
82 
86  inline const Aws::Vector<TagListEntry>& GetTags() const{ return m_tags; }
87 
91  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
92 
96  inline void SetTags(const Aws::Vector<TagListEntry>& value) { m_tagsHasBeenSet = true; m_tags = value; }
97 
101  inline void SetTags(Aws::Vector<TagListEntry>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
102 
106  inline TagResourceRequest& WithTags(const Aws::Vector<TagListEntry>& value) { SetTags(value); return *this;}
107 
111  inline TagResourceRequest& WithTags(Aws::Vector<TagListEntry>&& value) { SetTags(std::move(value)); return *this;}
112 
116  inline TagResourceRequest& AddTags(const TagListEntry& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
117 
121  inline TagResourceRequest& AddTags(TagListEntry&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
122 
123  private:
124 
125  Aws::String m_resourceArn;
126  bool m_resourceArnHasBeenSet;
127 
129  bool m_tagsHasBeenSet;
130  };
131 
132 } // namespace Model
133 } // namespace DataSync
134 } // namespace Aws
AWS_DATASYNC_API
#define AWS_DATASYNC_API
Definition: DataSync_EXPORTS.h:28
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::DataSync::Model::TagListEntry
Definition: TagListEntry.h:36
Aws::DataSync::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:45
Aws::DataSync::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
DataSyncRequest.h
Aws::DataSync::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:70
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Aws::DataSync::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< TagListEntry > &&value)
Definition: TagResourceRequest.h:101
Aws::DataSync::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:65
Aws::DataSync::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:91
Aws::DataSync::Model::TagResourceRequest
Definition: TagResourceRequest.h:27
Aws::DataSync::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const TagListEntry &value)
Definition: TagResourceRequest.h:116
Aws::DataSync::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< TagListEntry > &&value)
Definition: TagResourceRequest.h:111
Aws::DataSync::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:35
TagListEntry.h
Aws::DataSync::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< TagListEntry > &value)
Definition: TagResourceRequest.h:96
Aws::DataSync::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:55
AWSString.h
Aws::DataSync::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< TagListEntry > &value)
Definition: TagResourceRequest.h:106
DataSync_EXPORTS.h
Aws::DataSync::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::DataSync::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::DataSync::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:80
Aws::DataSync::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(TagListEntry &&value)
Definition: TagResourceRequest.h:121
Aws::DataSync::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:60
Aws::DataSync::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:50
Aws::DataSync::DataSyncRequest
Definition: DataSyncRequest.h:17
Aws
Definition: AccessManagementClient.h:15
Aws::DataSync::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:75
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::DataSync::Model::TagResourceRequest::GetTags
const Aws::Vector< TagListEntry > & GetTags() const
Definition: TagResourceRequest.h:86