AWS SDK for C++  1.9.123
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/kms/KMS_EXPORTS.h>
8 #include <aws/kms/KMSRequest.h>
11 #include <aws/kms/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace KMS
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 
48  inline const Aws::String& GetKeyId() const{ return m_keyId; }
49 
59  inline bool KeyIdHasBeenSet() const { return m_keyIdHasBeenSet; }
60 
70  inline void SetKeyId(const Aws::String& value) { m_keyIdHasBeenSet = true; m_keyId = value; }
71 
81  inline void SetKeyId(Aws::String&& value) { m_keyIdHasBeenSet = true; m_keyId = std::move(value); }
82 
92  inline void SetKeyId(const char* value) { m_keyIdHasBeenSet = true; m_keyId.assign(value); }
93 
103  inline TagResourceRequest& WithKeyId(const Aws::String& value) { SetKeyId(value); return *this;}
104 
114  inline TagResourceRequest& WithKeyId(Aws::String&& value) { SetKeyId(std::move(value)); return *this;}
115 
125  inline TagResourceRequest& WithKeyId(const char* value) { SetKeyId(value); return *this;}
126 
127 
135  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
136 
144  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
145 
153  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
154 
162  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
163 
171  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
172 
180  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
181 
189  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
190 
198  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
199 
200  private:
201 
202  Aws::String m_keyId;
203  bool m_keyIdHasBeenSet;
204 
205  Aws::Vector<Tag> m_tags;
206  bool m_tagsHasBeenSet;
207  };
208 
209 } // namespace Model
210 } // namespace KMS
211 } // namespace Aws
Aws::KMS::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:162
Tag.h
Aws::KMS::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::KMS::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:153
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::KMS::Model::Tag
Definition: Tag.h:37
Aws::KMS::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:180
Aws::KMS::Model::TagResourceRequest::SetKeyId
void SetKeyId(const Aws::String &value)
Definition: TagResourceRequest.h:70
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::KMS::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWSVector.h
KMSRequest.h
Aws::KMS::Model::TagResourceRequest::SetKeyId
void SetKeyId(Aws::String &&value)
Definition: TagResourceRequest.h:81
Aws::KMS::KMSRequest
Definition: KMSRequest.h:17
Aws::KMS::Model::TagResourceRequest::SetKeyId
void SetKeyId(const char *value)
Definition: TagResourceRequest.h:92
Aws::KMS::Model::TagResourceRequest::WithKeyId
TagResourceRequest & WithKeyId(const char *value)
Definition: TagResourceRequest.h:125
Aws::KMS::Model::TagResourceRequest::WithKeyId
TagResourceRequest & WithKeyId(Aws::String &&value)
Definition: TagResourceRequest.h:114
Aws::KMS::Model::TagResourceRequest::GetKeyId
const Aws::String & GetKeyId() const
Definition: TagResourceRequest.h:48
AWS_KMS_API
#define AWS_KMS_API
Definition: KMS_EXPORTS.h:28
Aws::KMS::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::KMS::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:135
AWSString.h
Aws::KMS::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:171
Aws::KMS::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:144
Aws::CodePipeline::Model::EncryptionKeyType::NOT_SET
@ NOT_SET
Aws::KMS::Model::TagResourceRequest::WithKeyId
TagResourceRequest & WithKeyId(const Aws::String &value)
Definition: TagResourceRequest.h:103
Aws
Definition: AccessManagementClient.h:15
KMS_EXPORTS.h
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::KMS::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::KMS::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
Aws::KMS::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:198
Aws::KMS::Model::TagResourceRequest::KeyIdHasBeenSet
bool KeyIdHasBeenSet() const
Definition: TagResourceRequest.h:59
Aws::KMS::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:189