/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace Kinesis { namespace Model { /** *

After you call SubscribeToShard, Kinesis Data Streams sends events of * this type over an HTTP/2 connection to your consumer.

See Also:

* AWS * API Reference

*/ class AWS_KINESIS_API SubscribeToShardEvent { public: SubscribeToShardEvent(); SubscribeToShardEvent(Aws::Utils::Json::JsonView jsonValue); SubscribeToShardEvent& operator=(Aws::Utils::Json::JsonView jsonValue); Aws::Utils::Json::JsonValue Jsonize() const; /** *

*/ inline const Aws::Vector& GetRecords() const{ return m_records; } /** *

*/ inline bool RecordsHasBeenSet() const { return m_recordsHasBeenSet; } /** *

*/ inline void SetRecords(const Aws::Vector& value) { m_recordsHasBeenSet = true; m_records = value; } /** *

*/ inline void SetRecords(Aws::Vector&& value) { m_recordsHasBeenSet = true; m_records = std::move(value); } /** *

*/ inline SubscribeToShardEvent& WithRecords(const Aws::Vector& value) { SetRecords(value); return *this;} /** *

*/ inline SubscribeToShardEvent& WithRecords(Aws::Vector&& value) { SetRecords(std::move(value)); return *this;} /** *

*/ inline SubscribeToShardEvent& AddRecords(const Record& value) { m_recordsHasBeenSet = true; m_records.push_back(value); return *this; } /** *

*/ inline SubscribeToShardEvent& AddRecords(Record&& value) { m_recordsHasBeenSet = true; m_records.push_back(std::move(value)); return *this; } /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline const Aws::String& GetContinuationSequenceNumber() const{ return m_continuationSequenceNumber; } /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline bool ContinuationSequenceNumberHasBeenSet() const { return m_continuationSequenceNumberHasBeenSet; } /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline void SetContinuationSequenceNumber(const Aws::String& value) { m_continuationSequenceNumberHasBeenSet = true; m_continuationSequenceNumber = value; } /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline void SetContinuationSequenceNumber(Aws::String&& value) { m_continuationSequenceNumberHasBeenSet = true; m_continuationSequenceNumber = std::move(value); } /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline void SetContinuationSequenceNumber(const char* value) { m_continuationSequenceNumberHasBeenSet = true; m_continuationSequenceNumber.assign(value); } /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline SubscribeToShardEvent& WithContinuationSequenceNumber(const Aws::String& value) { SetContinuationSequenceNumber(value); return *this;} /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline SubscribeToShardEvent& WithContinuationSequenceNumber(Aws::String&& value) { SetContinuationSequenceNumber(std::move(value)); return *this;} /** *

Use this as SequenceNumber in the next call to * SubscribeToShard, with StartingPosition set to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER. Use * ContinuationSequenceNumber for checkpointing because it captures * your shard progress even when no data is written to the shard.

*/ inline SubscribeToShardEvent& WithContinuationSequenceNumber(const char* value) { SetContinuationSequenceNumber(value); return *this;} /** *

The number of milliseconds the read records are from the tip of the stream, * indicating how far behind current time the consumer is. A value of zero * indicates that record processing is caught up, and there are no new records to * process at this moment.

*/ inline long long GetMillisBehindLatest() const{ return m_millisBehindLatest; } /** *

The number of milliseconds the read records are from the tip of the stream, * indicating how far behind current time the consumer is. A value of zero * indicates that record processing is caught up, and there are no new records to * process at this moment.

*/ inline bool MillisBehindLatestHasBeenSet() const { return m_millisBehindLatestHasBeenSet; } /** *

The number of milliseconds the read records are from the tip of the stream, * indicating how far behind current time the consumer is. A value of zero * indicates that record processing is caught up, and there are no new records to * process at this moment.

*/ inline void SetMillisBehindLatest(long long value) { m_millisBehindLatestHasBeenSet = true; m_millisBehindLatest = value; } /** *

The number of milliseconds the read records are from the tip of the stream, * indicating how far behind current time the consumer is. A value of zero * indicates that record processing is caught up, and there are no new records to * process at this moment.

*/ inline SubscribeToShardEvent& WithMillisBehindLatest(long long value) { SetMillisBehindLatest(value); return *this;} inline const Aws::Vector& GetChildShards() const{ return m_childShards; } inline bool ChildShardsHasBeenSet() const { return m_childShardsHasBeenSet; } inline void SetChildShards(const Aws::Vector& value) { m_childShardsHasBeenSet = true; m_childShards = value; } inline void SetChildShards(Aws::Vector&& value) { m_childShardsHasBeenSet = true; m_childShards = std::move(value); } inline SubscribeToShardEvent& WithChildShards(const Aws::Vector& value) { SetChildShards(value); return *this;} inline SubscribeToShardEvent& WithChildShards(Aws::Vector&& value) { SetChildShards(std::move(value)); return *this;} inline SubscribeToShardEvent& AddChildShards(const ChildShard& value) { m_childShardsHasBeenSet = true; m_childShards.push_back(value); return *this; } inline SubscribeToShardEvent& AddChildShards(ChildShard&& value) { m_childShardsHasBeenSet = true; m_childShards.push_back(std::move(value)); return *this; } private: Aws::Vector m_records; bool m_recordsHasBeenSet; Aws::String m_continuationSequenceNumber; bool m_continuationSequenceNumberHasBeenSet; long long m_millisBehindLatest; bool m_millisBehindLatestHasBeenSet; Aws::Vector m_childShards; bool m_childShardsHasBeenSet; }; } // namespace Model } // namespace Kinesis } // namespace Aws