AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
SubscribeRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/sns/SNSRequest.h>
10#include <aws/sns/SNS_EXPORTS.h>
11
12#include <utility>
13
14namespace Aws {
15namespace SNS {
16namespace Model {
17
24 public:
25 AWS_SNS_API SubscribeRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "Subscribe"; }
32
33 AWS_SNS_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_SNS_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
43 inline const Aws::String& GetTopicArn() const { return m_topicArn; }
44 inline bool TopicArnHasBeenSet() const { return m_topicArnHasBeenSet; }
45 template <typename TopicArnT = Aws::String>
46 void SetTopicArn(TopicArnT&& value) {
47 m_topicArnHasBeenSet = true;
48 m_topicArn = std::forward<TopicArnT>(value);
49 }
50 template <typename TopicArnT = Aws::String>
51 SubscribeRequest& WithTopicArn(TopicArnT&& value) {
52 SetTopicArn(std::forward<TopicArnT>(value));
53 return *this;
54 }
56
58
72 inline const Aws::String& GetProtocol() const { return m_protocol; }
73 inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
74 template <typename ProtocolT = Aws::String>
75 void SetProtocol(ProtocolT&& value) {
76 m_protocolHasBeenSet = true;
77 m_protocol = std::forward<ProtocolT>(value);
78 }
79 template <typename ProtocolT = Aws::String>
80 SubscribeRequest& WithProtocol(ProtocolT&& value) {
81 SetProtocol(std::forward<ProtocolT>(value));
82 return *this;
83 }
85
87
104 inline const Aws::String& GetEndpoint() const { return m_endpoint; }
105 inline bool EndpointHasBeenSet() const { return m_endpointHasBeenSet; }
106 template <typename EndpointT = Aws::String>
107 void SetEndpoint(EndpointT&& value) {
108 m_endpointHasBeenSet = true;
109 m_endpoint = std::forward<EndpointT>(value);
110 }
111 template <typename EndpointT = Aws::String>
112 SubscribeRequest& WithEndpoint(EndpointT&& value) {
113 SetEndpoint(std::forward<EndpointT>(value));
114 return *this;
115 }
117
119
165 inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const { return m_attributes; }
166 inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
167 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
168 void SetAttributes(AttributesT&& value) {
169 m_attributesHasBeenSet = true;
170 m_attributes = std::forward<AttributesT>(value);
171 }
172 template <typename AttributesT = Aws::Map<Aws::String, Aws::String>>
173 SubscribeRequest& WithAttributes(AttributesT&& value) {
174 SetAttributes(std::forward<AttributesT>(value));
175 return *this;
176 }
177 template <typename AttributesKeyT = Aws::String, typename AttributesValueT = Aws::String>
178 SubscribeRequest& AddAttributes(AttributesKeyT&& key, AttributesValueT&& value) {
179 m_attributesHasBeenSet = true;
180 m_attributes.emplace(std::forward<AttributesKeyT>(key), std::forward<AttributesValueT>(value));
181 return *this;
182 }
184
186
197 inline bool GetReturnSubscriptionArn() const { return m_returnSubscriptionArn; }
198 inline bool ReturnSubscriptionArnHasBeenSet() const { return m_returnSubscriptionArnHasBeenSet; }
199 inline void SetReturnSubscriptionArn(bool value) {
200 m_returnSubscriptionArnHasBeenSet = true;
201 m_returnSubscriptionArn = value;
202 }
205 return *this;
206 }
208 private:
209 Aws::String m_topicArn;
210
211 Aws::String m_protocol;
212
213 Aws::String m_endpoint;
214
216
217 bool m_returnSubscriptionArn{false};
218 bool m_topicArnHasBeenSet = false;
219 bool m_protocolHasBeenSet = false;
220 bool m_endpointHasBeenSet = false;
221 bool m_attributesHasBeenSet = false;
222 bool m_returnSubscriptionArnHasBeenSet = false;
223};
224
225} // namespace Model
226} // namespace SNS
227} // namespace Aws
const Aws::String & GetProtocol() const
void SetEndpoint(EndpointT &&value)
SubscribeRequest & WithAttributes(AttributesT &&value)
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
SubscribeRequest & WithReturnSubscriptionArn(bool value)
void SetProtocol(ProtocolT &&value)
virtual const char * GetServiceRequestName() const override
void SetAttributes(AttributesT &&value)
SubscribeRequest & WithEndpoint(EndpointT &&value)
AWS_SNS_API SubscribeRequest()=default
SubscribeRequest & WithTopicArn(TopicArnT &&value)
SubscribeRequest & AddAttributes(AttributesKeyT &&key, AttributesValueT &&value)
SubscribeRequest & WithProtocol(ProtocolT &&value)
void SetTopicArn(TopicArnT &&value)
AWS_SNS_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
const Aws::String & GetEndpoint() const
const Aws::String & GetTopicArn() const
AWS_SNS_API Aws::String SerializePayload() const override
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String