AWS SDK for C++  1.8.95
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 CloudHSMV2
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  Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
37 
38 
43  inline const Aws::String& GetResourceId() const{ return m_resourceId; }
44 
49  inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
50 
55  inline void SetResourceId(const Aws::String& value) { m_resourceIdHasBeenSet = true; m_resourceId = value; }
56 
61  inline void SetResourceId(Aws::String&& value) { m_resourceIdHasBeenSet = true; m_resourceId = std::move(value); }
62 
67  inline void SetResourceId(const char* value) { m_resourceIdHasBeenSet = true; m_resourceId.assign(value); }
68 
73  inline TagResourceRequest& WithResourceId(const Aws::String& value) { SetResourceId(value); return *this;}
74 
79  inline TagResourceRequest& WithResourceId(Aws::String&& value) { SetResourceId(std::move(value)); return *this;}
80 
85  inline TagResourceRequest& WithResourceId(const char* value) { SetResourceId(value); return *this;}
86 
87 
91  inline const Aws::Vector<Tag>& GetTagList() const{ return m_tagList; }
92 
96  inline bool TagListHasBeenSet() const { return m_tagListHasBeenSet; }
97 
101  inline void SetTagList(const Aws::Vector<Tag>& value) { m_tagListHasBeenSet = true; m_tagList = value; }
102 
106  inline void SetTagList(Aws::Vector<Tag>&& value) { m_tagListHasBeenSet = true; m_tagList = std::move(value); }
107 
111  inline TagResourceRequest& WithTagList(const Aws::Vector<Tag>& value) { SetTagList(value); return *this;}
112 
116  inline TagResourceRequest& WithTagList(Aws::Vector<Tag>&& value) { SetTagList(std::move(value)); return *this;}
117 
121  inline TagResourceRequest& AddTagList(const Tag& value) { m_tagListHasBeenSet = true; m_tagList.push_back(value); return *this; }
122 
126  inline TagResourceRequest& AddTagList(Tag&& value) { m_tagListHasBeenSet = true; m_tagList.push_back(std::move(value)); return *this; }
127 
128  private:
129 
130  Aws::String m_resourceId;
131  bool m_resourceIdHasBeenSet;
132 
133  Aws::Vector<Tag> m_tagList;
134  bool m_tagListHasBeenSet;
135  };
136 
137 } // namespace Model
138 } // namespace CloudHSMV2
139 } // namespace Aws
#define AWS_CLOUDHSMV2_API
void SetResourceId(const Aws::String &value)
virtual const char * GetServiceRequestName() const override
TagResourceRequest & WithResourceId(Aws::String &&value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
Definition: HttpTypes.h:53
TagResourceRequest & AddTagList(const Tag &value)
TagResourceRequest & WithTagList(const Aws::Vector< Tag > &value)
TagResourceRequest & WithResourceId(const Aws::String &value)
TagResourceRequest & WithResourceId(const char *value)
void SetTagList(const Aws::Vector< Tag > &value)
void SetTagList(Aws::Vector< Tag > &&value)
TagResourceRequest & AddTagList(Tag &&value)
const Aws::Vector< Tag > & GetTagList() const
TagResourceRequest & WithTagList(Aws::Vector< Tag > &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97