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,226 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannelsErrors.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-signaling/model/GetIceServerConfigResult.h>
#include <aws/kinesis-video-signaling/model/SendAlexaOfferToMasterResult.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 KinesisVideoSignalingChannels
{
namespace Model
{
class GetIceServerConfigRequest;
class SendAlexaOfferToMasterRequest;
typedef Aws::Utils::Outcome<GetIceServerConfigResult, KinesisVideoSignalingChannelsError> GetIceServerConfigOutcome;
typedef Aws::Utils::Outcome<SendAlexaOfferToMasterResult, KinesisVideoSignalingChannelsError> SendAlexaOfferToMasterOutcome;
typedef std::future<GetIceServerConfigOutcome> GetIceServerConfigOutcomeCallable;
typedef std::future<SendAlexaOfferToMasterOutcome> SendAlexaOfferToMasterOutcomeCallable;
} // namespace Model
class KinesisVideoSignalingChannelsClient;
typedef std::function<void(const KinesisVideoSignalingChannelsClient*, const Model::GetIceServerConfigRequest&, const Model::GetIceServerConfigOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > GetIceServerConfigResponseReceivedHandler;
typedef std::function<void(const KinesisVideoSignalingChannelsClient*, const Model::SendAlexaOfferToMasterRequest&, const Model::SendAlexaOfferToMasterOutcome&, const std::shared_ptr<const Aws::Client::AsyncCallerContext>&) > SendAlexaOfferToMasterResponseReceivedHandler;
/**
* <p>Kinesis Video Streams Signaling Service is a intermediate service that
* establishes a communication channel for discovering peers, transmitting offers
* and answers in order to establish peer-to-peer connection in webRTC
* technology.</p>
*/
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API KinesisVideoSignalingChannelsClient : 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.
*/
KinesisVideoSignalingChannelsClient(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.
*/
KinesisVideoSignalingChannelsClient(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
*/
KinesisVideoSignalingChannelsClient(const std::shared_ptr<Aws::Auth::AWSCredentialsProvider>& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration = Aws::Client::ClientConfiguration());
virtual ~KinesisVideoSignalingChannelsClient();
/**
* <p>Gets the Interactive Connectivity Establishment (ICE) server configuration
* information, including URIs, username, and password which can be used to
* configure the WebRTC connection. The ICE component uses this configuration
* information to setup the WebRTC connection, including authenticating with the
* Traversal Using Relays around NAT (TURN) relay server. </p> <p>TURN is a
* protocol that is used to improve the connectivity of peer-to-peer applications.
* By providing a cloud-based relay service, TURN ensures that a connection can be
* established even when one or more peers are incapable of a direct peer-to-peer
* connection. For more information, see <a
* href="https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00">A REST API
* For Access To TURN Services</a>.</p> <p> You can invoke this API to establish a
* fallback mechanism in case either of the peers is unable to establish a direct
* peer-to-peer connection over a signaling channel. You must specify either a
* signaling channel ARN or the client ID in order to invoke this
* API.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/GetIceServerConfig">AWS
* API Reference</a></p>
*/
virtual Model::GetIceServerConfigOutcome GetIceServerConfig(const Model::GetIceServerConfigRequest& request) const;
/**
* <p>Gets the Interactive Connectivity Establishment (ICE) server configuration
* information, including URIs, username, and password which can be used to
* configure the WebRTC connection. The ICE component uses this configuration
* information to setup the WebRTC connection, including authenticating with the
* Traversal Using Relays around NAT (TURN) relay server. </p> <p>TURN is a
* protocol that is used to improve the connectivity of peer-to-peer applications.
* By providing a cloud-based relay service, TURN ensures that a connection can be
* established even when one or more peers are incapable of a direct peer-to-peer
* connection. For more information, see <a
* href="https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00">A REST API
* For Access To TURN Services</a>.</p> <p> You can invoke this API to establish a
* fallback mechanism in case either of the peers is unable to establish a direct
* peer-to-peer connection over a signaling channel. You must specify either a
* signaling channel ARN or the client ID in order to invoke this
* API.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/GetIceServerConfig">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::GetIceServerConfigOutcomeCallable GetIceServerConfigCallable(const Model::GetIceServerConfigRequest& request) const;
/**
* <p>Gets the Interactive Connectivity Establishment (ICE) server configuration
* information, including URIs, username, and password which can be used to
* configure the WebRTC connection. The ICE component uses this configuration
* information to setup the WebRTC connection, including authenticating with the
* Traversal Using Relays around NAT (TURN) relay server. </p> <p>TURN is a
* protocol that is used to improve the connectivity of peer-to-peer applications.
* By providing a cloud-based relay service, TURN ensures that a connection can be
* established even when one or more peers are incapable of a direct peer-to-peer
* connection. For more information, see <a
* href="https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00">A REST API
* For Access To TURN Services</a>.</p> <p> You can invoke this API to establish a
* fallback mechanism in case either of the peers is unable to establish a direct
* peer-to-peer connection over a signaling channel. You must specify either a
* signaling channel ARN or the client ID in order to invoke this
* API.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/GetIceServerConfig">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void GetIceServerConfigAsync(const Model::GetIceServerConfigRequest& request, const GetIceServerConfigResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context = nullptr) const;
/**
* <p>This API allows you to connect WebRTC-enabled devices with Alexa display
* devices. When invoked, it sends the Alexa Session Description Protocol (SDP)
* offer to the master peer. The offer is delivered as soon as the master is
* connected to the specified signaling channel. This API returns the SDP answer
* from the connected master. If the master is not connected to the signaling
* channel, redelivery requests are made until the message expires.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/SendAlexaOfferToMaster">AWS
* API Reference</a></p>
*/
virtual Model::SendAlexaOfferToMasterOutcome SendAlexaOfferToMaster(const Model::SendAlexaOfferToMasterRequest& request) const;
/**
* <p>This API allows you to connect WebRTC-enabled devices with Alexa display
* devices. When invoked, it sends the Alexa Session Description Protocol (SDP)
* offer to the master peer. The offer is delivered as soon as the master is
* connected to the specified signaling channel. This API returns the SDP answer
* from the connected master. If the master is not connected to the signaling
* channel, redelivery requests are made until the message expires.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/SendAlexaOfferToMaster">AWS
* API Reference</a></p>
*
* returns a future to the operation so that it can be executed in parallel to other requests.
*/
virtual Model::SendAlexaOfferToMasterOutcomeCallable SendAlexaOfferToMasterCallable(const Model::SendAlexaOfferToMasterRequest& request) const;
/**
* <p>This API allows you to connect WebRTC-enabled devices with Alexa display
* devices. When invoked, it sends the Alexa Session Description Protocol (SDP)
* offer to the master peer. The offer is delivered as soon as the master is
* connected to the specified signaling channel. This API returns the SDP answer
* from the connected master. If the master is not connected to the signaling
* channel, redelivery requests are made until the message expires.</p><p><h3>See
* Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/SendAlexaOfferToMaster">AWS
* API Reference</a></p>
*
* Queues the request into a thread executor and triggers associated callback when operation has finished.
*/
virtual void SendAlexaOfferToMasterAsync(const Model::SendAlexaOfferToMasterRequest& request, const SendAlexaOfferToMasterResponseReceivedHandler& 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 GetIceServerConfigAsyncHelper(const Model::GetIceServerConfigRequest& request, const GetIceServerConfigResponseReceivedHandler& handler, const std::shared_ptr<const Aws::Client::AsyncCallerContext>& context) const;
void SendAlexaOfferToMasterAsyncHelper(const Model::SendAlexaOfferToMasterRequest& request, const SendAlexaOfferToMasterResponseReceivedHandler& 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 KinesisVideoSignalingChannels
} // 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-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/Region.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace KinesisVideoSignalingChannels
{
namespace KinesisVideoSignalingChannelsEndpoint
{
AWS_KINESISVIDEOSIGNALINGCHANNELS_API Aws::String ForRegion(const Aws::String& regionName, bool useDualStack = false);
} // namespace KinesisVideoSignalingChannelsEndpoint
} // namespace KinesisVideoSignalingChannels
} // 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-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/client/AWSErrorMarshaller.h>
namespace Aws
{
namespace Client
{
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API KinesisVideoSignalingChannelsErrorMarshaller : 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-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
namespace Aws
{
namespace KinesisVideoSignalingChannels
{
enum class KinesisVideoSignalingChannelsErrors
{
//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,
INVALID_ARGUMENT,
INVALID_CLIENT,
NOT_AUTHORIZED,
SESSION_EXPIRED
};
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API KinesisVideoSignalingChannelsError : public Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>
{
public:
KinesisVideoSignalingChannelsError() {}
KinesisVideoSignalingChannelsError(const Aws::Client::AWSError<Aws::Client::CoreErrors>& rhs) : Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>(rhs) {}
KinesisVideoSignalingChannelsError(Aws::Client::AWSError<Aws::Client::CoreErrors>&& rhs) : Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>(rhs) {}
KinesisVideoSignalingChannelsError(const Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>& rhs) : Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>(rhs) {}
KinesisVideoSignalingChannelsError(Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>&& rhs) : Aws::Client::AWSError<KinesisVideoSignalingChannelsErrors>(rhs) {}
template <typename T>
T GetModeledError();
};
namespace KinesisVideoSignalingChannelsErrorMapper
{
AWS_KINESISVIDEOSIGNALINGCHANNELS_API Aws::Client::AWSError<Aws::Client::CoreErrors> GetErrorForName(const char* errorName);
}
} // namespace KinesisVideoSignalingChannels
} // 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-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/AmazonSerializableWebServiceRequest.h>
#include <aws/core/utils/UnreferencedParam.h>
#include <aws/core/http/HttpRequest.h>
namespace Aws
{
namespace KinesisVideoSignalingChannels
{
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API KinesisVideoSignalingChannelsRequest : public Aws::AmazonSerializableWebServiceRequest
{
public:
virtual ~KinesisVideoSignalingChannelsRequest () {}
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, "2019-12-04"));
return headers;
}
protected:
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const { return Aws::Http::HeaderValueCollection(); }
};
} // namespace KinesisVideoSignalingChannels
} // 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_KINESISVIDEOSIGNALINGCHANNELS_EXPORTS
#define AWS_KINESISVIDEOSIGNALINGCHANNELS_API __declspec(dllexport)
#else
#define AWS_KINESISVIDEOSIGNALINGCHANNELS_API __declspec(dllimport)
#endif /* AWS_KINESISVIDEOSIGNALINGCHANNELS_EXPORTS */
#else
#define AWS_KINESISVIDEOSIGNALINGCHANNELS_API
#endif // USE_IMPORT_EXPORT
#else // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)
#define AWS_KINESISVIDEOSIGNALINGCHANNELS_API
#endif // defined (USE_WINDOWS_DLL_SEMANTICS) || defined (WIN32)

View File

@@ -0,0 +1,228 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannelsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <aws/kinesis-video-signaling/model/Service.h>
#include <utility>
namespace Aws
{
namespace KinesisVideoSignalingChannels
{
namespace Model
{
/**
*/
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API GetIceServerConfigRequest : public KinesisVideoSignalingChannelsRequest
{
public:
GetIceServerConfigRequest();
// 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 "GetIceServerConfig"; }
Aws::String SerializePayload() const override;
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline const Aws::String& GetChannelARN() const{ return m_channelARN; }
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline bool ChannelARNHasBeenSet() const { return m_channelARNHasBeenSet; }
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline void SetChannelARN(const Aws::String& value) { m_channelARNHasBeenSet = true; m_channelARN = value; }
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline void SetChannelARN(Aws::String&& value) { m_channelARNHasBeenSet = true; m_channelARN = std::move(value); }
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline void SetChannelARN(const char* value) { m_channelARNHasBeenSet = true; m_channelARN.assign(value); }
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline GetIceServerConfigRequest& WithChannelARN(const Aws::String& value) { SetChannelARN(value); return *this;}
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline GetIceServerConfigRequest& WithChannelARN(Aws::String&& value) { SetChannelARN(std::move(value)); return *this;}
/**
* <p>The ARN of the signaling channel to be used for the peer-to-peer connection
* between configured peers. </p>
*/
inline GetIceServerConfigRequest& WithChannelARN(const char* value) { SetChannelARN(value); return *this;}
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline const Aws::String& GetClientId() const{ return m_clientId; }
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline bool ClientIdHasBeenSet() const { return m_clientIdHasBeenSet; }
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline void SetClientId(const Aws::String& value) { m_clientIdHasBeenSet = true; m_clientId = value; }
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline void SetClientId(Aws::String&& value) { m_clientIdHasBeenSet = true; m_clientId = std::move(value); }
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline void SetClientId(const char* value) { m_clientIdHasBeenSet = true; m_clientId.assign(value); }
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline GetIceServerConfigRequest& WithClientId(const Aws::String& value) { SetClientId(value); return *this;}
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline GetIceServerConfigRequest& WithClientId(Aws::String&& value) { SetClientId(std::move(value)); return *this;}
/**
* <p>Unique identifier for the viewer. Must be unique within the signaling
* channel.</p>
*/
inline GetIceServerConfigRequest& WithClientId(const char* value) { SetClientId(value); return *this;}
/**
* <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid
* value.</p>
*/
inline const Service& GetService() const{ return m_service; }
/**
* <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid
* value.</p>
*/
inline bool ServiceHasBeenSet() const { return m_serviceHasBeenSet; }
/**
* <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid
* value.</p>
*/
inline void SetService(const Service& value) { m_serviceHasBeenSet = true; m_service = value; }
/**
* <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid
* value.</p>
*/
inline void SetService(Service&& value) { m_serviceHasBeenSet = true; m_service = std::move(value); }
/**
* <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid
* value.</p>
*/
inline GetIceServerConfigRequest& WithService(const Service& value) { SetService(value); return *this;}
/**
* <p>Specifies the desired service. Currently, <code>TURN</code> is the only valid
* value.</p>
*/
inline GetIceServerConfigRequest& WithService(Service&& value) { SetService(std::move(value)); return *this;}
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline const Aws::String& GetUsername() const{ return m_username; }
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; }
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); }
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); }
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline GetIceServerConfigRequest& WithUsername(const Aws::String& value) { SetUsername(value); return *this;}
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline GetIceServerConfigRequest& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;}
/**
* <p>An optional user ID to be associated with the credentials.</p>
*/
inline GetIceServerConfigRequest& WithUsername(const char* value) { SetUsername(value); return *this;}
private:
Aws::String m_channelARN;
bool m_channelARNHasBeenSet;
Aws::String m_clientId;
bool m_clientIdHasBeenSet;
Service m_service;
bool m_serviceHasBeenSet;
Aws::String m_username;
bool m_usernameHasBeenSet;
};
} // namespace Model
} // namespace KinesisVideoSignalingChannels
} // namespace Aws

