AWS SDK for C++

AWS SDK for C++ Version 1.11.754

Loading...
Searching...
No Matches
SubscribeToShardRequest.h
1
6#pragma once
7#include <aws/core/utils/event/EventStreamDecoder.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/kinesis/KinesisRequest.h>
10#include <aws/kinesis/Kinesis_EXPORTS.h>
11#include <aws/kinesis/model/StartingPosition.h>
12#include <aws/kinesis/model/SubscribeToShardHandler.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Kinesis {
18namespace Model {
19
23 public:
24 AWS_KINESIS_API SubscribeToShardRequest() = default;
25
26 // Service request name is the Operation name which will send this request out,
27 // each operation should has unique request name, so that we can get operation's name from this request.
28 // Note: this is not true for response, multiple operations may have the same response name,
29 // so we can not get operation's name from response.
30 inline virtual const char* GetServiceRequestName() const override { return "SubscribeToShard"; }
31
32 inline virtual bool HasEventStreamResponse() const override { return true; }
33 AWS_KINESIS_API Aws::String SerializePayload() const override;
34
36
41
45 inline SubscribeToShardHandler& GetEventStreamHandler() { return m_handler; }
46
51 m_handler = value;
52 m_decoder.ResetEventStreamHandler(&m_handler);
53 }
54
60 return *this;
61 }
62
66 AWS_KINESIS_API EndpointParameters GetEndpointContextParams() const override;
67
69
73 inline const Aws::String& GetConsumerARN() const { return m_consumerARN; }
74 inline bool ConsumerARNHasBeenSet() const { return m_consumerARNHasBeenSet; }
75 template <typename ConsumerARNT = Aws::String>
76 void SetConsumerARN(ConsumerARNT&& value) {
77 m_consumerARNHasBeenSet = true;
78 m_consumerARN = std::forward<ConsumerARNT>(value);
79 }
80 template <typename ConsumerARNT = Aws::String>
82 SetConsumerARN(std::forward<ConsumerARNT>(value));
83 return *this;
84 }
86
88
91 inline const Aws::String& GetStreamId() const { return m_streamId; }
92 inline bool StreamIdHasBeenSet() const { return m_streamIdHasBeenSet; }
93 template <typename StreamIdT = Aws::String>
94 void SetStreamId(StreamIdT&& value) {
95 m_streamIdHasBeenSet = true;
96 m_streamId = std::forward<StreamIdT>(value);
97 }
98 template <typename StreamIdT = Aws::String>
100 SetStreamId(std::forward<StreamIdT>(value));
101 return *this;
102 }
104
106
110 inline const Aws::String& GetShardId() const { return m_shardId; }
111 inline bool ShardIdHasBeenSet() const { return m_shardIdHasBeenSet; }
112 template <typename ShardIdT = Aws::String>
113 void SetShardId(ShardIdT&& value) {
114 m_shardIdHasBeenSet = true;
115 m_shardId = std::forward<ShardIdT>(value);
116 }
117 template <typename ShardIdT = Aws::String>
119 SetShardId(std::forward<ShardIdT>(value));
120 return *this;
121 }
123
125
128 inline const StartingPosition& GetStartingPosition() const { return m_startingPosition; }
129 inline bool StartingPositionHasBeenSet() const { return m_startingPositionHasBeenSet; }
130 template <typename StartingPositionT = StartingPosition>
131 void SetStartingPosition(StartingPositionT&& value) {
132 m_startingPositionHasBeenSet = true;
133 m_startingPosition = std::forward<StartingPositionT>(value);
134 }
135 template <typename StartingPositionT = StartingPosition>
136 SubscribeToShardRequest& WithStartingPosition(StartingPositionT&& value) {
137 SetStartingPosition(std::forward<StartingPositionT>(value));
138 return *this;
139 }
141 private:
142 Aws::String m_consumerARN;
143
144 Aws::String m_streamId;
145
146 Aws::String m_shardId;
147
148 StartingPosition m_startingPosition;
149 SubscribeToShardHandler m_handler;
151
152 bool m_consumerARNHasBeenSet = false;
153 bool m_streamIdHasBeenSet = false;
154 bool m_shardIdHasBeenSet = false;
155 bool m_startingPositionHasBeenSet = false;
156};
157
158} // namespace Model
159} // namespace Kinesis
160} // namespace Aws
Aws::Endpoint::EndpointParameters EndpointParameters
AWS_KINESIS_API SubscribeToShardRequest()=default
const StartingPosition & GetStartingPosition() const
SubscribeToShardRequest & WithStreamId(StreamIdT &&value)
virtual const char * GetServiceRequestName() const override
Aws::Utils::Event::EventStreamDecoder & GetEventStreamDecoder()
AWS_KINESIS_API EndpointParameters GetEndpointContextParams() const override
AWS_KINESIS_API Aws::String SerializePayload() const override
SubscribeToShardRequest & WithConsumerARN(ConsumerARNT &&value)
SubscribeToShardRequest & WithEventStreamHandler(const SubscribeToShardHandler &value)
AWS_KINESIS_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
void SetEventStreamHandler(const SubscribeToShardHandler &value)
SubscribeToShardRequest & WithShardId(ShardIdT &&value)
SubscribeToShardRequest & WithStartingPosition(StartingPositionT &&value)
void ResetEventStreamHandler(EventStreamHandler *handler)
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String