/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include namespace Aws { namespace Kinesis { namespace Model { /** */ class AWS_KINESIS_API SubscribeToShardRequest : public KinesisRequest { public: SubscribeToShardRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "SubscribeToShard"; } Aws::String SerializePayload() const override; Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override; /** * Underlying Event Stream Decoder. */ inline Aws::Utils::Event::EventStreamDecoder& GetEventStreamDecoder() { return m_decoder; } /** * Underlying Event Stream Handler which is used to define callback functions. */ inline const SubscribeToShardHandler& GetEventStreamHandler() const { return m_handler; } /** * Underlying Event Stream Handler which is used to define callback functions. */ inline void SetEventStreamHandler(const SubscribeToShardHandler& value) { m_handler = value; m_decoder.ResetEventStreamHandler(&m_handler); } /** * Underlying Event Stream Handler which is used to define callback functions. */ inline SubscribeToShardRequest& WithEventStreamHandler(const SubscribeToShardHandler& value) { SetEventStreamHandler(value); return *this; } /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline const Aws::String& GetConsumerARN() const{ return m_consumerARN; } /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline bool ConsumerARNHasBeenSet() const { return m_consumerARNHasBeenSet; } /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline void SetConsumerARN(const Aws::String& value) { m_consumerARNHasBeenSet = true; m_consumerARN = value; } /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline void SetConsumerARN(Aws::String&& value) { m_consumerARNHasBeenSet = true; m_consumerARN = std::move(value); } /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline void SetConsumerARN(const char* value) { m_consumerARNHasBeenSet = true; m_consumerARN.assign(value); } /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline SubscribeToShardRequest& WithConsumerARN(const Aws::String& value) { SetConsumerARN(value); return *this;} /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline SubscribeToShardRequest& WithConsumerARN(Aws::String&& value) { SetConsumerARN(std::move(value)); return *this;} /** *

For this parameter, use the value you obtained when you called * RegisterStreamConsumer.

*/ inline SubscribeToShardRequest& WithConsumerARN(const char* value) { SetConsumerARN(value); return *this;} /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline const Aws::String& GetShardId() const{ return m_shardId; } /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline bool ShardIdHasBeenSet() const { return m_shardIdHasBeenSet; } /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline void SetShardId(const Aws::String& value) { m_shardIdHasBeenSet = true; m_shardId = value; } /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline void SetShardId(Aws::String&& value) { m_shardIdHasBeenSet = true; m_shardId = std::move(value); } /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline void SetShardId(const char* value) { m_shardIdHasBeenSet = true; m_shardId.assign(value); } /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline SubscribeToShardRequest& WithShardId(const Aws::String& value) { SetShardId(value); return *this;} /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline SubscribeToShardRequest& WithShardId(Aws::String&& value) { SetShardId(std::move(value)); return *this;} /** *

The ID of the shard you want to subscribe to. To see a list of all the shards * for a given stream, use ListShards.

*/ inline SubscribeToShardRequest& WithShardId(const char* value) { SetShardId(value); return *this;} /** *

*/ inline const StartingPosition& GetStartingPosition() const{ return m_startingPosition; } /** *

*/ inline bool StartingPositionHasBeenSet() const { return m_startingPositionHasBeenSet; } /** *

*/ inline void SetStartingPosition(const StartingPosition& value) { m_startingPositionHasBeenSet = true; m_startingPosition = value; } /** *

*/ inline void SetStartingPosition(StartingPosition&& value) { m_startingPositionHasBeenSet = true; m_startingPosition = std::move(value); } /** *

*/ inline SubscribeToShardRequest& WithStartingPosition(const StartingPosition& value) { SetStartingPosition(value); return *this;} /** *

*/ inline SubscribeToShardRequest& WithStartingPosition(StartingPosition&& value) { SetStartingPosition(std::move(value)); return *this;} private: Aws::String m_consumerARN; bool m_consumerARNHasBeenSet; Aws::String m_shardId; bool m_shardIdHasBeenSet; StartingPosition m_startingPosition; bool m_startingPositionHasBeenSet; Aws::Utils::Event::EventStreamDecoder m_decoder; SubscribeToShardHandler m_handler; }; } // namespace Model } // namespace Kinesis } // namespace Aws