AWS SDK for C++  1.9.108
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/sns/SNS_EXPORTS.h>
8 #include <aws/sns/SNSRequest.h>
11 #include <aws/sns/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace SNS
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 
36  protected:
37  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38 
39  public:
40 
44  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
45 
49  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
50 
54  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
55 
59  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
60 
64  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
65 
69  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
70 
74  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
75 
79  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
80 
81 
86  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
87 
92  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
93 
98  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
99 
104  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
105 
110  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
111 
116  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
117 
122  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
123 
128  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
129 
130  private:
131 
132  Aws::String m_resourceArn;
133  bool m_resourceArnHasBeenSet;
134 
135  Aws::Vector<Tag> m_tags;
136  bool m_tagsHasBeenSet;
137  };
138 
139 } // namespace Model
140 } // namespace SNS
141 } // namespace Aws
Aws::SNS::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:59
Aws::Http::URI
Definition: URI.h:32
Aws::SNS::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:49
Aws::SNS::Model::Tag
Definition: Tag.h:32
Aws::SNS::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:92
Aws::SNS::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
AWSVector.h
Aws::SNS::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::SNS::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:74
Aws::SNS::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::SNS::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:104
SNSRequest.h
Aws::SNS::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:44
Aws::SNS::SNSRequest
Definition: SNSRequest.h:17
Aws::SNS::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:64
AWSString.h
Aws::SNS::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:86
Aws::SNS::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
Aws::SNS::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:128
Aws::SNS::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:69
Aws::CostExplorer::Model::SubscriberType::NOT_SET
@ NOT_SET
Aws::SNS::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:116
AWS_SNS_API
#define AWS_SNS_API
Definition: SNS_EXPORTS.h:28
SNS_EXPORTS.h
Aws
Definition: AccessManagementClient.h:15
Aws::SNS::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:54
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SNS::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:98
Aws::SNS::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:122
Aws::SNS::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:110
Tag.h
Aws::SNS::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:79
Aws::SNS::Model::TagResourceRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override