/* * 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 rest-xml-test-2014-01-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.RestXMLTest.Model; using Amazon.RestXMLTest.Model.Internal.MarshallTransformations; using Amazon.RestXMLTest.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.RestXMLTest { /// /// Implementation for accessing RestXMLTest /// /// /// public partial class AmazonRestXMLTestClient : AmazonServiceClient, IAmazonRestXMLTest { private static IServiceMetadata serviceMetadata = new AmazonRestXMLTestMetadata(); #region Constructors /// /// Constructs AmazonRestXMLTestClient 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 AmazonRestXMLTestClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonRestXMLTestConfig()) { } /// /// Constructs AmazonRestXMLTestClient 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 AmazonRestXMLTestClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonRestXMLTestConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonRestXMLTestClient 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 AmazonRestXMLTestClient Configuration Object public AmazonRestXMLTestClient(AmazonRestXMLTestConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonRestXMLTestClient with AWS Credentials /// /// AWS Credentials public AmazonRestXMLTestClient(AWSCredentials credentials) : this(credentials, new AmazonRestXMLTestConfig()) { } /// /// Constructs AmazonRestXMLTestClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonRestXMLTestClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonRestXMLTestConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonRestXMLTestClient with AWS Credentials and an /// AmazonRestXMLTestClient Configuration object. /// /// AWS Credentials /// The AmazonRestXMLTestClient Configuration Object public AmazonRestXMLTestClient(AWSCredentials credentials, AmazonRestXMLTestConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonRestXMLTestClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonRestXMLTestClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRestXMLTestConfig()) { } /// /// Constructs AmazonRestXMLTestClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonRestXMLTestClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonRestXMLTestConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonRestXMLTestClient with AWS Access Key ID, AWS Secret Key and an /// AmazonRestXMLTestClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonRestXMLTestClient Configuration Object public AmazonRestXMLTestClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonRestXMLTestConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonRestXMLTestClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonRestXMLTestClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRestXMLTestConfig()) { } /// /// Constructs AmazonRestXMLTestClient 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 AmazonRestXMLTestClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonRestXMLTestConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonRestXMLTestClient with AWS Access Key ID, AWS Secret Key and an /// AmazonRestXMLTestClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonRestXMLTestClient Configuration Object public AmazonRestXMLTestClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonRestXMLTestConfig 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 TestOperation /// /// /// /// Container for the necessary parameters to execute the TestOperation service method. /// /// The response from the TestOperation service method, as returned by RestXMLTest. /// REST API Reference for TestOperation Operation public virtual TestOperationResponse TestOperation(TestOperationRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = TestOperationRequestMarshaller.Instance; options.ResponseUnmarshaller = TestOperationResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// /// /// Container for the necessary parameters to execute the TestOperation service method. /// /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// /// /// The response from the TestOperation service method, as returned by RestXMLTest. /// REST API Reference for TestOperation Operation public virtual Task TestOperationAsync(TestOperationRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = TestOperationRequestMarshaller.Instance; options.ResponseUnmarshaller = TestOperationResponseUnmarshaller.Instance; return InvokeAsync(request, options, cancellationToken); } #endregion } }