AWS SDK for C++  1.9.104
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 ServiceDiscovery
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 
43  inline const Aws::String& GetResourceARN() const{ return m_resourceARN; }
44 
49  inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
50 
55  inline void SetResourceARN(const Aws::String& value) { m_resourceARNHasBeenSet = true; m_resourceARN = value; }
56 
61  inline void SetResourceARN(Aws::String&& value) { m_resourceARNHasBeenSet = true; m_resourceARN = std::move(value); }
62 
67  inline void SetResourceARN(const char* value) { m_resourceARNHasBeenSet = true; m_resourceARN.assign(value); }
68 
73  inline TagResourceRequest& WithResourceARN(const Aws::String& value) { SetResourceARN(value); return *this;}
74 
79  inline TagResourceRequest& WithResourceARN(Aws::String&& value) { SetResourceARN(std::move(value)); return *this;}
80 
85  inline TagResourceRequest& WithResourceARN(const char* value) { SetResourceARN(value); return *this;}
86 
87 
93  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
94 
100  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
101 
107  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
108 
114  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
115 
121  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
122 
128  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
129 
135  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
136 
142  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
143 
144  private:
145 
146  Aws::String m_resourceARN;
147  bool m_resourceARNHasBeenSet;
148 
149  Aws::Vector<Tag> m_tags;
150  bool m_tagsHasBeenSet;
151  };
152 
153 } // namespace Model
154 } // namespace ServiceDiscovery
155 } // namespace Aws
ServiceDiscoveryRequest.h
Aws::ServiceDiscovery::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:135
AWS_SERVICEDISCOVERY_API
#define AWS_SERVICEDISCOVERY_API
Definition: ServiceDiscovery_EXPORTS.h:28
Aws::Http::HeaderValueCollection
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
Aws::ServiceDiscovery::Model::TagResourceRequest
Definition: TagResourceRequest.h:24
Aws::ServiceDiscovery::Model::TagResourceRequest::GetRequestSpecificHeaders
Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
ServiceDiscovery_EXPORTS.h
Aws::ServiceDiscovery::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:107
Aws::ServiceDiscovery::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:114
Aws::ServiceDiscovery::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:100
Aws::ServiceDiscovery::Model::TagResourceRequest::WithResourceARN
TagResourceRequest & WithResourceARN(const Aws::String &value)
Definition: TagResourceRequest.h:73
Aws::ServiceDiscovery::Model::TagResourceRequest::ResourceARNHasBeenSet
bool ResourceARNHasBeenSet() const
Definition: TagResourceRequest.h:49
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::ServiceDiscovery::Model::TagResourceRequest::SetResourceARN
void SetResourceARN(const Aws::String &value)
Definition: TagResourceRequest.h:55
Aws::ServiceDiscovery::Model::TagResourceRequest::WithResourceARN
TagResourceRequest & WithResourceARN(Aws::String &&value)
Definition: TagResourceRequest.h:79
AWSVector.h
Aws::ServiceDiscovery::Model::TagResourceRequest::SetResourceARN
void SetResourceARN(Aws::String &&value)
Definition: TagResourceRequest.h:61
Aws::ServiceDiscovery::Model::TagResourceRequest::SetResourceARN
void SetResourceARN(const char *value)
Definition: TagResourceRequest.h:67
Aws::ServiceDiscovery::Model::TagResourceRequest::GetResourceARN
const Aws::String & GetResourceARN() const
Definition: TagResourceRequest.h:43
Aws::ServiceDiscovery::ServiceDiscoveryRequest
Definition: ServiceDiscoveryRequest.h:17
Aws::ServiceDiscovery::Model::TagResourceRequest::WithResourceARN
TagResourceRequest & WithResourceARN(const char *value)
Definition: TagResourceRequest.h:85
Aws::ServiceDiscovery::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:93
AWSString.h
Aws::ServiceDiscovery::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:142
Aws::ServiceDiscovery::Model::Tag
Definition: Tag.h:33
Aws::ServiceDiscovery::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws
Definition: AccessManagementClient.h:15
Aws::ServiceDiscovery::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:128
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::ServiceDiscovery::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:121
Aws::ServiceDiscovery::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:32
Aws::ServiceDiscovery::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Tag.h