/*
* 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 mediastore-data-2017-09-01.normal.json service model.
*/
using System;
using System.Runtime.ExceptionServices;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Net;
using Amazon.MediaStoreData.Model;
using Amazon.MediaStoreData.Model.Internal.MarshallTransformations;
using Amazon.MediaStoreData.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.MediaStoreData
{
///
/// Implementation for accessing MediaStoreData
///
/// An AWS Elemental MediaStore asset is an object, similar to an object in the Amazon
/// S3 service. Objects are the fundamental entities that are stored in AWS Elemental
/// MediaStore.
///
public partial class AmazonMediaStoreDataClient : AmazonServiceClient, IAmazonMediaStoreData
{
private static IServiceMetadata serviceMetadata = new AmazonMediaStoreDataMetadata();
private IMediaStoreDataPaginatorFactory _paginators;
///
/// Paginators for the service
///
public IMediaStoreDataPaginatorFactory Paginators
{
get
{
if (this._paginators == null)
{
this._paginators = new MediaStoreDataPaginatorFactory(this);
}
return this._paginators;
}
}
#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 AmazonMediaStoreDataEndpointResolver());
}
///
/// 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 DeleteObject
///
/// Deletes an object at the specified path.
///
/// Container for the necessary parameters to execute the DeleteObject service method.
///
/// The response from the DeleteObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
///
/// Could not perform an operation on an object that does not exist.
///
/// REST API Reference for DeleteObject Operation
public virtual DeleteObjectResponse DeleteObject(DeleteObjectRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteObjectResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Deletes an object at the specified path.
///
/// Container for the necessary parameters to execute the DeleteObject service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DeleteObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
///
/// Could not perform an operation on an object that does not exist.
///
/// REST API Reference for DeleteObject Operation
public virtual Task DeleteObjectAsync(DeleteObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DeleteObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = DeleteObjectResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region DescribeObject
///
/// Gets the headers for an object at the specified path.
///
/// Container for the necessary parameters to execute the DescribeObject service method.
///
/// The response from the DescribeObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
///
/// Could not perform an operation on an object that does not exist.
///
/// REST API Reference for DescribeObject Operation
public virtual DescribeObjectResponse DescribeObject(DescribeObjectRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeObjectResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Gets the headers for an object at the specified path.
///
/// Container for the necessary parameters to execute the DescribeObject service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the DescribeObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
///
/// Could not perform an operation on an object that does not exist.
///
/// REST API Reference for DescribeObject Operation
public virtual Task DescribeObjectAsync(DescribeObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = DescribeObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = DescribeObjectResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region GetObject
///
/// Downloads the object at the specified path. If the object’s upload availability is
/// set to streaming
, AWS Elemental MediaStore downloads the object even
/// if it’s still uploading the object.
///
/// Container for the necessary parameters to execute the GetObject service method.
///
/// The response from the GetObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
///
/// Could not perform an operation on an object that does not exist.
///
///
/// The requested content range is not valid.
///
/// REST API Reference for GetObject Operation
public virtual GetObjectResponse GetObject(GetObjectRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = GetObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetObjectResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Downloads the object at the specified path. If the object’s upload availability is
/// set to streaming
, AWS Elemental MediaStore downloads the object even
/// if it’s still uploading the object.
///
/// Container for the necessary parameters to execute the GetObject service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the GetObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
///
/// Could not perform an operation on an object that does not exist.
///
///
/// The requested content range is not valid.
///
/// REST API Reference for GetObject Operation
public virtual Task GetObjectAsync(GetObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = GetObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = GetObjectResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region ListItems
///
/// Provides a list of metadata entries about folders and objects in the specified folder.
///
/// Container for the necessary parameters to execute the ListItems service method.
///
/// The response from the ListItems service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for ListItems Operation
public virtual ListItemsResponse ListItems(ListItemsRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = ListItemsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListItemsResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Provides a list of metadata entries about folders and objects in the specified folder.
///
/// Container for the necessary parameters to execute the ListItems service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the ListItems service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for ListItems Operation
public virtual Task ListItemsAsync(ListItemsRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = ListItemsRequestMarshaller.Instance;
options.ResponseUnmarshaller = ListItemsResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
#region PutObject
///
/// Uploads an object to the specified path. Object sizes are limited to 25 MB for standard
/// upload availability and 10 MB for streaming upload availability.
///
/// Container for the necessary parameters to execute the PutObject service method.
///
/// The response from the PutObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for PutObject Operation
public virtual PutObjectResponse PutObject(PutObjectRequest request)
{
var options = new InvokeOptions();
options.RequestMarshaller = PutObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutObjectResponseUnmarshaller.Instance;
return Invoke(request, options);
}
///
/// Uploads an object to the specified path. Object sizes are limited to 25 MB for standard
/// upload availability and 10 MB for streaming upload availability.
///
/// Container for the necessary parameters to execute the PutObject service method.
///
/// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
///
///
/// The response from the PutObject service method, as returned by MediaStoreData.
///
/// The specified container was not found for the specified account.
///
///
/// The service is temporarily unavailable.
///
/// REST API Reference for PutObject Operation
public virtual Task PutObjectAsync(PutObjectRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
{
var options = new InvokeOptions();
options.RequestMarshaller = PutObjectRequestMarshaller.Instance;
options.ResponseUnmarshaller = PutObjectResponseUnmarshaller.Instance;
return InvokeAsync(request, options, cancellationToken);
}
#endregion
}
}