AWS SDK for C++  1.9.104
AWS SDK for C++
SubscribeRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/sns/SNS_EXPORTS.h>
8 #include <aws/sns/SNSRequest.h>
11 #include <utility>
12 
13 namespace Aws
14 {
15 namespace SNS
16 {
17 namespace Model
18 {
19 
26  {
27  public:
29 
30  // Service request name is the Operation name which will send this request out,
31  // each operation should has unique request name, so that we can get operation's name from this request.
32  // Note: this is not true for response, multiple operations may have the same response name,
33  // so we can not get operation's name from response.
34  inline virtual const char* GetServiceRequestName() const override { return "Subscribe"; }
35 
36  Aws::String SerializePayload() const override;
37 
38  protected:
39  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40 
41  public:
42 
46  inline const Aws::String& GetTopicArn() const{ return m_topicArn; }
47 
51  inline bool TopicArnHasBeenSet() const { return m_topicArnHasBeenSet; }
52 
56  inline void SetTopicArn(const Aws::String& value) { m_topicArnHasBeenSet = true; m_topicArn = value; }
57 
61  inline void SetTopicArn(Aws::String&& value) { m_topicArnHasBeenSet = true; m_topicArn = std::move(value); }
62 
66  inline void SetTopicArn(const char* value) { m_topicArnHasBeenSet = true; m_topicArn.assign(value); }
67 
71  inline SubscribeRequest& WithTopicArn(const Aws::String& value) { SetTopicArn(value); return *this;}
72 
76  inline SubscribeRequest& WithTopicArn(Aws::String&& value) { SetTopicArn(std::move(value)); return *this;}
77 
81  inline SubscribeRequest& WithTopicArn(const char* value) { SetTopicArn(value); return *this;}
82 
83 
98  inline const Aws::String& GetProtocol() const{ return m_protocol; }
99 
114  inline bool ProtocolHasBeenSet() const { return m_protocolHasBeenSet; }
115 
130  inline void SetProtocol(const Aws::String& value) { m_protocolHasBeenSet = true; m_protocol = value; }
131 
146  inline void SetProtocol(Aws::String&& value) { m_protocolHasBeenSet = true; m_protocol = std::move(value); }
147 
162  inline void SetProtocol(const char* value) { m_protocolHasBeenSet = true; m_protocol.assign(value); }
163 
178  inline SubscribeRequest& WithProtocol(const Aws::String& value) { SetProtocol(value); return *this;}
179 
194  inline SubscribeRequest& WithProtocol(Aws::String&& value) { SetProtocol(std::move(value)); return *this;}
195 
210  inline SubscribeRequest& WithProtocol(const char* value) { SetProtocol(value); return *this;}
211 
212 
230  inline const Aws::String& GetEndpoint() const{ return m_endpoint; }
231 
249  inline bool EndpointHasBeenSet() const { return m_endpointHasBeenSet; }
250 
268  inline void SetEndpoint(const Aws::String& value) { m_endpointHasBeenSet = true; m_endpoint = value; }
269 
287  inline void SetEndpoint(Aws::String&& value) { m_endpointHasBeenSet = true; m_endpoint = std::move(value); }
288 
306  inline void SetEndpoint(const char* value) { m_endpointHasBeenSet = true; m_endpoint.assign(value); }
307 
325  inline SubscribeRequest& WithEndpoint(const Aws::String& value) { SetEndpoint(value); return *this;}
326 
344  inline SubscribeRequest& WithEndpoint(Aws::String&& value) { SetEndpoint(std::move(value)); return *this;}
345 
363  inline SubscribeRequest& WithEndpoint(const char* value) { SetEndpoint(value); return *this;}
364 
365 
394  inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; }
395 
424  inline bool AttributesHasBeenSet() const { return m_attributesHasBeenSet; }
425 
454  inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
455 
484  inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = std::move(value); }
485 
514  inline SubscribeRequest& WithAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetAttributes(value); return *this;}
515 
544  inline SubscribeRequest& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(std::move(value)); return *this;}
545 
574  inline SubscribeRequest& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
575 
604  inline SubscribeRequest& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
605 
634  inline SubscribeRequest& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
635 
664  inline SubscribeRequest& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), std::move(value)); return *this; }
665 
694  inline SubscribeRequest& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, std::move(value)); return *this; }
695 
724  inline SubscribeRequest& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(std::move(key), value); return *this; }
725 
754  inline SubscribeRequest& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes.emplace(key, value); return *this; }
755 
756 
768  inline bool GetReturnSubscriptionArn() const{ return m_returnSubscriptionArn; }
769 
781  inline bool ReturnSubscriptionArnHasBeenSet() const { return m_returnSubscriptionArnHasBeenSet; }
782 
794  inline void SetReturnSubscriptionArn(bool value) { m_returnSubscriptionArnHasBeenSet = true; m_returnSubscriptionArn = value; }
795 
807  inline SubscribeRequest& WithReturnSubscriptionArn(bool value) { SetReturnSubscriptionArn(value); return *this;}
808 
809  private:
810 
811  Aws::String m_topicArn;
812  bool m_topicArnHasBeenSet;
813 
814  Aws::String m_protocol;
815  bool m_protocolHasBeenSet;
816 
817  Aws::String m_endpoint;
818  bool m_endpointHasBeenSet;
819 
821  bool m_attributesHasBeenSet;
822 
823  bool m_returnSubscriptionArn;
824  bool m_returnSubscriptionArnHasBeenSet;
825  };
826 
827 } // namespace Model
828 } // namespace SNS
829 } // namespace Aws
Aws::Http::URI
Definition: URI.h:32
Aws::SNS::Model::SubscribeRequest::SetEndpoint
void SetEndpoint(Aws::String &&value)
Definition: SubscribeRequest.h:287
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(const Aws::String &key, Aws::String &&value)
Definition: SubscribeRequest.h:634
Aws::SNS::Model::SubscribeRequest::SetReturnSubscriptionArn
void SetReturnSubscriptionArn(bool value)
Definition: SubscribeRequest.h:794
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(const Aws::String &key, const Aws::String &value)
Definition: SubscribeRequest.h:574
Aws::SNS::Model::SubscribeRequest::GetEndpoint
const Aws::String & GetEndpoint() const
Definition: SubscribeRequest.h:230
Aws::SNS::Model::SubscribeRequest::SetAttributes
void SetAttributes(Aws::Map< Aws::String, Aws::String > &&value)
Definition: SubscribeRequest.h:484
Aws::SNS::Model::SubscribeRequest::SubscribeRequest
SubscribeRequest()
Aws::SNS::Model::SubscribeRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::SNS::Model::SubscribeRequest::GetTopicArn
const Aws::String & GetTopicArn() const
Definition: SubscribeRequest.h:46
Aws::SNS::Model::SubscribeRequest::GetReturnSubscriptionArn
bool GetReturnSubscriptionArn() const
Definition: SubscribeRequest.h:768
Aws::SNS::Model::SubscribeRequest::ReturnSubscriptionArnHasBeenSet
bool ReturnSubscriptionArnHasBeenSet() const
Definition: SubscribeRequest.h:781
Aws::SNS::Model::SubscribeRequest::WithProtocol
SubscribeRequest & WithProtocol(Aws::String &&value)
Definition: SubscribeRequest.h:194
Aws::SNS::Model::SubscribeRequest::SetTopicArn
void SetTopicArn(const char *value)
Definition: SubscribeRequest.h:66
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(Aws::String &&key, Aws::String &&value)
Definition: SubscribeRequest.h:664
Aws::SNS::Model::SubscribeRequest::GetAttributes
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
Definition: SubscribeRequest.h:394
Aws::SNS::Model::SubscribeRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::SNS::Model::SubscribeRequest::SetProtocol
void SetProtocol(Aws::String &&value)
Definition: SubscribeRequest.h:146
Aws::SNS::Model::SubscribeRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: SubscribeRequest.h:34
Aws::SNS::Model::SubscribeRequest::WithProtocol
SubscribeRequest & WithProtocol(const char *value)
Definition: SubscribeRequest.h:210
Aws::SNS::Model::SubscribeRequest::TopicArnHasBeenSet
bool TopicArnHasBeenSet() const
Definition: SubscribeRequest.h:51
Aws::SNS::Model::SubscribeRequest::WithEndpoint
SubscribeRequest & WithEndpoint(const Aws::String &value)
Definition: SubscribeRequest.h:325
Aws::SNS::Model::SubscribeRequest::WithEndpoint
SubscribeRequest & WithEndpoint(Aws::String &&value)
Definition: SubscribeRequest.h:344
Aws::SNS::Model::SubscribeRequest::WithAttributes
SubscribeRequest & WithAttributes(const Aws::Map< Aws::String, Aws::String > &value)
Definition: SubscribeRequest.h:514
Aws::SNS::Model::SubscribeRequest::WithTopicArn
SubscribeRequest & WithTopicArn(const Aws::String &value)
Definition: SubscribeRequest.h:71
SNSRequest.h
Aws::SNS::Model::SubscribeRequest::ProtocolHasBeenSet
bool ProtocolHasBeenSet() const
Definition: SubscribeRequest.h:114
Aws::SNS::SNSRequest
Definition: SNSRequest.h:17
Aws::SNS::Model::SubscribeRequest::WithAttributes
SubscribeRequest & WithAttributes(Aws::Map< Aws::String, Aws::String > &&value)
Definition: SubscribeRequest.h:544
Aws::SNS::Model::SubscribeRequest::SetTopicArn
void SetTopicArn(const Aws::String &value)
Definition: SubscribeRequest.h:56
AWSString.h
Aws::SNS::Model::SubscribeRequest::EndpointHasBeenSet
bool EndpointHasBeenSet() const
Definition: SubscribeRequest.h:249
Aws::SNS::Model::SubscribeRequest::SetProtocol
void SetProtocol(const Aws::String &value)
Definition: SubscribeRequest.h:130
Aws::SNS::Model::SubscribeRequest::WithReturnSubscriptionArn
SubscribeRequest & WithReturnSubscriptionArn(bool value)
Definition: SubscribeRequest.h:807
Aws::SNS::Model::SubscribeRequest::WithTopicArn
SubscribeRequest & WithTopicArn(const char *value)
Definition: SubscribeRequest.h:81
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(const char *key, const char *value)
Definition: SubscribeRequest.h:754
Aws::CostExplorer::Model::SubscriberType::NOT_SET
@ NOT_SET
Aws::SNS::Model::SubscribeRequest::WithEndpoint
SubscribeRequest & WithEndpoint(const char *value)
Definition: SubscribeRequest.h:363
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(Aws::String &&key, const char *value)
Definition: SubscribeRequest.h:724
AWS_SNS_API
#define AWS_SNS_API
Definition: SNS_EXPORTS.h:28
Aws::SNS::Model::SubscribeRequest::SetAttributes
void SetAttributes(const Aws::Map< Aws::String, Aws::String > &value)
Definition: SubscribeRequest.h:454
SNS_EXPORTS.h
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(Aws::String &&key, const Aws::String &value)
Definition: SubscribeRequest.h:604
Aws
Definition: AccessManagementClient.h:15
Aws::SNS::Model::SubscribeRequest::WithTopicArn
SubscribeRequest & WithTopicArn(Aws::String &&value)
Definition: SubscribeRequest.h:76
Aws::SNS::Model::SubscribeRequest::SetEndpoint
void SetEndpoint(const Aws::String &value)
Definition: SubscribeRequest.h:268
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::SNS::Model::SubscribeRequest
Definition: SubscribeRequest.h:26
Aws::SNS::Model::SubscribeRequest::GetProtocol
const Aws::String & GetProtocol() const
Definition: SubscribeRequest.h:98
Aws::SNS::Model::SubscribeRequest::AttributesHasBeenSet
bool AttributesHasBeenSet() const
Definition: SubscribeRequest.h:424
Aws::SNS::Model::SubscribeRequest::AddAttributes
SubscribeRequest & AddAttributes(const char *key, Aws::String &&value)
Definition: SubscribeRequest.h:694
AWSMap.h
Aws::SNS::Model::SubscribeRequest::SetProtocol
void SetProtocol(const char *value)
Definition: SubscribeRequest.h:162
Aws::SNS::Model::SubscribeRequest::SetTopicArn
void SetTopicArn(Aws::String &&value)
Definition: SubscribeRequest.h:61
Aws::SNS::Model::SubscribeRequest::WithProtocol
SubscribeRequest & WithProtocol(const Aws::String &value)
Definition: SubscribeRequest.h:178
Aws::Map
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:19
Aws::SNS::Model::SubscribeRequest::SetEndpoint
void SetEndpoint(const char *value)
Definition: SubscribeRequest.h:306