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

See Also:

AWS * API Reference

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

You can set the starting position to one of the following values:

* AT_SEQUENCE_NUMBER: Start streaming from the position denoted by * the sequence number specified in the SequenceNumber field.

* AFTER_SEQUENCE_NUMBER: Start streaming right after the position * denoted by the sequence number specified in the SequenceNumber * field.

AT_TIMESTAMP: Start streaming from the position * denoted by the time stamp specified in the Timestamp field.

* TRIM_HORIZON: Start streaming at the last untrimmed record in the * shard, which is the oldest data record in the shard.

* LATEST: Start streaming just after the most recent record in the * shard, so that you always read the most recent data in the shard.

*/ inline const ShardIteratorType& GetType() const{ return m_type; } /** *

You can set the starting position to one of the following values:

* AT_SEQUENCE_NUMBER: Start streaming from the position denoted by * the sequence number specified in the SequenceNumber field.

* AFTER_SEQUENCE_NUMBER: Start streaming right after the position * denoted by the sequence number specified in the SequenceNumber * field.

AT_TIMESTAMP: Start streaming from the position * denoted by the time stamp specified in the Timestamp field.

* TRIM_HORIZON: Start streaming at the last untrimmed record in the * shard, which is the oldest data record in the shard.

* LATEST: Start streaming just after the most recent record in the * shard, so that you always read the most recent data in the shard.

*/ inline bool TypeHasBeenSet() const { return m_typeHasBeenSet; } /** *

You can set the starting position to one of the following values:

* AT_SEQUENCE_NUMBER: Start streaming from the position denoted by * the sequence number specified in the SequenceNumber field.

* AFTER_SEQUENCE_NUMBER: Start streaming right after the position * denoted by the sequence number specified in the SequenceNumber * field.

AT_TIMESTAMP: Start streaming from the position * denoted by the time stamp specified in the Timestamp field.

* TRIM_HORIZON: Start streaming at the last untrimmed record in the * shard, which is the oldest data record in the shard.

* LATEST: Start streaming just after the most recent record in the * shard, so that you always read the most recent data in the shard.

*/ inline void SetType(const ShardIteratorType& value) { m_typeHasBeenSet = true; m_type = value; } /** *

You can set the starting position to one of the following values:

* AT_SEQUENCE_NUMBER: Start streaming from the position denoted by * the sequence number specified in the SequenceNumber field.

* AFTER_SEQUENCE_NUMBER: Start streaming right after the position * denoted by the sequence number specified in the SequenceNumber * field.

AT_TIMESTAMP: Start streaming from the position * denoted by the time stamp specified in the Timestamp field.

* TRIM_HORIZON: Start streaming at the last untrimmed record in the * shard, which is the oldest data record in the shard.

* LATEST: Start streaming just after the most recent record in the * shard, so that you always read the most recent data in the shard.

*/ inline void SetType(ShardIteratorType&& value) { m_typeHasBeenSet = true; m_type = std::move(value); } /** *

You can set the starting position to one of the following values:

* AT_SEQUENCE_NUMBER: Start streaming from the position denoted by * the sequence number specified in the SequenceNumber field.

* AFTER_SEQUENCE_NUMBER: Start streaming right after the position * denoted by the sequence number specified in the SequenceNumber * field.

AT_TIMESTAMP: Start streaming from the position * denoted by the time stamp specified in the Timestamp field.

* TRIM_HORIZON: Start streaming at the last untrimmed record in the * shard, which is the oldest data record in the shard.

* LATEST: Start streaming just after the most recent record in the * shard, so that you always read the most recent data in the shard.

*/ inline StartingPosition& WithType(const ShardIteratorType& value) { SetType(value); return *this;} /** *

You can set the starting position to one of the following values:

* AT_SEQUENCE_NUMBER: Start streaming from the position denoted by * the sequence number specified in the SequenceNumber field.

* AFTER_SEQUENCE_NUMBER: Start streaming right after the position * denoted by the sequence number specified in the SequenceNumber * field.

AT_TIMESTAMP: Start streaming from the position * denoted by the time stamp specified in the Timestamp field.

* TRIM_HORIZON: Start streaming at the last untrimmed record in the * shard, which is the oldest data record in the shard.

* LATEST: Start streaming just after the most recent record in the * shard, so that you always read the most recent data in the shard.

*/ inline StartingPosition& WithType(ShardIteratorType&& value) { SetType(std::move(value)); return *this;} /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline const Aws::String& GetSequenceNumber() const{ return m_sequenceNumber; } /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline bool SequenceNumberHasBeenSet() const { return m_sequenceNumberHasBeenSet; } /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline void SetSequenceNumber(const Aws::String& value) { m_sequenceNumberHasBeenSet = true; m_sequenceNumber = value; } /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline void SetSequenceNumber(Aws::String&& value) { m_sequenceNumberHasBeenSet = true; m_sequenceNumber = std::move(value); } /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline void SetSequenceNumber(const char* value) { m_sequenceNumberHasBeenSet = true; m_sequenceNumber.assign(value); } /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline StartingPosition& WithSequenceNumber(const Aws::String& value) { SetSequenceNumber(value); return *this;} /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline StartingPosition& WithSequenceNumber(Aws::String&& value) { SetSequenceNumber(std::move(value)); return *this;} /** *

The sequence number of the data record in the shard from which to start * streaming. To specify a sequence number, set StartingPosition to * AT_SEQUENCE_NUMBER or AFTER_SEQUENCE_NUMBER.

*/ inline StartingPosition& WithSequenceNumber(const char* value) { SetSequenceNumber(value); return *this;} /** *

The time stamp of the data record from which to start reading. To specify a * time stamp, set StartingPosition to Type AT_TIMESTAMP. * A time stamp is the Unix epoch date with precision in milliseconds. For example, * 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a * record with this exact time stamp does not exist, records will be streamed from * the next (later) record. If the time stamp is older than the current trim * horizon, records will be streamed from the oldest untrimmed data record * (TRIM_HORIZON).

*/ inline const Aws::Utils::DateTime& GetTimestamp() const{ return m_timestamp; } /** *

The time stamp of the data record from which to start reading. To specify a * time stamp, set StartingPosition to Type AT_TIMESTAMP. * A time stamp is the Unix epoch date with precision in milliseconds. For example, * 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a * record with this exact time stamp does not exist, records will be streamed from * the next (later) record. If the time stamp is older than the current trim * horizon, records will be streamed from the oldest untrimmed data record * (TRIM_HORIZON).

*/ inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; } /** *

The time stamp of the data record from which to start reading. To specify a * time stamp, set StartingPosition to Type AT_TIMESTAMP. * A time stamp is the Unix epoch date with precision in milliseconds. For example, * 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a * record with this exact time stamp does not exist, records will be streamed from * the next (later) record. If the time stamp is older than the current trim * horizon, records will be streamed from the oldest untrimmed data record * (TRIM_HORIZON).

*/ inline void SetTimestamp(const Aws::Utils::DateTime& value) { m_timestampHasBeenSet = true; m_timestamp = value; } /** *

The time stamp of the data record from which to start reading. To specify a * time stamp, set StartingPosition to Type AT_TIMESTAMP. * A time stamp is the Unix epoch date with precision in milliseconds. For example, * 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a * record with this exact time stamp does not exist, records will be streamed from * the next (later) record. If the time stamp is older than the current trim * horizon, records will be streamed from the oldest untrimmed data record * (TRIM_HORIZON).

*/ inline void SetTimestamp(Aws::Utils::DateTime&& value) { m_timestampHasBeenSet = true; m_timestamp = std::move(value); } /** *

The time stamp of the data record from which to start reading. To specify a * time stamp, set StartingPosition to Type AT_TIMESTAMP. * A time stamp is the Unix epoch date with precision in milliseconds. For example, * 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a * record with this exact time stamp does not exist, records will be streamed from * the next (later) record. If the time stamp is older than the current trim * horizon, records will be streamed from the oldest untrimmed data record * (TRIM_HORIZON).

*/ inline StartingPosition& WithTimestamp(const Aws::Utils::DateTime& value) { SetTimestamp(value); return *this;} /** *

The time stamp of the data record from which to start reading. To specify a * time stamp, set StartingPosition to Type AT_TIMESTAMP. * A time stamp is the Unix epoch date with precision in milliseconds. For example, * 2016-04-04T19:58:46.480-00:00 or 1459799926.480. If a * record with this exact time stamp does not exist, records will be streamed from * the next (later) record. If the time stamp is older than the current trim * horizon, records will be streamed from the oldest untrimmed data record * (TRIM_HORIZON).

*/ inline StartingPosition& WithTimestamp(Aws::Utils::DateTime&& value) { SetTimestamp(std::move(value)); return *this;} private: ShardIteratorType m_type; bool m_typeHasBeenSet; Aws::String m_sequenceNumber; bool m_sequenceNumberHasBeenSet; Aws::Utils::DateTime m_timestamp; bool m_timestampHasBeenSet; }; } // namespace Model } // namespace Kinesis } // namespace Aws