/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ /* * Do not modify this file. This file is generated from the kinesis-video-webrtc-storage-2018-05-10.normal.json service model. */ using System; using System.Collections.Generic; using System.Net; using Amazon.KinesisVideoWebRTCStorage.Model; using Amazon.KinesisVideoWebRTCStorage.Model.Internal.MarshallTransformations; using Amazon.KinesisVideoWebRTCStorage.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.KinesisVideoWebRTCStorage { /// /// Implementation for accessing KinesisVideoWebRTCStorage /// /// /// public partial class AmazonKinesisVideoWebRTCStorageClient : AmazonServiceClient, IAmazonKinesisVideoWebRTCStorage { private static IServiceMetadata serviceMetadata = new AmazonKinesisVideoWebRTCStorageMetadata(); #region Constructors /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// public AmazonKinesisVideoWebRTCStorageClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonKinesisVideoWebRTCStorageConfig()) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The region to connect. public AmazonKinesisVideoWebRTCStorageClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonKinesisVideoWebRTCStorageConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with the credentials loaded from the application's /// default configuration, and if unsuccessful from the Instance Profile service on an EC2 instance. /// /// Example App.config with credentials set. /// /// <?xml version="1.0" encoding="utf-8" ?> /// <configuration> /// <appSettings> /// <add key="AWSProfileName" value="AWS Default"/> /// </appSettings> /// </configuration> /// /// /// /// The AmazonKinesisVideoWebRTCStorageClient Configuration Object public AmazonKinesisVideoWebRTCStorageClient(AmazonKinesisVideoWebRTCStorageConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Credentials /// /// AWS Credentials public AmazonKinesisVideoWebRTCStorageClient(AWSCredentials credentials) : this(credentials, new AmazonKinesisVideoWebRTCStorageConfig()) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonKinesisVideoWebRTCStorageClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonKinesisVideoWebRTCStorageConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Credentials and an /// AmazonKinesisVideoWebRTCStorageClient Configuration object. /// /// AWS Credentials /// The AmazonKinesisVideoWebRTCStorageClient Configuration Object public AmazonKinesisVideoWebRTCStorageClient(AWSCredentials credentials, AmazonKinesisVideoWebRTCStorageConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonKinesisVideoWebRTCStorageClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonKinesisVideoWebRTCStorageConfig()) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonKinesisVideoWebRTCStorageClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonKinesisVideoWebRTCStorageConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Access Key ID, AWS Secret Key and an /// AmazonKinesisVideoWebRTCStorageClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonKinesisVideoWebRTCStorageClient Configuration Object public AmazonKinesisVideoWebRTCStorageClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonKinesisVideoWebRTCStorageConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonKinesisVideoWebRTCStorageClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonKinesisVideoWebRTCStorageConfig()) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The region to connect. public AmazonKinesisVideoWebRTCStorageClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonKinesisVideoWebRTCStorageConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonKinesisVideoWebRTCStorageClient with AWS Access Key ID, AWS Secret Key and an /// AmazonKinesisVideoWebRTCStorageClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonKinesisVideoWebRTCStorageClient Configuration Object public AmazonKinesisVideoWebRTCStorageClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonKinesisVideoWebRTCStorageConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig) { } #endregion #region Overrides /// /// Creates the signer for the service. /// protected override AbstractAWSSigner CreateSigner() { return new AWS4Signer(); } /// /// Customize the pipeline /// /// protected override void CustomizeRuntimePipeline(RuntimePipeline pipeline) { pipeline.RemoveHandler(); pipeline.AddHandlerAfter(new AmazonKinesisVideoWebRTCStorageEndpointResolver()); } /// /// Capture metadata for the service. /// protected override IServiceMetadata ServiceMetadata { get { return serviceMetadata; } } #endregion #region Dispose /// /// Disposes the service client. /// protected override void Dispose(bool disposing) { base.Dispose(disposing); } #endregion #region JoinStorageSession /// /// Join the ongoing one way-video and/or multi-way audio WebRTC session as a video producing /// device for an input channel. If there’s no existing session for the channel, a new /// streaming session needs to be created, and the Amazon Resource Name (ARN) of the signaling /// channel must be provided. /// /// /// /// Currently for the SINGLE_MASTER type, a video producing device is able /// to ingest both audio and video media into a stream, while viewers can only ingest /// audio. Both a video producing device and viewers can join the session first, and wait /// for other participants. /// /// /// /// While participants are having peer to peer conversations through webRTC, the ingested /// media session will be stored into the Kinesis Video Stream. Multiple viewers are able /// to playback real-time media. /// /// /// /// Customers can also use existing Kinesis Video Streams features like HLS /// or DASH playback, Image generation, and more with ingested WebRTC media. /// /// /// /// Assume that only one video producing device client can be associated with a session /// for the channel. If more than one client joins the session of a specific channel as /// a video producing device, the most recent client request takes precedence. /// /// /// /// Container for the necessary parameters to execute the JoinStorageSession service method. /// /// The response from the JoinStorageSession service method, as returned by KinesisVideoWebRTCStorage. /// /// You do not have required permissions to perform this operation. /// /// /// Kinesis Video Streams has throttled the request because you have exceeded the limit /// of allowed client calls. Try making the call later. /// /// /// The value for this input parameter is invalid. /// /// /// The specified resource is not found. /// /// REST API Reference for JoinStorageSession Operation public virtual JoinStorageSessionResponse JoinStorageSession(JoinStorageSessionRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = JoinStorageSessionRequestMarshaller.Instance; options.ResponseUnmarshaller = JoinStorageSessionResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the JoinStorageSession operation. /// /// /// Container for the necessary parameters to execute the JoinStorageSession operation on AmazonKinesisVideoWebRTCStorageClient. /// An AsyncCallback delegate that is invoked when the operation completes. /// A user-defined state object that is passed to the callback procedure. Retrieve this object from within the callback /// procedure using the AsyncState property. /// /// An IAsyncResult that can be used to poll or wait for results, or both; this value is also needed when invoking EndJoinStorageSession /// operation. /// REST API Reference for JoinStorageSession Operation public virtual IAsyncResult BeginJoinStorageSession(JoinStorageSessionRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = JoinStorageSessionRequestMarshaller.Instance; options.ResponseUnmarshaller = JoinStorageSessionResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the JoinStorageSession operation. /// /// /// The IAsyncResult returned by the call to BeginJoinStorageSession. /// /// Returns a JoinStorageSessionResult from KinesisVideoWebRTCStorage. /// REST API Reference for JoinStorageSession Operation public virtual JoinStorageSessionResponse EndJoinStorageSession(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion } }