/** * 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 KinesisVideoMedia { namespace Model { /** *

Identifies the chunk on the Kinesis video stream where you want the * GetMedia API to start returning media data. You have the following * options to identify the starting chunk:

  • Choose the latest (or * oldest) chunk.

  • Identify a specific chunk. You can identify a * specific chunk either by providing a fragment number or timestamp (server or * producer).

  • Each chunk's metadata includes a continuation * token as a Matroska (MKV) tag * (AWS_KINESISVIDEO_CONTINUATION_TOKEN). If your previous * GetMedia request terminated, you can use this tag value in your * next GetMedia request. The API then starts returning chunks * starting where the last API ended.

See Also:

AWS * API Reference

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

Identifies the fragment on the Kinesis video stream where you want to start * getting the data from.

  • NOW - Start with the latest chunk on the * stream.

  • EARLIEST - Start with earliest available chunk on the * stream.

  • FRAGMENT_NUMBER - Start with the chunk after a * specific fragment. You must also specify the AfterFragmentNumber * parameter.

  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with * the chunk containing a fragment with the specified producer or server timestamp. * You specify the timestamp by adding StartTimestamp.

  • *

    CONTINUATION_TOKEN - Read using the specified continuation token.

  • *

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the * startSelectorType, you don't provide any additional information in * the startSelector.

*/ inline const StartSelectorType& GetStartSelectorType() const{ return m_startSelectorType; } /** *

Identifies the fragment on the Kinesis video stream where you want to start * getting the data from.

  • NOW - Start with the latest chunk on the * stream.

  • EARLIEST - Start with earliest available chunk on the * stream.

  • FRAGMENT_NUMBER - Start with the chunk after a * specific fragment. You must also specify the AfterFragmentNumber * parameter.

  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with * the chunk containing a fragment with the specified producer or server timestamp. * You specify the timestamp by adding StartTimestamp.

  • *

    CONTINUATION_TOKEN - Read using the specified continuation token.

  • *

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the * startSelectorType, you don't provide any additional information in * the startSelector.

*/ inline bool StartSelectorTypeHasBeenSet() const { return m_startSelectorTypeHasBeenSet; } /** *

Identifies the fragment on the Kinesis video stream where you want to start * getting the data from.

  • NOW - Start with the latest chunk on the * stream.

  • EARLIEST - Start with earliest available chunk on the * stream.

  • FRAGMENT_NUMBER - Start with the chunk after a * specific fragment. You must also specify the AfterFragmentNumber * parameter.

  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with * the chunk containing a fragment with the specified producer or server timestamp. * You specify the timestamp by adding StartTimestamp.

  • *

    CONTINUATION_TOKEN - Read using the specified continuation token.

  • *

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the * startSelectorType, you don't provide any additional information in * the startSelector.

*/ inline void SetStartSelectorType(const StartSelectorType& value) { m_startSelectorTypeHasBeenSet = true; m_startSelectorType = value; } /** *

Identifies the fragment on the Kinesis video stream where you want to start * getting the data from.

  • NOW - Start with the latest chunk on the * stream.

  • EARLIEST - Start with earliest available chunk on the * stream.

  • FRAGMENT_NUMBER - Start with the chunk after a * specific fragment. You must also specify the AfterFragmentNumber * parameter.

  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with * the chunk containing a fragment with the specified producer or server timestamp. * You specify the timestamp by adding StartTimestamp.

  • *

    CONTINUATION_TOKEN - Read using the specified continuation token.

  • *

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the * startSelectorType, you don't provide any additional information in * the startSelector.

*/ inline void SetStartSelectorType(StartSelectorType&& value) { m_startSelectorTypeHasBeenSet = true; m_startSelectorType = std::move(value); } /** *

Identifies the fragment on the Kinesis video stream where you want to start * getting the data from.

  • NOW - Start with the latest chunk on the * stream.

  • EARLIEST - Start with earliest available chunk on the * stream.

  • FRAGMENT_NUMBER - Start with the chunk after a * specific fragment. You must also specify the AfterFragmentNumber * parameter.

  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with * the chunk containing a fragment with the specified producer or server timestamp. * You specify the timestamp by adding StartTimestamp.

  • *

    CONTINUATION_TOKEN - Read using the specified continuation token.

  • *

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the * startSelectorType, you don't provide any additional information in * the startSelector.

*/ inline StartSelector& WithStartSelectorType(const StartSelectorType& value) { SetStartSelectorType(value); return *this;} /** *

Identifies the fragment on the Kinesis video stream where you want to start * getting the data from.

  • NOW - Start with the latest chunk on the * stream.

  • EARLIEST - Start with earliest available chunk on the * stream.

  • FRAGMENT_NUMBER - Start with the chunk after a * specific fragment. You must also specify the AfterFragmentNumber * parameter.

  • PRODUCER_TIMESTAMP or SERVER_TIMESTAMP - Start with * the chunk containing a fragment with the specified producer or server timestamp. * You specify the timestamp by adding StartTimestamp.

  • *

    CONTINUATION_TOKEN - Read using the specified continuation token.

  • *

If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the * startSelectorType, you don't provide any additional information in * the startSelector.

*/ inline StartSelector& WithStartSelectorType(StartSelectorType&& value) { SetStartSelectorType(std::move(value)); return *this;} /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline const Aws::String& GetAfterFragmentNumber() const{ return m_afterFragmentNumber; } /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline bool AfterFragmentNumberHasBeenSet() const { return m_afterFragmentNumberHasBeenSet; } /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline void SetAfterFragmentNumber(const Aws::String& value) { m_afterFragmentNumberHasBeenSet = true; m_afterFragmentNumber = value; } /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline void SetAfterFragmentNumber(Aws::String&& value) { m_afterFragmentNumberHasBeenSet = true; m_afterFragmentNumber = std::move(value); } /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline void SetAfterFragmentNumber(const char* value) { m_afterFragmentNumberHasBeenSet = true; m_afterFragmentNumber.assign(value); } /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline StartSelector& WithAfterFragmentNumber(const Aws::String& value) { SetAfterFragmentNumber(value); return *this;} /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline StartSelector& WithAfterFragmentNumber(Aws::String&& value) { SetAfterFragmentNumber(std::move(value)); return *this;} /** *

Specifies the fragment number from where you want the GetMedia * API to start returning the fragments.

*/ inline StartSelector& WithAfterFragmentNumber(const char* value) { SetAfterFragmentNumber(value); return *this;} /** *

A timestamp value. This value is required if you choose the * PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the * startSelectorType. The GetMedia API then starts with * the chunk containing the fragment that has the specified timestamp.

*/ inline const Aws::Utils::DateTime& GetStartTimestamp() const{ return m_startTimestamp; } /** *

A timestamp value. This value is required if you choose the * PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the * startSelectorType. The GetMedia API then starts with * the chunk containing the fragment that has the specified timestamp.

*/ inline bool StartTimestampHasBeenSet() const { return m_startTimestampHasBeenSet; } /** *

A timestamp value. This value is required if you choose the * PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the * startSelectorType. The GetMedia API then starts with * the chunk containing the fragment that has the specified timestamp.

*/ inline void SetStartTimestamp(const Aws::Utils::DateTime& value) { m_startTimestampHasBeenSet = true; m_startTimestamp = value; } /** *

A timestamp value. This value is required if you choose the * PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the * startSelectorType. The GetMedia API then starts with * the chunk containing the fragment that has the specified timestamp.

*/ inline void SetStartTimestamp(Aws::Utils::DateTime&& value) { m_startTimestampHasBeenSet = true; m_startTimestamp = std::move(value); } /** *

A timestamp value. This value is required if you choose the * PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the * startSelectorType. The GetMedia API then starts with * the chunk containing the fragment that has the specified timestamp.

*/ inline StartSelector& WithStartTimestamp(const Aws::Utils::DateTime& value) { SetStartTimestamp(value); return *this;} /** *

A timestamp value. This value is required if you choose the * PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the * startSelectorType. The GetMedia API then starts with * the chunk containing the fragment that has the specified timestamp.

*/ inline StartSelector& WithStartTimestamp(Aws::Utils::DateTime&& value) { SetStartTimestamp(std::move(value)); return *this;} /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline const Aws::String& GetContinuationToken() const{ return m_continuationToken; } /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline bool ContinuationTokenHasBeenSet() const { return m_continuationTokenHasBeenSet; } /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline void SetContinuationToken(const Aws::String& value) { m_continuationTokenHasBeenSet = true; m_continuationToken = value; } /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline void SetContinuationToken(Aws::String&& value) { m_continuationTokenHasBeenSet = true; m_continuationToken = std::move(value); } /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline void SetContinuationToken(const char* value) { m_continuationTokenHasBeenSet = true; m_continuationToken.assign(value); } /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline StartSelector& WithContinuationToken(const Aws::String& value) { SetContinuationToken(value); return *this;} /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline StartSelector& WithContinuationToken(Aws::String&& value) { SetContinuationToken(std::move(value)); return *this;} /** *

Continuation token that Kinesis Video Streams returned in the previous * GetMedia response. The GetMedia API then starts with * the chunk identified by the continuation token.

*/ inline StartSelector& WithContinuationToken(const char* value) { SetContinuationToken(value); return *this;} private: StartSelectorType m_startSelectorType; bool m_startSelectorTypeHasBeenSet = false; Aws::String m_afterFragmentNumber; bool m_afterFragmentNumberHasBeenSet = false; Aws::Utils::DateTime m_startTimestamp; bool m_startTimestampHasBeenSet = false; Aws::String m_continuationToken; bool m_continuationTokenHasBeenSet = false; }; } // namespace Model } // namespace KinesisVideoMedia } // namespace Aws