View File

@@ -0,0 +1,78 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/kinesis-video-signaling/model/IceServer.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace KinesisVideoSignalingChannels
{
namespace Model
{
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API GetIceServerConfigResult
{
public:
GetIceServerConfigResult();
GetIceServerConfigResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
GetIceServerConfigResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The list of ICE server information objects.</p>
*/
inline const Aws::Vector<IceServer>& GetIceServerList() const{ return m_iceServerList; }
/**
* <p>The list of ICE server information objects.</p>
*/
inline void SetIceServerList(const Aws::Vector<IceServer>& value) { m_iceServerList = value; }
/**
* <p>The list of ICE server information objects.</p>
*/
inline void SetIceServerList(Aws::Vector<IceServer>&& value) { m_iceServerList = std::move(value); }
/**
* <p>The list of ICE server information objects.</p>
*/
inline GetIceServerConfigResult& WithIceServerList(const Aws::Vector<IceServer>& value) { SetIceServerList(value); return *this;}
/**
* <p>The list of ICE server information objects.</p>
*/
inline GetIceServerConfigResult& WithIceServerList(Aws::Vector<IceServer>&& value) { SetIceServerList(std::move(value)); return *this;}
/**
* <p>The list of ICE server information objects.</p>
*/
inline GetIceServerConfigResult& AddIceServerList(const IceServer& value) { m_iceServerList.push_back(value); return *this; }
/**
* <p>The list of ICE server information objects.</p>
*/
inline GetIceServerConfigResult& AddIceServerList(IceServer&& value) { m_iceServerList.push_back(std::move(value)); return *this; }
private:
Aws::Vector<IceServer> m_iceServerList;
};
} // namespace Model
} // namespace KinesisVideoSignalingChannels
} // namespace Aws

