AWS SDK for C++  1.9.72
AWS SDK for C++
TagResourceRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/waf/WAF_EXPORTS.h>
8 #include <aws/waf/WAFRequest.h>
11 #include <aws/waf/model/Tag.h>
12 #include <utility>
13 
14 namespace Aws
15 {
16 namespace WAF
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 
42  inline const Aws::String& GetResourceARN() const{ return m_resourceARN; }
43 
47  inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
48 
52  inline void SetResourceARN(const Aws::String& value) { m_resourceARNHasBeenSet = true; m_resourceARN = value; }
53 
57  inline void SetResourceARN(Aws::String&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::move(value); }
58 
62  inline void SetResourceARN(const char* value) { m_resourceARNHasBeenSet = true; m_resourceARN.assign(value); }
63 
67  inline TagResourceRequest& WithResourceARN(const Aws::String& value) { SetResourceARN(value); return *this;}
68 
72  inline TagResourceRequest& WithResourceARN(Aws::String&& value) { SetResourceARN(std::move(value)); return *this;}
73 
77  inline TagResourceRequest& WithResourceARN(const char* value) { SetResourceARN(value); return *this;}
78 
79 
83  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
84 
88  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
89 
93  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
94 
98  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
99 
103  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
104 
108  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
109 
113  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
114 
118  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
119 
120  private:
121 
122  Aws::String m_resourceARN;
123  bool m_resourceARNHasBeenSet;
124 
125  Aws::Vector<Tag> m_tags;
126  bool m_tagsHasBeenSet;
127  };
128 
129 } // namespace Model
130 } // namespace WAF
131 } // namespace Aws
Aws::WAF::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:108
Aws::WAF::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
AWS_WAF_API
#define AWS_WAF_API
Definition: WAF_EXPORTS.h:28
Aws::WAF::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::WAF::Model::TagResourceRequest::SetResourceARN
void SetResourceARN(const char *value)
Definition: TagResourceRequest.h:62
Aws::WAF::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:113
AWSVector.h
Aws::WAF::Model::TagResourceRequest::WithResourceARN
TagResourceRequest & WithResourceARN(const char *value)
Definition: TagResourceRequest.h:77
Aws::WAF::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
Aws::WAF::Model::Tag
Definition: Tag.h:47
Aws::WAF::Model::TagResourceRequest::WithResourceARN
TagResourceRequest & WithResourceARN(Aws::String &&value)
Definition: TagResourceRequest.h:72
Aws::WAF::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:88
Tag.h
AWSString.h
Aws::WAF::Model::TagResourceRequest::GetResourceARN
const Aws::String & GetResourceARN() const
Definition: TagResourceRequest.h:42
Aws::WAF::Model::TagResourceRequest::SetResourceARN
void SetResourceARN(Aws::String &&value)
Definition: TagResourceRequest.h:57
Aws::WAF::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
Aws::WAF::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
WAF_EXPORTS.h
Aws::WAF::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:93
Aws::WAF::Model::TagResourceRequest::ResourceARNHasBeenSet
bool ResourceARNHasBeenSet() const
Definition: TagResourceRequest.h:47
WAFRequest.h
Aws
Definition: AccessManagementClient.h:15
Aws::WAF::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:83
Aws::WAF::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:118
Aws::WAF::Model::TagResourceRequest::SetResourceARN
void SetResourceARN(const Aws::String &value)
Definition: TagResourceRequest.h:52
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::WAF::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:98
Aws::WAF::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:103
Aws::WAF::WAFRequest
Definition: WAFRequest.h:17
Aws::WAF::Model::TagResourceRequest::WithResourceARN
TagResourceRequest & WithResourceARN(const Aws::String &value)
Definition: TagResourceRequest.h:67