/*
 * 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 aws-query-compatible-2012-11-05.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.QueryCompatible.Model;
using Amazon.QueryCompatible.Model.Internal.MarshallTransformations;
using Amazon.QueryCompatible.Internal;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
using Amazon.Runtime.Internal.Auth;
using Amazon.Runtime.Internal.Transform;
namespace Amazon.QueryCompatible
{
    /// 
    /// Implementation for accessing QueryCompatible
    ///
    /// 
    /// 
    public partial class AmazonQueryCompatibleClient : AmazonServiceClient, IAmazonQueryCompatible
    {
        private static IServiceMetadata serviceMetadata = new AmazonQueryCompatibleMetadata();
        #region Constructors
        /// 
        /// Constructs AmazonQueryCompatibleClient 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 AmazonQueryCompatibleClient()
            : base(FallbackCredentialsFactory.GetCredentials(), new AmazonQueryCompatibleConfig()) { }
        /// 
        /// Constructs AmazonQueryCompatibleClient 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 AmazonQueryCompatibleClient(RegionEndpoint region)
            : base(FallbackCredentialsFactory.GetCredentials(), new AmazonQueryCompatibleConfig{RegionEndpoint = region}) { }
        /// 
        /// Constructs AmazonQueryCompatibleClient 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 AmazonQueryCompatibleClient Configuration Object
        public AmazonQueryCompatibleClient(AmazonQueryCompatibleConfig config)
            : base(FallbackCredentialsFactory.GetCredentials(config), config){}
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Credentials
        /// 
        /// AWS Credentials
        public AmazonQueryCompatibleClient(AWSCredentials credentials)
            : this(credentials, new AmazonQueryCompatibleConfig())
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Credentials
        /// 
        /// AWS Credentials
        /// The region to connect.
        public AmazonQueryCompatibleClient(AWSCredentials credentials, RegionEndpoint region)
            : this(credentials, new AmazonQueryCompatibleConfig{RegionEndpoint = region})
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Credentials and an
        /// AmazonQueryCompatibleClient Configuration object.
        /// 
        /// AWS Credentials
        /// The AmazonQueryCompatibleClient Configuration Object
        public AmazonQueryCompatibleClient(AWSCredentials credentials, AmazonQueryCompatibleConfig clientConfig)
            : base(credentials, clientConfig)
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Access Key ID and AWS Secret Key
        /// 
        /// AWS Access Key ID
        /// AWS Secret Access Key
        public AmazonQueryCompatibleClient(string awsAccessKeyId, string awsSecretAccessKey)
            : this(awsAccessKeyId, awsSecretAccessKey, new AmazonQueryCompatibleConfig())
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Access Key ID and AWS Secret Key
        /// 
        /// AWS Access Key ID
        /// AWS Secret Access Key
        /// The region to connect.
        public AmazonQueryCompatibleClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region)
            : this(awsAccessKeyId, awsSecretAccessKey, new AmazonQueryCompatibleConfig() {RegionEndpoint=region})
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Access Key ID, AWS Secret Key and an
        /// AmazonQueryCompatibleClient Configuration object. 
        /// 
        /// AWS Access Key ID
        /// AWS Secret Access Key
        /// The AmazonQueryCompatibleClient Configuration Object
        public AmazonQueryCompatibleClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonQueryCompatibleConfig clientConfig)
            : base(awsAccessKeyId, awsSecretAccessKey, clientConfig)
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Access Key ID and AWS Secret Key
        /// 
        /// AWS Access Key ID
        /// AWS Secret Access Key
        /// AWS Session Token
        public AmazonQueryCompatibleClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken)
            : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonQueryCompatibleConfig())
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient 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 AmazonQueryCompatibleClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region)
            : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonQueryCompatibleConfig{RegionEndpoint = region})
        {
        }
        /// 
        /// Constructs AmazonQueryCompatibleClient with AWS Access Key ID, AWS Secret Key and an
        /// AmazonQueryCompatibleClient Configuration object. 
        /// 
        /// AWS Access Key ID
        /// AWS Secret Access Key
        /// AWS Session Token
        /// The AmazonQueryCompatibleClient Configuration Object
        public AmazonQueryCompatibleClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonQueryCompatibleConfig clientConfig)
            : base(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, clientConfig)
        {
        }
        #endregion
        #region Overrides
        /// 
        /// Creates the signer for the service.
        /// 
        protected override AbstractAWSSigner CreateSigner()
        {
            return new AWS4Signer();
        }    
        /// 
        /// 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  CreateQueue
        /// 
        /// 
        /// 
        /// Container for the necessary parameters to execute the CreateQueue service method.
        /// 
        /// The response from the CreateQueue service method, as returned by QueryCompatible.
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        /// REST API Reference for CreateQueue Operation
        public virtual CreateQueueResponse CreateQueue(CreateQueueRequest request)
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = CreateQueueRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateQueueResponseUnmarshaller.Instance;
            return Invoke(request, options);
        }
        /// 
        /// 
        /// 
        /// Container for the necessary parameters to execute the CreateQueue service method.
        /// 
        ///     A cancellation token that can be used by other objects or threads to receive notice of cancellation.
        /// 
        /// 
        /// The response from the CreateQueue service method, as returned by QueryCompatible.
        /// 
        /// 
        /// 
        /// 
        /// 
        /// 
        /// REST API Reference for CreateQueue Operation
        public virtual Task CreateQueueAsync(CreateQueueRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken))
        {
            var options = new InvokeOptions();
            options.RequestMarshaller = CreateQueueRequestMarshaller.Instance;
            options.ResponseUnmarshaller = CreateQueueResponseUnmarshaller.Instance;
            
            return InvokeAsync(request, options, cancellationToken);
        }
        #endregion
        
    }
}