View File

@@ -0,0 +1,237 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSVector.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace Utils
{
namespace Json
{
class JsonValue;
class JsonView;
} // namespace Json
} // namespace Utils
namespace KinesisVideoSignalingChannels
{
namespace Model
{
/**
* <p>A structure for the ICE server connection data.</p><p><h3>See Also:</h3> <a
* href="http://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/IceServer">AWS
* API Reference</a></p>
*/
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API IceServer
{
public:
IceServer();
IceServer(Aws::Utils::Json::JsonView jsonValue);
IceServer& operator=(Aws::Utils::Json::JsonView jsonValue);
Aws::Utils::Json::JsonValue Jsonize() const;
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline const Aws::Vector<Aws::String>& GetUris() const{ return m_uris; }
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline bool UrisHasBeenSet() const { return m_urisHasBeenSet; }
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline void SetUris(const Aws::Vector<Aws::String>& value) { m_urisHasBeenSet = true; m_uris = value; }
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline void SetUris(Aws::Vector<Aws::String>&& value) { m_urisHasBeenSet = true; m_uris = std::move(value); }
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline IceServer& WithUris(const Aws::Vector<Aws::String>& value) { SetUris(value); return *this;}
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline IceServer& WithUris(Aws::Vector<Aws::String>&& value) { SetUris(std::move(value)); return *this;}
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline IceServer& AddUris(const Aws::String& value) { m_urisHasBeenSet = true; m_uris.push_back(value); return *this; }
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline IceServer& AddUris(Aws::String&& value) { m_urisHasBeenSet = true; m_uris.push_back(std::move(value)); return *this; }
/**
* <p>An array of URIs, in the form specified in the <a
* href="https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03">I-D.petithuguenin-behave-turn-uris</a>
* spec. These URIs provide the different addresses and/or protocols that can be
* used to reach the TURN server.</p>
*/
inline IceServer& AddUris(const char* value) { m_urisHasBeenSet = true; m_uris.push_back(value); return *this; }
/**
* <p>A username to login to the ICE server.</p>
*/
inline const Aws::String& GetUsername() const{ return m_username; }
/**
* <p>A username to login to the ICE server.</p>
*/
inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
/**
* <p>A username to login to the ICE server.</p>
*/
inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; }
/**
* <p>A username to login to the ICE server.</p>
*/
inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); }
/**
* <p>A username to login to the ICE server.</p>
*/
inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); }
/**
* <p>A username to login to the ICE server.</p>
*/
inline IceServer& WithUsername(const Aws::String& value) { SetUsername(value); return *this;}
/**
* <p>A username to login to the ICE server.</p>
*/
inline IceServer& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;}
/**
* <p>A username to login to the ICE server.</p>
*/
inline IceServer& WithUsername(const char* value) { SetUsername(value); return *this;}
/**
* <p>A password to login to the ICE server.</p>
*/
inline const Aws::String& GetPassword() const{ return m_password; }
/**
* <p>A password to login to the ICE server.</p>
*/
inline bool PasswordHasBeenSet() const { return m_passwordHasBeenSet; }
/**
* <p>A password to login to the ICE server.</p>
*/
inline void SetPassword(const Aws::String& value) { m_passwordHasBeenSet = true; m_password = value; }
/**
* <p>A password to login to the ICE server.</p>
*/
inline void SetPassword(Aws::String&& value) { m_passwordHasBeenSet = true; m_password = std::move(value); }
/**
* <p>A password to login to the ICE server.</p>
*/
inline void SetPassword(const char* value) { m_passwordHasBeenSet = true; m_password.assign(value); }
/**
* <p>A password to login to the ICE server.</p>
*/
inline IceServer& WithPassword(const Aws::String& value) { SetPassword(value); return *this;}
/**
* <p>A password to login to the ICE server.</p>
*/
inline IceServer& WithPassword(Aws::String&& value) { SetPassword(std::move(value)); return *this;}
/**
* <p>A password to login to the ICE server.</p>
*/
inline IceServer& WithPassword(const char* value) { SetPassword(value); return *this;}
/**
* <p>The period of time, in seconds, during which the username and password are
* valid.</p>
*/
inline int GetTtl() const{ return m_ttl; }
/**
* <p>The period of time, in seconds, during which the username and password are
* valid.</p>
*/
inline bool TtlHasBeenSet() const { return m_ttlHasBeenSet; }
/**
* <p>The period of time, in seconds, during which the username and password are
* valid.</p>
*/
inline void SetTtl(int value) { m_ttlHasBeenSet = true; m_ttl = value; }
/**
* <p>The period of time, in seconds, during which the username and password are
* valid.</p>
*/
inline IceServer& WithTtl(int value) { SetTtl(value); return *this;}
private:
Aws::Vector<Aws::String> m_uris;
bool m_urisHasBeenSet;
Aws::String m_username;
bool m_usernameHasBeenSet;
Aws::String m_password;
bool m_passwordHasBeenSet;
int m_ttl;
bool m_ttlHasBeenSet;
};
} // namespace Model
} // namespace KinesisVideoSignalingChannels
} // namespace Aws

