AWS SDK for C++  1.9.16
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace CodeCommit
16 {
17 namespace Model
18 {
19 
23  {
24  public:
26 
27  // Service request name is the Operation name which will send this request out,
28  // each operation should has unique request name, so that we can get operation's name from this request.
29  // Note: this is not true for response, multiple operations may have the same response name,
30  // so we can not get operation's name from response.
31  inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
32 
33  Aws::String SerializePayload() const override;
34 
36 
37 
42  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
43 
48  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
49 
54  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
55 
60  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
61 
66  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
67 
72  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
73 
78  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
79 
84  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
85 
86 
90  inline const Aws::Map<Aws::String, Aws::String>& GetTags() const{ return m_tags; }
91 
95  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
96 
100  inline void SetTags(const Aws::Map<Aws::String, Aws::String>& value) { m_tagsHasBeenSet = true; m_tags = value; }
101 
105  inline void SetTags(Aws::Map<Aws::String, Aws::String>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
106 
110  inline TagResourceRequest& WithTags(const Aws::Map<Aws::String, Aws::String>& value) { SetTags(value); return *this;}
111 
115  inline TagResourceRequest& WithTags(Aws::Map<Aws::String, Aws::String>&& value) { SetTags(std::move(value)); return *this;}
116 
120  inline TagResourceRequest& AddTags(const Aws::String& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
121 
125  inline TagResourceRequest& AddTags(Aws::String&& key, const Aws::String& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
126 
130  inline TagResourceRequest& AddTags(const Aws::String& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
131 
135  inline TagResourceRequest& AddTags(Aws::String&& key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), std::move(value)); return *this; }
136 
140  inline TagResourceRequest& AddTags(const char* key, Aws::String&& value) { m_tagsHasBeenSet = true; m_tags.emplace(key, std::move(value)); return *this; }
141 
145  inline TagResourceRequest& AddTags(Aws::String&& key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(std::move(key), value); return *this; }
146 
150  inline TagResourceRequest& AddTags(const char* key, const char* value) { m_tagsHasBeenSet = true; m_tags.emplace(key, value); return *this; }
151 
152  private:
153 
154  Aws::String m_resourceArn;
155  bool m_resourceArnHasBeenSet;
156 
158  bool m_tagsHasBeenSet;
159  };
160 
161 } // namespace Model
162 } // namespace CodeCommit
163 } // namespace Aws
Aws::CodeCommit::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:60
CodeCommit_EXPORTS.h
Aws::CodeCommit::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:42
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const Aws::String &value)
Definition: TagResourceRequest.h:125
Aws::CodeCommit::Model::TagResourceRequest::SetTags
void SetTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:105
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, const char *value)
Definition: TagResourceRequest.h:145
Aws::CodeCommit::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:100
Aws::CodeCommit::CodeCommitRequest
Definition: CodeCommitRequest.h:17
CodeCommitRequest.h
Aws::CodeCommit::Model::TagResourceRequest
Definition: TagResourceRequest.h:23
Aws::CodeCommit::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:54
Aws::CodeCommit::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:84
Aws::CodeCommit::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:66
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Aws::String &&key, Aws::String &&value)
Definition: TagResourceRequest.h:135
Aws::CodeCommit::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:95
Aws::CodeCommit::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:72
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, Aws::String &&value)
Definition: TagResourceRequest.h:140
Aws::CodeCommit::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
AWSString.h
AWS_CODECOMMIT_API
#define AWS_CODECOMMIT_API
Definition: CodeCommit_EXPORTS.h:28
Aws::CodeCommit::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Map< Aws::String, Aws::String > &&value)
Definition: TagResourceRequest.h:115
Aws::CodeCommit::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws
Definition: AccessManagementClient.h:15
Aws::CodeCommit::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:48
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, Aws::String &&value)
Definition: TagResourceRequest.h:130
Aws::CodeCommit::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:31
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Aws::String &key, const Aws::String &value)
Definition: TagResourceRequest.h:120
Aws::CodeCommit::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:78
Aws::CodeCommit::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const char *key, const char *value)
Definition: TagResourceRequest.h:150
Aws::CodeCommit::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
AWSMap.h
Aws::CodeCommit::Model::TagResourceRequest::GetTags
const Aws::Map< Aws::String, Aws::String > & GetTags() const
Definition: TagResourceRequest.h:90
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
Aws::CodeCommit::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Map< Aws::String, Aws::String > &value)
Definition: TagResourceRequest.h:110