feat(hos_client_create, hos_client_destory): 多次调用destory不会导致重复释放

This commit is contained in:
彭宣正
2020-12-14 17:24:58 +08:00
parent 505d529c32
commit 10b370e486
55976 changed files with 8544395 additions and 2 deletions

View File

@@ -0,0 +1,76 @@
add_project(aws-cpp-sdk-kinesis-video-media "C++ SDK for the AWS kinesis-video-media service" aws-cpp-sdk-core)
file(GLOB AWS_KINESIS-VIDEO-MEDIA_HEADERS
"include/aws/kinesis-video-media/*.h"
)
file(GLOB AWS_KINESIS-VIDEO-MEDIA_MODEL_HEADERS
"include/aws/kinesis-video-media/model/*.h"
)
file(GLOB AWS_KINESIS-VIDEO-MEDIA_SOURCE
"source/*.cpp"
)
file(GLOB AWS_KINESIS-VIDEO-MEDIA_MODEL_SOURCE
"source/model/*.cpp"
)
file(GLOB KINESIS-VIDEO-MEDIA_UNIFIED_HEADERS
${AWS_KINESIS-VIDEO-MEDIA_HEADERS}
${AWS_KINESIS-VIDEO-MEDIA_MODEL_HEADERS}
)
file(GLOB KINESIS-VIDEO-MEDIA_UNITY_SRC
${AWS_KINESIS-VIDEO-MEDIA_SOURCE}
${AWS_KINESIS-VIDEO-MEDIA_MODEL_SOURCE}
)
if(ENABLE_UNITY_BUILD)
enable_unity_build("KINESIS-VIDEO-MEDIA" KINESIS-VIDEO-MEDIA_UNITY_SRC)
endif()
file(GLOB KINESIS-VIDEO-MEDIA_SRC
${KINESIS-VIDEO-MEDIA_UNIFIED_HEADERS}
${KINESIS-VIDEO-MEDIA_UNITY_SRC}
)
if(WIN32)
#if we are compiling for visual studio, create a sane directory tree.
if(MSVC)
source_group("Header Files\\aws\\kinesis-video-media" FILES ${AWS_KINESIS-VIDEO-MEDIA_HEADERS})
source_group("Header Files\\aws\\kinesis-video-media\\model" FILES ${AWS_KINESIS-VIDEO-MEDIA_MODEL_HEADERS})
source_group("Source Files" FILES ${AWS_KINESIS-VIDEO-MEDIA_SOURCE})
source_group("Source Files\\model" FILES ${AWS_KINESIS-VIDEO-MEDIA_MODEL_SOURCE})
endif(MSVC)
endif()
set(KINESIS-VIDEO-MEDIA_INCLUDES
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
)
add_library(${PROJECT_NAME} ${KINESIS-VIDEO-MEDIA_SRC})
add_library(AWS::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
set_compiler_flags(${PROJECT_NAME})
set_compiler_warnings(${PROJECT_NAME})
if(USE_WINDOWS_DLL_SEMANTICS AND BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_NAME} PRIVATE "AWS_KINESISVIDEOMEDIA_EXPORTS")
endif()
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
target_link_libraries(${PROJECT_NAME} PRIVATE ${PLATFORM_DEP_LIBS} ${PROJECT_LIBS})
setup_install()
install (FILES ${AWS_KINESIS-VIDEO-MEDIA_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/kinesis-video-media)
install (FILES ${AWS_KINESIS-VIDEO-MEDIA_MODEL_HEADERS} DESTINATION ${INCLUDE_DIRECTORY}/aws/kinesis-video-media/model)
do_packaging()

View File

@@ -0,0 +1,225 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/kinesis-video-media/KinesisVideoMediaErrors.h>
#include <aws/core/client/AWSError.h>
#include <aws/core/client/ClientConfiguration.h>
#include <aws/core/client/AWSClient.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/kinesis-video-media/model/GetMediaResult.h>
#include <aws/core/client/AsyncCallerContext.h>
#include <aws/core/http/HttpTypes.h>
#include <future>
#include <functional>
namespace Aws
{
namespace Http
{
class HttpClient;
class HttpClientFactory;
} // namespace Http
namespace Utils
{
template< typename R, typename E> class Outcome;
namespace Threading
{
class Executor;
} // namespace Threading
} // namespace Utils
namespace Auth
{
class AWSCredentials;
class AWSCredentialsProvider;
} // namespace Auth
namespace Client
{
class RetryStrategy;
} // namespace Client
namespace KinesisVideoMedia
{
namespace Model
{
class GetMediaRequest;
typedef Aws::Utils::Outcome<GetMediaResult, KinesisVideoMediaError> GetMediaOutcome;
typedef std::future<GetMediaOutcome> GetMediaOutcomeCallable;
} // namespace Model
class KinesisVideoMediaClient;
typedef std::function<void(const KinesisVideoMediaClient*, const Model::GetMediaRequest&, Model::GetMediaOutcome, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetMediaResponseReceivedHandler;
/**
* <p/>
*/
class AWS_KINESISVIDEOMEDIA_API KinesisVideoMediaClient : public Aws::Client::AWSJsonClient
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
KinesisVideoMediaClient(const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
KinesisVideoMediaClient(const Aws::Auth::AWSCredentials& credentials, const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
KinesisVideoMediaClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~KinesisVideoMediaClient();
/**
* <p> Use this API to retrieve media content from a Kinesis video stream. In the
* request, you identify the stream name or stream Amazon Resource Name (ARN), and
* the starting chunk. Kinesis Video Streams then returns a stream of chunks in
* order by fragment number.</p> <p>You must first call the
* <code>GetDataEndpoint</code> API to get an endpoint. Then send the
* <code>GetMedia</code> requests to this endpoint using the <a
* href="https://docs.aws.amazon.com/cli/latest/reference/">--endpoint-url
* parameter</a>. </p> <p>When you put media data (fragments) on a stream,
* Kinesis Video Streams stores each incoming fragment and related metadata in what
* is called a "chunk." For more information, see <a
* href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html">PutMedia</a>.
* The <code>GetMedia</code> API returns a stream of these chunks starting from the
* chunk that you specify in the request. </p> <p>The following limits apply when
* using the <code>GetMedia</code> API:</p> <ul> <li> <p>A client can call
* <code>GetMedia</code> up to five times per second per stream. </p> </li> <li>
* <p>Kinesis Video Streams sends media data at a rate of up to 25 megabytes per
* second (or 200 megabits per second) during a <code>GetMedia</code> session. </p>
* </li> </ul> <p>If an error is thrown after invoking a Kinesis Video
* Streams media API, in addition to the HTTP status code and the response body, it
* includes the following pieces of information: </p> <ul> <li> <p>
* <code>x-amz-ErrorType</code> HTTP header contains a more specific error type
* in addition to what the HTTP status code provides. </p> </li> <li> <p>
* <code>x-amz-RequestId</code> HTTP header if you want to report an issue to
* AWS, the support team can better diagnose the problem if given the Request
* Id.</p> </li> </ul> <p>Both the HTTP status code and the ErrorType header can be
* utilized to make programmatic decisions about whether errors are retry-able and
* under what conditions, as well as provide information on what actions the client
* programmer might need to take in order to successfully try again.</p> <p>For
* more information, see the <b>Errors</b> section at the bottom of this topic, as
* well as <a
* href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html">Common
* Errors</a>. </p> <p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-media-2017-09-30/GetMedia">AWS
* API Reference</a></p>
*/
virtual Model::GetMediaOutcome GetMedia(const Model::GetMediaRequest& request) const;
/**
* <p> Use this API to retrieve media content from a Kinesis video stream. In the
* request, you identify the stream name or stream Amazon Resource Name (ARN), and
* the starting chunk. Kinesis Video Streams then returns a stream of chunks in
* order by fragment number.</p> <p>You must first call the
* <code>GetDataEndpoint</code> API to get an endpoint. Then send the
* <code>GetMedia</code> requests to this endpoint using the <a
* href="https://docs.aws.amazon.com/cli/latest/reference/">--endpoint-url
* parameter</a>. </p> <p>When you put media data (fragments) on a stream,
* Kinesis Video Streams stores each incoming fragment and related metadata in what
* is called a "chunk." For more information, see <a
* href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html">PutMedia</a>.
* The <code>GetMedia</code> API returns a stream of these chunks starting from the
* chunk that you specify in the request. </p> <p>The following limits apply when
* using the <code>GetMedia</code> API:</p> <ul> <li> <p>A client can call
* <code>GetMedia</code> up to five times per second per stream. </p> </li> <li>
* <p>Kinesis Video Streams sends media data at a rate of up to 25 megabytes per
* second (or 200 megabits per second) during a <code>GetMedia</code> session. </p>
* </li> </ul> <p>If an error is thrown after invoking a Kinesis Video
* Streams media API, in addition to the HTTP status code and the response body, it
* includes the following pieces of information: </p> <ul> <li> <p>
* <code>x-amz-ErrorType</code> HTTP header contains a more specific error type
* in addition to what the HTTP status code provides. </p> </li> <li> <p>
* <code>x-amz-RequestId</code> HTTP header if you want to report an issue to
* AWS, the support team can better diagnose the problem if given the Request
* Id.</p> </li> </ul> <p>Both the HTTP status code and the ErrorType header can be
* utilized to make programmatic decisions about whether errors are retry-able and
* under what conditions, as well as provide information on what actions the client
* programmer might need to take in order to successfully try again.</p> <p>For
* more information, see the <b>Errors</b> section at the bottom of this topic, as
* well as <a
* href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html">Common
* Errors</a>. </p> <p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-media-2017-09-30/GetMedia">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetMediaOutcomeCallable GetMediaCallable(const Model::GetMediaRequest& request) const;
/**
* <p> Use this API to retrieve media content from a Kinesis video stream. In the
* request, you identify the stream name or stream Amazon Resource Name (ARN), and
* the starting chunk. Kinesis Video Streams then returns a stream of chunks in
* order by fragment number.</p> <p>You must first call the
* <code>GetDataEndpoint</code> API to get an endpoint. Then send the
* <code>GetMedia</code> requests to this endpoint using the <a
* href="https://docs.aws.amazon.com/cli/latest/reference/">--endpoint-url
* parameter</a>. </p> <p>When you put media data (fragments) on a stream,
* Kinesis Video Streams stores each incoming fragment and related metadata in what
* is called a "chunk." For more information, see <a
* href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html">PutMedia</a>.
* The <code>GetMedia</code> API returns a stream of these chunks starting from the
* chunk that you specify in the request. </p> <p>The following limits apply when
* using the <code>GetMedia</code> API:</p> <ul> <li> <p>A client can call
* <code>GetMedia</code> up to five times per second per stream. </p> </li> <li>
* <p>Kinesis Video Streams sends media data at a rate of up to 25 megabytes per
* second (or 200 megabits per second) during a <code>GetMedia</code> session. </p>
* </li> </ul> <p>If an error is thrown after invoking a Kinesis Video
* Streams media API, in addition to the HTTP status code and the response body, it
* includes the following pieces of information: </p> <ul> <li> <p>
* <code>x-amz-ErrorType</code> HTTP header contains a more specific error type
* in addition to what the HTTP status code provides. </p> </li> <li> <p>
* <code>x-amz-RequestId</code> HTTP header if you want to report an issue to
* AWS, the support team can better diagnose the problem if given the Request
* Id.</p> </li> </ul> <p>Both the HTTP status code and the ErrorType header can be
* utilized to make programmatic decisions about whether errors are retry-able and
* under what conditions, as well as provide information on what actions the client
* programmer might need to take in order to successfully try again.</p> <p>For
* more information, see the <b>Errors</b> section at the bottom of this topic, as
* well as <a
* href="https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html">Common
* Errors</a>. </p> <p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-media-2017-09-30/GetMedia">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetMediaAsync(const Model::GetMediaRequest& request, const GetMediaResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
void OverrideEndpoint(const Aws::String& endpoint);
private:
void init(const Aws::Client::ClientConfiguration& clientConfiguration);
void GetMediaAsyncHelper(const Model::GetMediaRequest& request, const GetMediaResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
Aws::String m_uri;
Aws::String m_configScheme;
std::shared_ptr<Aws::Utils::Threading::Executor> m_executor;
};
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,21 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace KinesisVideoMedia
{
namespace KinesisVideoMediaEndpoint
{
AWS_KINESISVIDEOMEDIA_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace KinesisVideoMediaEndpoint
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,23 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_KINESISVIDEOMEDIA_API KinesisVideoMediaErrorMarshaller : public Aws::Client::JsonErrorMarshaller
{
public:
Aws::Client::AWSError<Aws::Client::CoreErrors> FindErrorByName(const char* exceptionName) const override;
};
} // namespace Client
} // namespace Aws

View File

@@ -0,0 +1,76 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/core/client/AWSError.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
namespace Aws
{
namespace KinesisVideoMedia
{
enum class KinesisVideoMediaErrors
{
//From Core//
//////////////////////////////////////////////////////////////////////////////////////////
INCOMPLETE_SIGNATURE = 0,
INTERNAL_FAILURE = 1,
INVALID_ACTION = 2,
INVALID_CLIENT_TOKEN_ID = 3,
INVALID_PARAMETER_COMBINATION = 4,
INVALID_QUERY_PARAMETER = 5,
INVALID_PARAMETER_VALUE = 6,
MISSING_ACTION = 7, // SDK should never allow
MISSING_AUTHENTICATION_TOKEN = 8, // SDK should never allow
MISSING_PARAMETER = 9, // SDK should never allow
OPT_IN_REQUIRED = 10,
REQUEST_EXPIRED = 11,
SERVICE_UNAVAILABLE = 12,
THROTTLING = 13,
VALIDATION = 14,
ACCESS_DENIED = 15,
RESOURCE_NOT_FOUND = 16,
UNRECOGNIZED_CLIENT = 17,
MALFORMED_QUERY_STRING = 18,
SLOW_DOWN = 19,
REQUEST_TIME_TOO_SKEWED = 20,
INVALID_SIGNATURE = 21,
SIGNATURE_DOES_NOT_MATCH = 22,
INVALID_ACCESS_KEY_ID = 23,
REQUEST_TIMEOUT = 24,
NETWORK_CONNECTION = 99,
UNKNOWN = 100,
///////////////////////////////////////////////////////////////////////////////////////////
CLIENT_LIMIT_EXCEEDED= static_cast<int>(Aws::Client::CoreErrors::SERVICE_EXTENSION_START_RANGE) + 1,
CONNECTION_LIMIT_EXCEEDED,
INVALID_ARGUMENT,
INVALID_ENDPOINT,
NOT_AUTHORIZED
};
class AWS_KINESISVIDEOMEDIA_API KinesisVideoMediaError : public Aws::Client::AWSError<KinesisVideoMediaErrors>
{
public:
KinesisVideoMediaError() {}
KinesisVideoMediaError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<KinesisVideoMediaErrors>(rhs) {}
KinesisVideoMediaError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<KinesisVideoMediaErrors>(rhs) {}
KinesisVideoMediaError(const Aws::Client::AWSError<KinesisVideoMediaErrors>& rhs) : Aws::Client::AWSError<KinesisVideoMediaErrors>(rhs) {}
KinesisVideoMediaError(Aws::Client::AWSError<KinesisVideoMediaErrors>&& rhs) : Aws::Client::AWSError<KinesisVideoMediaErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace KinesisVideoMediaErrorMapper
{
AWS_KINESISVIDEOMEDIA_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,42 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace KinesisVideoMedia
{
class AWS_KINESISVIDEOMEDIA_API KinesisVideoMediaRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~KinesisVideoMediaRequest () {}
void AddParametersToRequest(Aws::Http::HttpRequest& httpRequest) const { AWS_UNREFERENCED_PARAM(httpRequest); }
inline Aws::Http::HeaderValueCollection GetHeaders() const override
{
auto headers = GetRequestSpecificHeaders();
if(headers.size() == 0 || (headers.size() > 0 && headers.count(Aws::Http::CONTENT_TYPE_HEADER) == 0))
{
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::CONTENT_TYPE_HEADER, Aws::AMZN_JSON_CONTENT_TYPE_1_1 ));
}
headers.emplace(Aws::Http::HeaderValuePair(Aws::Http::API_VERSION_HEADER, "2017-09-30"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,29 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#ifdef _MSC_VER
//disable windows complaining about max template size.
#pragma warning (disable : 4503)
#endif // _MSC_VER
#if defined (USE_WINDOWS_DLL_SEMANTICS) || defined (_WIN32)
#ifdef _MSC_VER
#pragma warning(disable : 4251)
#endif // _MSC_VER
#ifdef USE_IMPORT_EXPORT
#ifdef AWS_KINESISVIDEOMEDIA_EXPORTS
#define AWS_KINESISVIDEOMEDIA_API __declspec(dllexport)
#else
#define AWS_KINESISVIDEOMEDIA_API __declspec(dllimport)
#endif /* AWS_KINESISVIDEOMEDIA_EXPORTS */
#else
#define AWS_KINESISVIDEOMEDIA_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_KINESISVIDEOMEDIA_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,194 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/kinesis-video-media/KinesisVideoMediaRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/kinesis-video-media/model/StartSelector.h>
#include <utility>
namespace Aws
{
namespace KinesisVideoMedia
{
namespace Model
{
/**
*/
class AWS_KINESISVIDEOMEDIA_API GetMediaRequest : public KinesisVideoMediaRequest
{
public:
GetMediaRequest();
// 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 "GetMedia"; }
Aws::String SerializePayload() const override;
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline const Aws::String& GetStreamName() const{ return m_streamName; }
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline bool StreamNameHasBeenSet() const { return m_streamNameHasBeenSet; }
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline void SetStreamName(const Aws::String& value) { m_streamNameHasBeenSet = true; m_streamName = value; }
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline void SetStreamName(Aws::String&& value) { m_streamNameHasBeenSet = true; m_streamName = std::move(value); }
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline void SetStreamName(const char* value) { m_streamNameHasBeenSet = true; m_streamName.assign(value); }
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline GetMediaRequest& WithStreamName(const Aws::String& value) { SetStreamName(value); return *this;}
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline GetMediaRequest& WithStreamName(Aws::String&& value) { SetStreamName(std::move(value)); return *this;}
/**
* <p>The Kinesis video stream name from where you want to get the media content.
* If you don't specify the <code>streamName</code>, you must specify the
* <code>streamARN</code>.</p>
*/
inline GetMediaRequest& WithStreamName(const char* value) { SetStreamName(value); return *this;}
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline const Aws::String& GetStreamARN() const{ return m_streamARN; }
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline bool StreamARNHasBeenSet() const { return m_streamARNHasBeenSet; }
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline void SetStreamARN(const Aws::String& value) { m_streamARNHasBeenSet = true; m_streamARN = value; }
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline void SetStreamARN(Aws::String&& value) { m_streamARNHasBeenSet = true; m_streamARN = std::move(value); }
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline void SetStreamARN(const char* value) { m_streamARNHasBeenSet = true; m_streamARN.assign(value); }
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline GetMediaRequest& WithStreamARN(const Aws::String& value) { SetStreamARN(value); return *this;}
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline GetMediaRequest& WithStreamARN(Aws::String&& value) { SetStreamARN(std::move(value)); return *this;}
/**
* <p>The ARN of the stream from where you want to get the media content. If you
* don't specify the <code>streamARN</code>, you must specify the
* <code>streamName</code>.</p>
*/
inline GetMediaRequest& WithStreamARN(const char* value) { SetStreamARN(value); return *this;}
/**
* <p>Identifies the starting chunk to get from the specified stream. </p>
*/
inline const StartSelector& GetStartSelector() const{ return m_startSelector; }
/**
* <p>Identifies the starting chunk to get from the specified stream. </p>
*/
inline bool StartSelectorHasBeenSet() const { return m_startSelectorHasBeenSet; }
/**
* <p>Identifies the starting chunk to get from the specified stream. </p>
*/
inline void SetStartSelector(const StartSelector& value) { m_startSelectorHasBeenSet = true; m_startSelector = value; }
/**
* <p>Identifies the starting chunk to get from the specified stream. </p>
*/
inline void SetStartSelector(StartSelector&& value) { m_startSelectorHasBeenSet = true; m_startSelector = std::move(value); }
/**
* <p>Identifies the starting chunk to get from the specified stream. </p>
*/
inline GetMediaRequest& WithStartSelector(const StartSelector& value) { SetStartSelector(value); return *this;}
/**
* <p>Identifies the starting chunk to get from the specified stream. </p>
*/
inline GetMediaRequest& WithStartSelector(StartSelector&& value) { SetStartSelector(std::move(value)); return *this;}
private:
Aws::String m_streamName;
bool m_streamNameHasBeenSet;
Aws::String m_streamARN;
bool m_streamARNHasBeenSet;
StartSelector m_startSelector;
bool m_startSelectorHasBeenSet;
};
} // namespace Model
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,145 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/core/utils/stream/ResponseStream.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/Array.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace KinesisVideoMedia
{
namespace Model
{
class AWS_KINESISVIDEOMEDIA_API GetMediaResult
{
public:
GetMediaResult();
//We have to define these because Microsoft doesn't auto generate them
GetMediaResult(GetMediaResult&&);
GetMediaResult& operator=(GetMediaResult&&);
//we delete these because Microsoft doesn't handle move generation correctly
//and we therefore don't trust them to get it right here either.
GetMediaResult(const GetMediaResult&) = delete;
GetMediaResult& operator=(const GetMediaResult&) = delete;
GetMediaResult(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
GetMediaResult& operator=(Aws::AmazonWebServiceResult<Aws::Utils::Stream::ResponseStream>&& result);
/**
* <p>The content type of the requested media.</p>
*/
inline const Aws::String& GetContentType() const{ return m_contentType; }
/**
* <p>The content type of the requested media.</p>
*/
inline void SetContentType(const Aws::String& value) { m_contentType = value; }
/**
* <p>The content type of the requested media.</p>
*/
inline void SetContentType(Aws::String&& value) { m_contentType = std::move(value); }
/**
* <p>The content type of the requested media.</p>
*/
inline void SetContentType(const char* value) { m_contentType.assign(value); }
/**
* <p>The content type of the requested media.</p>
*/
inline GetMediaResult& WithContentType(const Aws::String& value) { SetContentType(value); return *this;}
/**
* <p>The content type of the requested media.</p>
*/
inline GetMediaResult& WithContentType(Aws::String&& value) { SetContentType(std::move(value)); return *this;}
/**
* <p>The content type of the requested media.</p>
*/
inline GetMediaResult& WithContentType(const char* value) { SetContentType(value); return *this;}
/**
* <p> The payload Kinesis Video Streams returns is a sequence of chunks from the
* specified stream. For information about the chunks, see . The chunks that
* Kinesis Video Streams returns in the <code>GetMedia</code> call also include the
* following additional Matroska (MKV) tags: </p> <ul> <li>
* <p>AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your
* <code>GetMedia</code> call terminates, you can use this continuation token in
* your next request to get the next chunk where the last request terminated.</p>
* </li> <li> <p>AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client
* applications can use this tag value to determine how far behind the chunk
* returned in the response is from the latest chunk on the stream. </p> </li> <li>
* <p>AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.</p>
* </li> <li> <p>AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the
* fragment.</p> </li> <li> <p>AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer
* timestamp of the fragment.</p> </li> </ul> <p>The following tags will be present
* if an error occurs:</p> <ul> <li> <p>AWS_KINESISVIDEO_ERROR_CODE - String
* description of an error that caused GetMedia to stop.</p> </li> <li>
* <p>AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.</p> </li> </ul> <p>The
* error codes are as follows:</p> <ul> <li> <p>3002 - Error writing to the
* stream</p> </li> <li> <p>4000 - Requested fragment is not found</p> </li> <li>
* <p>4500 - Access denied for the stream's KMS key</p> </li> <li> <p>4501 -
* Stream's KMS key is disabled</p> </li> <li> <p>4502 - Validation error on the
* stream's KMS key</p> </li> <li> <p>4503 - KMS key specified in the stream is
* unavailable</p> </li> <li> <p>4504 - Invalid usage of the KMS key specified in
* the stream</p> </li> <li> <p>4505 - Invalid state of the KMS key specified in
* the stream</p> </li> <li> <p>4506 - Unable to find the KMS key specified in the
* stream</p> </li> <li> <p>5000 - Internal error</p> </li> </ul>
*/
inline Aws::IOStream& GetPayload() { return m_payload.GetUnderlyingStream(); }
/**
* <p> The payload Kinesis Video Streams returns is a sequence of chunks from the
* specified stream. For information about the chunks, see . The chunks that
* Kinesis Video Streams returns in the <code>GetMedia</code> call also include the
* following additional Matroska (MKV) tags: </p> <ul> <li>
* <p>AWS_KINESISVIDEO_CONTINUATION_TOKEN (UTF-8 string) - In the event your
* <code>GetMedia</code> call terminates, you can use this continuation token in
* your next request to get the next chunk where the last request terminated.</p>
* </li> <li> <p>AWS_KINESISVIDEO_MILLIS_BEHIND_NOW (UTF-8 string) - Client
* applications can use this tag value to determine how far behind the chunk
* returned in the response is from the latest chunk on the stream. </p> </li> <li>
* <p>AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk.</p>
* </li> <li> <p>AWS_KINESISVIDEO_SERVER_TIMESTAMP - Server timestamp of the
* fragment.</p> </li> <li> <p>AWS_KINESISVIDEO_PRODUCER_TIMESTAMP - Producer
* timestamp of the fragment.</p> </li> </ul> <p>The following tags will be present
* if an error occurs:</p> <ul> <li> <p>AWS_KINESISVIDEO_ERROR_CODE - String
* description of an error that caused GetMedia to stop.</p> </li> <li>
* <p>AWS_KINESISVIDEO_ERROR_ID: Integer code of the error.</p> </li> </ul> <p>The
* error codes are as follows:</p> <ul> <li> <p>3002 - Error writing to the
* stream</p> </li> <li> <p>4000 - Requested fragment is not found</p> </li> <li>
* <p>4500 - Access denied for the stream's KMS key</p> </li> <li> <p>4501 -
* Stream's KMS key is disabled</p> </li> <li> <p>4502 - Validation error on the
* stream's KMS key</p> </li> <li> <p>4503 - KMS key specified in the stream is
* unavailable</p> </li> <li> <p>4504 - Invalid usage of the KMS key specified in
* the stream</p> </li> <li> <p>4505 - Invalid state of the KMS key specified in
* the stream</p> </li> <li> <p>4506 - Unable to find the KMS key specified in the
* stream</p> </li> <li> <p>5000 - Internal error</p> </li> </ul>
*/
inline void ReplaceBody(Aws::IOStream* body) { m_payload = Aws::Utils::Stream::ResponseStream(body); }
private:
Aws::String m_contentType;
Aws::Utils::Stream::ResponseStream m_payload;
};
} // namespace Model
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,320 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/kinesis-video-media/model/StartSelectorType.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/core/utils/DateTime.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace KinesisVideoMedia
{
namespace Model
{
/**
* <p>Identifies the chunk on the Kinesis video stream where you want the
* <code>GetMedia</code> API to start returning media data. You have the following
* options to identify the starting chunk: </p> <ul> <li> <p>Choose the latest (or
* oldest) chunk.</p> </li> <li> <p>Identify a specific chunk. You can identify a
* specific chunk either by providing a fragment number or timestamp (server or
* producer). </p> </li> <li> <p>Each chunk's metadata includes a continuation
* token as a Matroska (MKV) tag
* (<code>AWS_KINESISVIDEO_CONTINUATION_TOKEN</code>). If your previous
* <code>GetMedia</code> request terminated, you can use this tag value in your
* next <code>GetMedia</code> request. The API then starts returning chunks
* starting where the last API ended.</p> </li> </ul><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-media-2017-09-30/StartSelector">AWS
* API Reference</a></p>
*/
class AWS_KINESISVIDEOMEDIA_API StartSelector
{
public:
StartSelector();
StartSelector(Aws::Utils::Json::JsonView jsonValue);
StartSelector& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>Identifies the fragment on the Kinesis video stream where you want to start
* getting the data from.</p> <ul> <li> <p>NOW - Start with the latest chunk on the
* stream.</p> </li> <li> <p>EARLIEST - Start with earliest available chunk on the
* stream.</p> </li> <li> <p>FRAGMENT_NUMBER - Start with the chunk after a
* specific fragment. You must also specify the <code>AfterFragmentNumber</code>
* parameter.</p> </li> <li> <p>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 <code>StartTimestamp</code>.</p> </li> <li>
* <p> CONTINUATION_TOKEN - Read using the specified continuation token. </p> </li>
* </ul> <p>If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the
* <code>startSelectorType</code>, you don't provide any additional information in
* the <code>startSelector</code>.</p>
*/
inline const StartSelectorType& GetStartSelectorType() const{ return m_startSelectorType; }
/**
* <p>Identifies the fragment on the Kinesis video stream where you want to start
* getting the data from.</p> <ul> <li> <p>NOW - Start with the latest chunk on the
* stream.</p> </li> <li> <p>EARLIEST - Start with earliest available chunk on the
* stream.</p> </li> <li> <p>FRAGMENT_NUMBER - Start with the chunk after a
* specific fragment. You must also specify the <code>AfterFragmentNumber</code>
* parameter.</p> </li> <li> <p>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 <code>StartTimestamp</code>.</p> </li> <li>
* <p> CONTINUATION_TOKEN - Read using the specified continuation token. </p> </li>
* </ul> <p>If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the
* <code>startSelectorType</code>, you don't provide any additional information in
* the <code>startSelector</code>.</p>
*/
inline bool StartSelectorTypeHasBeenSet() const { return m_startSelectorTypeHasBeenSet; }
/**
* <p>Identifies the fragment on the Kinesis video stream where you want to start
* getting the data from.</p> <ul> <li> <p>NOW - Start with the latest chunk on the
* stream.</p> </li> <li> <p>EARLIEST - Start with earliest available chunk on the
* stream.</p> </li> <li> <p>FRAGMENT_NUMBER - Start with the chunk after a
* specific fragment. You must also specify the <code>AfterFragmentNumber</code>
* parameter.</p> </li> <li> <p>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 <code>StartTimestamp</code>.</p> </li> <li>
* <p> CONTINUATION_TOKEN - Read using the specified continuation token. </p> </li>
* </ul> <p>If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the
* <code>startSelectorType</code>, you don't provide any additional information in
* the <code>startSelector</code>.</p>
*/
inline void SetStartSelectorType(const StartSelectorType& value) { m_startSelectorTypeHasBeenSet = true; m_startSelectorType = value; }
/**
* <p>Identifies the fragment on the Kinesis video stream where you want to start
* getting the data from.</p> <ul> <li> <p>NOW - Start with the latest chunk on the
* stream.</p> </li> <li> <p>EARLIEST - Start with earliest available chunk on the
* stream.</p> </li> <li> <p>FRAGMENT_NUMBER - Start with the chunk after a
* specific fragment. You must also specify the <code>AfterFragmentNumber</code>
* parameter.</p> </li> <li> <p>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 <code>StartTimestamp</code>.</p> </li> <li>
* <p> CONTINUATION_TOKEN - Read using the specified continuation token. </p> </li>
* </ul> <p>If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the
* <code>startSelectorType</code>, you don't provide any additional information in
* the <code>startSelector</code>.</p>
*/
inline void SetStartSelectorType(StartSelectorType&& value) { m_startSelectorTypeHasBeenSet = true; m_startSelectorType = std::move(value); }
/**
* <p>Identifies the fragment on the Kinesis video stream where you want to start
* getting the data from.</p> <ul> <li> <p>NOW - Start with the latest chunk on the
* stream.</p> </li> <li> <p>EARLIEST - Start with earliest available chunk on the
* stream.</p> </li> <li> <p>FRAGMENT_NUMBER - Start with the chunk after a
* specific fragment. You must also specify the <code>AfterFragmentNumber</code>
* parameter.</p> </li> <li> <p>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 <code>StartTimestamp</code>.</p> </li> <li>
* <p> CONTINUATION_TOKEN - Read using the specified continuation token. </p> </li>
* </ul> <p>If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the
* <code>startSelectorType</code>, you don't provide any additional information in
* the <code>startSelector</code>.</p>
*/
inline StartSelector& WithStartSelectorType(const StartSelectorType& value) { SetStartSelectorType(value); return *this;}
/**
* <p>Identifies the fragment on the Kinesis video stream where you want to start
* getting the data from.</p> <ul> <li> <p>NOW - Start with the latest chunk on the
* stream.</p> </li> <li> <p>EARLIEST - Start with earliest available chunk on the
* stream.</p> </li> <li> <p>FRAGMENT_NUMBER - Start with the chunk after a
* specific fragment. You must also specify the <code>AfterFragmentNumber</code>
* parameter.</p> </li> <li> <p>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 <code>StartTimestamp</code>.</p> </li> <li>
* <p> CONTINUATION_TOKEN - Read using the specified continuation token. </p> </li>
* </ul> <p>If you choose the NOW, EARLIEST, or CONTINUATION_TOKEN as the
* <code>startSelectorType</code>, you don't provide any additional information in
* the <code>startSelector</code>.</p>
*/
inline StartSelector& WithStartSelectorType(StartSelectorType&& value) { SetStartSelectorType(std::move(value)); return *this;}
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline const Aws::String& GetAfterFragmentNumber() const{ return m_afterFragmentNumber; }
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline bool AfterFragmentNumberHasBeenSet() const { return m_afterFragmentNumberHasBeenSet; }
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline void SetAfterFragmentNumber(const Aws::String& value) { m_afterFragmentNumberHasBeenSet = true; m_afterFragmentNumber = value; }
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline void SetAfterFragmentNumber(Aws::String&& value) { m_afterFragmentNumberHasBeenSet = true; m_afterFragmentNumber = std::move(value); }
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline void SetAfterFragmentNumber(const char* value) { m_afterFragmentNumberHasBeenSet = true; m_afterFragmentNumber.assign(value); }
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline StartSelector& WithAfterFragmentNumber(const Aws::String& value) { SetAfterFragmentNumber(value); return *this;}
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline StartSelector& WithAfterFragmentNumber(Aws::String&& value) { SetAfterFragmentNumber(std::move(value)); return *this;}
/**
* <p>Specifies the fragment number from where you want the <code>GetMedia</code>
* API to start returning the fragments. </p>
*/
inline StartSelector& WithAfterFragmentNumber(const char* value) { SetAfterFragmentNumber(value); return *this;}
/**
* <p>A timestamp value. This value is required if you choose the
* PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the
* <code>startSelectorType</code>. The <code>GetMedia</code> API then starts with
* the chunk containing the fragment that has the specified timestamp.</p>
*/
inline const Aws::Utils::DateTime& GetStartTimestamp() const{ return m_startTimestamp; }
/**
* <p>A timestamp value. This value is required if you choose the
* PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the
* <code>startSelectorType</code>. The <code>GetMedia</code> API then starts with
* the chunk containing the fragment that has the specified timestamp.</p>
*/
inline bool StartTimestampHasBeenSet() const { return m_startTimestampHasBeenSet; }
/**
* <p>A timestamp value. This value is required if you choose the
* PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the
* <code>startSelectorType</code>. The <code>GetMedia</code> API then starts with
* the chunk containing the fragment that has the specified timestamp.</p>
*/
inline void SetStartTimestamp(const Aws::Utils::DateTime& value) { m_startTimestampHasBeenSet = true; m_startTimestamp = value; }
/**
* <p>A timestamp value. This value is required if you choose the
* PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the
* <code>startSelectorType</code>. The <code>GetMedia</code> API then starts with
* the chunk containing the fragment that has the specified timestamp.</p>
*/
inline void SetStartTimestamp(Aws::Utils::DateTime&& value) { m_startTimestampHasBeenSet = true; m_startTimestamp = std::move(value); }
/**
* <p>A timestamp value. This value is required if you choose the
* PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the
* <code>startSelectorType</code>. The <code>GetMedia</code> API then starts with
* the chunk containing the fragment that has the specified timestamp.</p>
*/
inline StartSelector& WithStartTimestamp(const Aws::Utils::DateTime& value) { SetStartTimestamp(value); return *this;}
/**
* <p>A timestamp value. This value is required if you choose the
* PRODUCER_TIMESTAMP or the SERVER_TIMESTAMP as the
* <code>startSelectorType</code>. The <code>GetMedia</code> API then starts with
* the chunk containing the fragment that has the specified timestamp.</p>
*/
inline StartSelector& WithStartTimestamp(Aws::Utils::DateTime&& value) { SetStartTimestamp(std::move(value)); return *this;}
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline const Aws::String& GetContinuationToken() const{ return m_continuationToken; }
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline bool ContinuationTokenHasBeenSet() const { return m_continuationTokenHasBeenSet; }
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline void SetContinuationToken(const Aws::String& value) { m_continuationTokenHasBeenSet = true; m_continuationToken = value; }
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline void SetContinuationToken(Aws::String&& value) { m_continuationTokenHasBeenSet = true; m_continuationToken = std::move(value); }
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline void SetContinuationToken(const char* value) { m_continuationTokenHasBeenSet = true; m_continuationToken.assign(value); }
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline StartSelector& WithContinuationToken(const Aws::String& value) { SetContinuationToken(value); return *this;}
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline StartSelector& WithContinuationToken(Aws::String&& value) { SetContinuationToken(std::move(value)); return *this;}
/**
* <p>Continuation token that Kinesis Video Streams returned in the previous
* <code>GetMedia</code> response. The <code>GetMedia</code> API then starts with
* the chunk identified by the continuation token.</p>
*/
inline StartSelector& WithContinuationToken(const char* value) { SetContinuationToken(value); return *this;}
private:
StartSelectorType m_startSelectorType;
bool m_startSelectorTypeHasBeenSet;
Aws::String m_afterFragmentNumber;
bool m_afterFragmentNumberHasBeenSet;
Aws::Utils::DateTime m_startTimestamp;
bool m_startTimestampHasBeenSet;
Aws::String m_continuationToken;
bool m_continuationTokenHasBeenSet;
};
} // namespace Model
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,35 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-media/KinesisVideoMedia_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace KinesisVideoMedia
{
namespace Model
{
enum class StartSelectorType
{
NOT_SET,
FRAGMENT_NUMBER,
SERVER_TIMESTAMP,
PRODUCER_TIMESTAMP,
NOW,
EARLIEST,
CONTINUATION_TOKEN
};
namespace StartSelectorTypeMapper
{
AWS_KINESISVIDEOMEDIA_API StartSelectorType GetStartSelectorTypeForName(const Aws::String& name);
AWS_KINESISVIDEOMEDIA_API Aws::String GetNameForStartSelectorType(StartSelectorType value);
} // namespace StartSelectorTypeMapper
} // namespace Model
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,124 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/utils/Outcome.h>
#include <aws/core/auth/AWSAuthSigner.h>
#include <aws/core/client/CoreErrors.h>
#include <aws/core/client/RetryStrategy.h>
#include <aws/core/http/HttpClient.h>
#include <aws/core/http/HttpResponse.h>
#include <aws/core/http/HttpClientFactory.h>
#include <aws/core/auth/AWSCredentialsProviderChain.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/threading/Executor.h>
#include <aws/core/utils/DNS.h>
#include <aws/core/utils/logging/LogMacros.h>
#include <aws/kinesis-video-media/KinesisVideoMediaClient.h>
#include <aws/kinesis-video-media/KinesisVideoMediaEndpoint.h>
#include <aws/kinesis-video-media/KinesisVideoMediaErrorMarshaller.h>
#include <aws/kinesis-video-media/model/GetMediaRequest.h>
using namespace Aws;
using namespace Aws::Auth;
using namespace Aws::Client;
using namespace Aws::KinesisVideoMedia;
using namespace Aws::KinesisVideoMedia::Model;
using namespace Aws::Http;
using namespace Aws::Utils::Json;
static const char* SERVICE_NAME = "kinesisvideo";
static const char* ALLOCATION_TAG = "KinesisVideoMediaClient";
KinesisVideoMediaClient::KinesisVideoMediaClient(const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<DefaultAWSCredentialsProviderChain>(ALLOCATION_TAG),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<KinesisVideoMediaErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
KinesisVideoMediaClient::KinesisVideoMediaClient(const AWSCredentials& credentials, const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, Aws::MakeShared<SimpleAWSCredentialsProvider>(ALLOCATION_TAG, credentials),
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<KinesisVideoMediaErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
KinesisVideoMediaClient::KinesisVideoMediaClient(const std::shared_ptr<AWSCredentialsProvider>& credentialsProvider,
const Client::ClientConfiguration& clientConfiguration) :
BASECLASS(clientConfiguration,
Aws::MakeShared<AWSAuthV4Signer>(ALLOCATION_TAG, credentialsProvider,
SERVICE_NAME, Aws::Region::ComputeSignerRegion(clientConfiguration.region)),
Aws::MakeShared<KinesisVideoMediaErrorMarshaller>(ALLOCATION_TAG)),
m_executor(clientConfiguration.executor)
{
init(clientConfiguration);
}
KinesisVideoMediaClient::~KinesisVideoMediaClient()
{
}
void KinesisVideoMediaClient::init(const ClientConfiguration& config)
{
SetServiceClientName("Kinesis Video Media");
m_configScheme = SchemeMapper::ToString(config.scheme);
if (config.endpointOverride.empty())
{
m_uri = m_configScheme + "://" + KinesisVideoMediaEndpoint::ForRegion(config.region, config.useDualStack);
}
else
{
OverrideEndpoint(config.endpointOverride);
}
}
void KinesisVideoMediaClient::OverrideEndpoint(const Aws::String& endpoint)
{
if (endpoint.compare(0, 7, "http://") == 0 || endpoint.compare(0, 8, "https://") == 0)
{
m_uri = endpoint;
}
else
{
m_uri = m_configScheme + "://" + endpoint;
}
}
GetMediaOutcome KinesisVideoMediaClient::GetMedia(const GetMediaRequest& request) const
{
Aws::Http::URI uri = m_uri;
Aws::StringStream ss;
ss << "/getMedia";
uri.SetPath(uri.GetPath() + ss.str());
return GetMediaOutcome(MakeRequestWithUnparsedResponse(uri, request, Aws::Http::HttpMethod::HTTP_POST));
}
GetMediaOutcomeCallable KinesisVideoMediaClient::GetMediaCallable(const GetMediaRequest& request) const
{
auto task = Aws::MakeShared< std::packaged_task< GetMediaOutcome() > >(ALLOCATION_TAG, [this, request](){ return this->GetMedia(request); } );
auto packagedFunction = [task]() { (*task)(); };
m_executor->Submit(packagedFunction);
return task->get_future();
}
void KinesisVideoMediaClient::GetMediaAsync(const GetMediaRequest& request, const GetMediaResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
m_executor->Submit( [this, request, handler, context](){ this->GetMediaAsyncHelper( request, handler, context ); } );
}
void KinesisVideoMediaClient::GetMediaAsyncHelper(const GetMediaRequest& request, const GetMediaResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const
{
handler(this, request, GetMedia(request), context);
}

View File

@@ -0,0 +1,64 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kinesis-video-media/KinesisVideoMediaEndpoint.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
using namespace Aws;
using namespace Aws::KinesisVideoMedia;
namespace Aws
{
namespace KinesisVideoMedia
{
namespace KinesisVideoMediaEndpoint
{
static const int CN_NORTH_1_HASH = Aws::Utils::HashingUtils::HashString("cn-north-1");
static const int CN_NORTHWEST_1_HASH = Aws::Utils::HashingUtils::HashString("cn-northwest-1");
static const int US_ISO_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-iso-east-1");
static const int US_ISOB_EAST_1_HASH = Aws::Utils::HashingUtils::HashString("us-isob-east-1");
Aws::String ForRegion(const Aws::String& regionName, bool useDualStack)
{
// Fallback to us-east-1 if global endpoint does not exists.
Aws::String region = regionName == Aws::Region::AWS_GLOBAL ? Aws::Region::US_EAST_1 : regionName;
auto hash = Aws::Utils::HashingUtils::HashString(region.c_str());
Aws::StringStream ss;
ss << "kinesisvideo" << ".";
if(useDualStack)
{
ss << "dualstack.";
}
ss << region;
if (hash == CN_NORTH_1_HASH || hash == CN_NORTHWEST_1_HASH)
{
ss << ".amazonaws.com.cn";
}
else if (hash == US_ISO_EAST_1_HASH)
{
ss << ".c2s.ic.gov";
}
else if (hash == US_ISOB_EAST_1_HASH)
{
ss << ".sc2s.sgov.gov";
}
else
{
ss << ".amazonaws.com";
}
return ss.str();
}
} // namespace KinesisVideoMediaEndpoint
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,22 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/kinesis-video-media/KinesisVideoMediaErrorMarshaller.h>
#include <aws/kinesis-video-media/KinesisVideoMediaErrors.h>
using namespace Aws::Client;
using namespace Aws::KinesisVideoMedia;
AWSError<CoreErrors> KinesisVideoMediaErrorMarshaller::FindErrorByName(const char* errorName) const
{
AWSError<CoreErrors> error = KinesisVideoMediaErrorMapper::GetErrorForName(errorName);
if(error.GetErrorType() != CoreErrors::UNKNOWN)
{
return error;
}
return AWSErrorMarshaller::FindErrorByName(errorName);
}

View File

@@ -0,0 +1,57 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/core/client/AWSError.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/kinesis-video-media/KinesisVideoMediaErrors.h>
using namespace Aws::Client;
using namespace Aws::Utils;
using namespace Aws::KinesisVideoMedia;
namespace Aws
{
namespace KinesisVideoMedia
{
namespace KinesisVideoMediaErrorMapper
{
static const int INVALID_ENDPOINT_HASH = HashingUtils::HashString("InvalidEndpointException");
static const int CONNECTION_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ConnectionLimitExceededException");
static const int NOT_AUTHORIZED_HASH = HashingUtils::HashString("NotAuthorizedException");
static const int CLIENT_LIMIT_EXCEEDED_HASH = HashingUtils::HashString("ClientLimitExceededException");
static const int INVALID_ARGUMENT_HASH = HashingUtils::HashString("InvalidArgumentException");
AWSError<CoreErrors> GetErrorForName(const char* errorName)
{
int hashCode = HashingUtils::HashString(errorName);
if (hashCode == INVALID_ENDPOINT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(KinesisVideoMediaErrors::INVALID_ENDPOINT), false);
}
else if (hashCode == CONNECTION_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(KinesisVideoMediaErrors::CONNECTION_LIMIT_EXCEEDED), false);
}
else if (hashCode == NOT_AUTHORIZED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(KinesisVideoMediaErrors::NOT_AUTHORIZED), false);
}
else if (hashCode == CLIENT_LIMIT_EXCEEDED_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(KinesisVideoMediaErrors::CLIENT_LIMIT_EXCEEDED), false);
}
else if (hashCode == INVALID_ARGUMENT_HASH)
{
return AWSError<CoreErrors>(static_cast<CoreErrors>(KinesisVideoMediaErrors::INVALID_ARGUMENT), false);
}
return AWSError<CoreErrors>(CoreErrors::UNKNOWN, false);
}
} // namespace KinesisVideoMediaErrorMapper
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,49 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kinesis-video-media/model/GetMediaRequest.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::KinesisVideoMedia::Model;
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
GetMediaRequest::GetMediaRequest() :
m_streamNameHasBeenSet(false),
m_streamARNHasBeenSet(false),
m_startSelectorHasBeenSet(false)
{
}
Aws::String GetMediaRequest::SerializePayload() const
{
JsonValue payload;
if(m_streamNameHasBeenSet)
{
payload.WithString("StreamName", m_streamName);
}
if(m_streamARNHasBeenSet)
{
payload.WithString("StreamARN", m_streamARN);
}
if(m_startSelectorHasBeenSet)
{
payload.WithObject("StartSelector", m_startSelector.Jsonize());
}
return payload.View().WriteReadable();
}

View File

@@ -0,0 +1,59 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kinesis-video-media/model/GetMediaResult.h>
#include <aws/core/AmazonWebServiceResult.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
#include <aws/core/utils/HashingUtils.h>
#include <utility>
using namespace Aws::KinesisVideoMedia::Model;
using namespace Aws::Utils::Stream;
using namespace Aws::Utils;
using namespace Aws;
GetMediaResult::GetMediaResult()
{
}
GetMediaResult::GetMediaResult(GetMediaResult&& toMove) :
m_contentType(std::move(toMove.m_contentType)),
m_payload(std::move(toMove.m_payload))
{
}
GetMediaResult& GetMediaResult::operator=(GetMediaResult&& toMove)
{
if(this == &toMove)
{
return *this;
}
m_contentType = std::move(toMove.m_contentType);
m_payload = std::move(toMove.m_payload);
return *this;
}
GetMediaResult::GetMediaResult(Aws::AmazonWebServiceResult<ResponseStream>&& result)
{
*this = std::move(result);
}
GetMediaResult& GetMediaResult::operator =(Aws::AmazonWebServiceResult<ResponseStream>&& result)
{
m_payload = result.TakeOwnershipOfPayload();
const auto& headers = result.GetHeaderValueCollection();
const auto& contentTypeIter = headers.find("content-type");
if(contentTypeIter != headers.end())
{
m_contentType = contentTypeIter->second;
}
return *this;
}

View File

@@ -0,0 +1,104 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kinesis-video-media/model/StartSelector.h>
#include <aws/core/utils/json/JsonSerializer.h>
#include <utility>
using namespace Aws::Utils::Json;
using namespace Aws::Utils;
namespace Aws
{
namespace KinesisVideoMedia
{
namespace Model
{
StartSelector::StartSelector() :
m_startSelectorType(StartSelectorType::NOT_SET),
m_startSelectorTypeHasBeenSet(false),
m_afterFragmentNumberHasBeenSet(false),
m_startTimestampHasBeenSet(false),
m_continuationTokenHasBeenSet(false)
{
}
StartSelector::StartSelector(JsonView jsonValue) :
m_startSelectorType(StartSelectorType::NOT_SET),
m_startSelectorTypeHasBeenSet(false),
m_afterFragmentNumberHasBeenSet(false),
m_startTimestampHasBeenSet(false),
m_continuationTokenHasBeenSet(false)
{
*this = jsonValue;
}
StartSelector& StartSelector::operator =(JsonView jsonValue)
{
if(jsonValue.ValueExists("StartSelectorType"))
{
m_startSelectorType = StartSelectorTypeMapper::GetStartSelectorTypeForName(jsonValue.GetString("StartSelectorType"));
m_startSelectorTypeHasBeenSet = true;
}
if(jsonValue.ValueExists("AfterFragmentNumber"))
{
m_afterFragmentNumber = jsonValue.GetString("AfterFragmentNumber");
m_afterFragmentNumberHasBeenSet = true;
}
if(jsonValue.ValueExists("StartTimestamp"))
{
m_startTimestamp = jsonValue.GetDouble("StartTimestamp");
m_startTimestampHasBeenSet = true;
}
if(jsonValue.ValueExists("ContinuationToken"))
{
m_continuationToken = jsonValue.GetString("ContinuationToken");
m_continuationTokenHasBeenSet = true;
}
return *this;
}
JsonValue StartSelector::Jsonize() const
{
JsonValue payload;
if(m_startSelectorTypeHasBeenSet)
{
payload.WithString("StartSelectorType", StartSelectorTypeMapper::GetNameForStartSelectorType(m_startSelectorType));
}
if(m_afterFragmentNumberHasBeenSet)
{
payload.WithString("AfterFragmentNumber", m_afterFragmentNumber);
}
if(m_startTimestampHasBeenSet)
{
payload.WithDouble("StartTimestamp", m_startTimestamp.SecondsWithMSPrecision());
}
if(m_continuationTokenHasBeenSet)
{
payload.WithString("ContinuationToken", m_continuationToken);
}
return payload;
}
} // namespace Model
} // namespace KinesisVideoMedia
} // namespace Aws

View File

@@ -0,0 +1,98 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#include <aws/kinesis-video-media/model/StartSelectorType.h>
#include <aws/core/utils/HashingUtils.h>
#include <aws/core/Globals.h>
#include <aws/core/utils/EnumParseOverflowContainer.h>
using namespace Aws::Utils;
namespace Aws
{
namespace KinesisVideoMedia
{
namespace Model
{
namespace StartSelectorTypeMapper
{
static const int FRAGMENT_NUMBER_HASH = HashingUtils::HashString("FRAGMENT_NUMBER");
static const int SERVER_TIMESTAMP_HASH = HashingUtils::HashString("SERVER_TIMESTAMP");
static const int PRODUCER_TIMESTAMP_HASH = HashingUtils::HashString("PRODUCER_TIMESTAMP");
static const int NOW_HASH = HashingUtils::HashString("NOW");
static const int EARLIEST_HASH = HashingUtils::HashString("EARLIEST");
static const int CONTINUATION_TOKEN_HASH = HashingUtils::HashString("CONTINUATION_TOKEN");
StartSelectorType GetStartSelectorTypeForName(const Aws::String& name)
{
int hashCode = HashingUtils::HashString(name.c_str());
if (hashCode == FRAGMENT_NUMBER_HASH)
{
return StartSelectorType::FRAGMENT_NUMBER;
}
else if (hashCode == SERVER_TIMESTAMP_HASH)
{
return StartSelectorType::SERVER_TIMESTAMP;
}
else if (hashCode == PRODUCER_TIMESTAMP_HASH)
{
return StartSelectorType::PRODUCER_TIMESTAMP;
}
else if (hashCode == NOW_HASH)
{
return StartSelectorType::NOW;
}
else if (hashCode == EARLIEST_HASH)
{
return StartSelectorType::EARLIEST;
}
else if (hashCode == CONTINUATION_TOKEN_HASH)
{
return StartSelectorType::CONTINUATION_TOKEN;
}
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
overflowContainer->StoreOverflow(hashCode, name);
return static_cast<StartSelectorType>(hashCode);
}
return StartSelectorType::NOT_SET;
}
Aws::String GetNameForStartSelectorType(StartSelectorType enumValue)
{
switch(enumValue)
{
case StartSelectorType::FRAGMENT_NUMBER:
return "FRAGMENT_NUMBER";
case StartSelectorType::SERVER_TIMESTAMP:
return "SERVER_TIMESTAMP";
case StartSelectorType::PRODUCER_TIMESTAMP:
return "PRODUCER_TIMESTAMP";
case StartSelectorType::NOW:
return "NOW";
case StartSelectorType::EARLIEST:
return "EARLIEST";
case StartSelectorType::CONTINUATION_TOKEN:
return "CONTINUATION_TOKEN";
default:
EnumParseOverflowContainer* overflowContainer = Aws::GetEnumOverflowContainer();
if(overflowContainer)
{
return overflowContainer->RetrieveOverflow(static_cast<int>(enumValue));
}
return {};
}
}
} // namespace StartSelectorTypeMapper
} // namespace Model
} // namespace KinesisVideoMedia
} // namespace Aws