View File

@@ -0,0 +1,179 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannelsRequest.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
namespace KinesisVideoSignalingChannels
{
namespace Model
{
/**
*/
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API SendAlexaOfferToMasterRequest : public KinesisVideoSignalingChannelsRequest
{
public:
SendAlexaOfferToMasterRequest();
// 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 "SendAlexaOfferToMaster"; }
Aws::String SerializePayload() const override;
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline const Aws::String& GetChannelARN() const{ return m_channelARN; }
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline bool ChannelARNHasBeenSet() const { return m_channelARNHasBeenSet; }
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline void SetChannelARN(const Aws::String& value) { m_channelARNHasBeenSet = true; m_channelARN = value; }
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline void SetChannelARN(Aws::String&& value) { m_channelARNHasBeenSet = true; m_channelARN = std::move(value); }
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline void SetChannelARN(const char* value) { m_channelARNHasBeenSet = true; m_channelARN.assign(value); }
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline SendAlexaOfferToMasterRequest& WithChannelARN(const Aws::String& value) { SetChannelARN(value); return *this;}
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline SendAlexaOfferToMasterRequest& WithChannelARN(Aws::String&& value) { SetChannelARN(std::move(value)); return *this;}
/**
* <p>The ARN of the signaling channel by which Alexa and the master peer
* communicate.</p>
*/
inline SendAlexaOfferToMasterRequest& WithChannelARN(const char* value) { SetChannelARN(value); return *this;}
/**
* <p>The unique identifier for the sender client.</p>
*/
inline const Aws::String& GetSenderClientId() const{ return m_senderClientId; }
/**
* <p>The unique identifier for the sender client.</p>
*/
inline bool SenderClientIdHasBeenSet() const { return m_senderClientIdHasBeenSet; }
/**
* <p>The unique identifier for the sender client.</p>
*/
inline void SetSenderClientId(const Aws::String& value) { m_senderClientIdHasBeenSet = true; m_senderClientId = value; }
/**
* <p>The unique identifier for the sender client.</p>
*/
inline void SetSenderClientId(Aws::String&& value) { m_senderClientIdHasBeenSet = true; m_senderClientId = std::move(value); }
/**
* <p>The unique identifier for the sender client.</p>
*/
inline void SetSenderClientId(const char* value) { m_senderClientIdHasBeenSet = true; m_senderClientId.assign(value); }
/**
* <p>The unique identifier for the sender client.</p>
*/
inline SendAlexaOfferToMasterRequest& WithSenderClientId(const Aws::String& value) { SetSenderClientId(value); return *this;}
/**
* <p>The unique identifier for the sender client.</p>
*/
inline SendAlexaOfferToMasterRequest& WithSenderClientId(Aws::String&& value) { SetSenderClientId(std::move(value)); return *this;}
/**
* <p>The unique identifier for the sender client.</p>
*/
inline SendAlexaOfferToMasterRequest& WithSenderClientId(const char* value) { SetSenderClientId(value); return *this;}
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline const Aws::String& GetMessagePayload() const{ return m_messagePayload; }
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline bool MessagePayloadHasBeenSet() const { return m_messagePayloadHasBeenSet; }
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline void SetMessagePayload(const Aws::String& value) { m_messagePayloadHasBeenSet = true; m_messagePayload = value; }
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline void SetMessagePayload(Aws::String&& value) { m_messagePayloadHasBeenSet = true; m_messagePayload = std::move(value); }
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline void SetMessagePayload(const char* value) { m_messagePayloadHasBeenSet = true; m_messagePayload.assign(value); }
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline SendAlexaOfferToMasterRequest& WithMessagePayload(const Aws::String& value) { SetMessagePayload(value); return *this;}
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline SendAlexaOfferToMasterRequest& WithMessagePayload(Aws::String&& value) { SetMessagePayload(std::move(value)); return *this;}
/**
* <p>The base64-encoded SDP offer content.</p>
*/
inline SendAlexaOfferToMasterRequest& WithMessagePayload(const char* value) { SetMessagePayload(value); return *this;}
private:
Aws::String m_channelARN;
bool m_channelARNHasBeenSet;
Aws::String m_senderClientId;
bool m_senderClientIdHasBeenSet;
Aws::String m_messagePayload;
bool m_messagePayloadHasBeenSet;
};
} // namespace Model
} // namespace KinesisVideoSignalingChannels
} // namespace Aws

