AWS SDK for C++  1.9.71
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 Http
17 {
18  class URI;
19 } //namespace Http
20 namespace IoTEvents
21 {
22 namespace Model
23 {
24 
28  {
29  public:
31 
32  // Service request name is the Operation name which will send this request out,
33  // each operation should has unique request name, so that we can get operation's name from this request.
34  // Note: this is not true for response, multiple operations may have the same response name,
35  // so we can not get operation's name from response.
36  inline virtual const char* GetServiceRequestName() const override { return "TagResource"; }
37 
38  Aws::String SerializePayload() const override;
39 
40  void AddQueryStringParameters(Aws::Http::URI& uri) const override;
41 
42 
46  inline const Aws::String& GetResourceArn() const{ return m_resourceArn; }
47 
51  inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
52 
56  inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
57 
61  inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
62 
66  inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
67 
71  inline TagResourceRequest& WithResourceArn(const Aws::String& value) { SetResourceArn(value); return *this;}
72 
76  inline TagResourceRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
77 
81  inline TagResourceRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
82 
83 
87  inline const Aws::Vector<Tag>& GetTags() const{ return m_tags; }
88 
92  inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
93 
97  inline void SetTags(const Aws::Vector<Tag>& value) { m_tagsHasBeenSet = true; m_tags = value; }
98 
102  inline void SetTags(Aws::Vector<Tag>&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); }
103 
107  inline TagResourceRequest& WithTags(const Aws::Vector<Tag>& value) { SetTags(value); return *this;}
108 
112  inline TagResourceRequest& WithTags(Aws::Vector<Tag>&& value) { SetTags(std::move(value)); return *this;}
113 
117  inline TagResourceRequest& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; }
118 
122  inline TagResourceRequest& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; }
123 
124  private:
125 
126  Aws::String m_resourceArn;
127  bool m_resourceArnHasBeenSet;
128 
129  Aws::Vector<Tag> m_tags;
130  bool m_tagsHasBeenSet;
131  };
132 
133 } // namespace Model
134 } // namespace IoTEvents
135 } // namespace Aws
Aws::IoTEvents::Model::TagResourceRequest::TagResourceRequest
TagResourceRequest()
Aws::IoTEvents::Model::TagResourceRequest::GetResourceArn
const Aws::String & GetResourceArn() const
Definition: TagResourceRequest.h:46
Aws::IoTEvents::Model::TagResourceRequest::AddQueryStringParameters
void AddQueryStringParameters(Aws::Http::URI &uri) const override
Aws::IoTEvents::Model::TagResourceRequest::TagsHasBeenSet
bool TagsHasBeenSet() const
Definition: TagResourceRequest.h:92
Aws::Http::URI
Definition: URI.h:32
IoTEventsRequest.h
Aws::IoTEvents::Model::TagResourceRequest::SetTags
void SetTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:102
Aws::IoTEvents::Model::TagResourceRequest::GetTags
const Aws::Vector< Tag > & GetTags() const
Definition: TagResourceRequest.h:87
Aws::IoTEvents::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:71
Aws::IoTEvents::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:61
Aws::IoTEvents::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(const Tag &value)
Definition: TagResourceRequest.h:117
Aws::IoTEvents::Model::TagResourceRequest
Definition: TagResourceRequest.h:28
Aws::IoTEvents::Model::TagResourceRequest::AddTags
TagResourceRequest & AddTags(Tag &&value)
Definition: TagResourceRequest.h:122
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::IoTEvents::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const char *value)
Definition: TagResourceRequest.h:66
AWSVector.h
Aws::IoTEvents::Model::TagResourceRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: TagResourceRequest.h:36
Tag.h
Aws::IoTEvents::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(const char *value)
Definition: TagResourceRequest.h:81
Aws::IoTEvents::Model::TagResourceRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::IoTEvents::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(Aws::Vector< Tag > &&value)
Definition: TagResourceRequest.h:112
Aws::IoTEvents::Model::TagResourceRequest::SetResourceArn
void SetResourceArn(const Aws::String &value)
Definition: TagResourceRequest.h:56
Aws::IoTEvents::Model::TagResourceRequest::WithTags
TagResourceRequest & WithTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:107
AWSString.h
Aws::IoTEvents::IoTEventsRequest
Definition: IoTEventsRequest.h:17
Aws::IoTEvents::Model::TagResourceRequest::WithResourceArn
TagResourceRequest & WithResourceArn(Aws::String &&value)
Definition: TagResourceRequest.h:76
Aws
Definition: AccessManagementClient.h:15
IoTEvents_EXPORTS.h
AWS_IOTEVENTS_API
#define AWS_IOTEVENTS_API
Definition: IoTEvents_EXPORTS.h:28
Aws::IoTEvents::Model::Tag
Definition: Tag.h:32
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::IoTEvents::Model::TagResourceRequest::SetTags
void SetTags(const Aws::Vector< Tag > &value)
Definition: TagResourceRequest.h:97
Aws::IoTEvents::Model::TagResourceRequest::ResourceArnHasBeenSet
bool ResourceArnHasBeenSet() const
Definition: TagResourceRequest.h:51