View File

@@ -0,0 +1,77 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
#include <utility>
namespace Aws
{
template<typename RESULT_TYPE>
class AmazonWebServiceResult;
namespace Utils
{
namespace Json
{
class JsonValue;
} // namespace Json
} // namespace Utils
namespace KinesisVideoSignalingChannels
{
namespace Model
{
class AWS_KINESISVIDEOSIGNALINGCHANNELS_API SendAlexaOfferToMasterResult
{
public:
SendAlexaOfferToMasterResult();
SendAlexaOfferToMasterResult(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
SendAlexaOfferToMasterResult& operator=(const Aws::AmazonWebServiceResult<Aws::Utils::Json::JsonValue>& result);
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline const Aws::String& GetAnswer() const{ return m_answer; }
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline void SetAnswer(const Aws::String& value) { m_answer = value; }
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline void SetAnswer(Aws::String&& value) { m_answer = std::move(value); }
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline void SetAnswer(const char* value) { m_answer.assign(value); }
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline SendAlexaOfferToMasterResult& WithAnswer(const Aws::String& value) { SetAnswer(value); return *this;}
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline SendAlexaOfferToMasterResult& WithAnswer(Aws::String&& value) { SetAnswer(std::move(value)); return *this;}
/**
* <p>The base64-encoded SDP answer content.</p>
*/
inline SendAlexaOfferToMasterResult& WithAnswer(const char* value) { SetAnswer(value); return *this;}
private:
Aws::String m_answer;
};
} // namespace Model
} // namespace KinesisVideoSignalingChannels
} // namespace Aws

View File

@@ -0,0 +1,30 @@
/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include <aws/kinesis-video-signaling/KinesisVideoSignalingChannels_EXPORTS.h>
#include <aws/core/utils/memory/stl/AWSString.h>
namespace Aws
{
namespace KinesisVideoSignalingChannels
{
namespace Model
{
enum class Service
{
NOT_SET,
TURN
};
namespace ServiceMapper
{
AWS_KINESISVIDEOSIGNALINGCHANNELS_API Service GetServiceForName(const Aws::String& name);
AWS_KINESISVIDEOSIGNALINGCHANNELS_API Aws::String GetNameForService(Service value);
} // namespace ServiceMapper
} // namespace Model
} // namespace KinesisVideoSignalingChannels
} // namespace Aws