/* * 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 marketplacecommerceanalytics-2015-07-01.normal.json service model. */ using System; using System.Collections.Generic; using System.Net; using Amazon.AWSMarketplaceCommerceAnalytics.Model; using Amazon.AWSMarketplaceCommerceAnalytics.Model.Internal.MarshallTransformations; using Amazon.AWSMarketplaceCommerceAnalytics.Internal; using Amazon.Runtime; using Amazon.Runtime.Internal; using Amazon.Runtime.Internal.Auth; using Amazon.Runtime.Internal.Transform; namespace Amazon.AWSMarketplaceCommerceAnalytics { /// /// Implementation for accessing AWSMarketplaceCommerceAnalytics /// /// Provides AWS Marketplace business intelligence data on-demand. /// public partial class AmazonAWSMarketplaceCommerceAnalyticsClient : AmazonServiceClient, IAmazonAWSMarketplaceCommerceAnalytics { private static IServiceMetadata serviceMetadata = new AmazonAWSMarketplaceCommerceAnalyticsMetadata(); #region Constructors /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient 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 AmazonAWSMarketplaceCommerceAnalyticsClient() : base(FallbackCredentialsFactory.GetCredentials(), new AmazonAWSMarketplaceCommerceAnalyticsConfig()) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient 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 AmazonAWSMarketplaceCommerceAnalyticsClient(RegionEndpoint region) : base(FallbackCredentialsFactory.GetCredentials(), new AmazonAWSMarketplaceCommerceAnalyticsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient 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 AmazonAWSMarketplaceCommerceAnalyticsClient Configuration Object public AmazonAWSMarketplaceCommerceAnalyticsClient(AmazonAWSMarketplaceCommerceAnalyticsConfig config) : base(FallbackCredentialsFactory.GetCredentials(config), config){} /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Credentials /// /// AWS Credentials public AmazonAWSMarketplaceCommerceAnalyticsClient(AWSCredentials credentials) : this(credentials, new AmazonAWSMarketplaceCommerceAnalyticsConfig()) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Credentials /// /// AWS Credentials /// The region to connect. public AmazonAWSMarketplaceCommerceAnalyticsClient(AWSCredentials credentials, RegionEndpoint region) : this(credentials, new AmazonAWSMarketplaceCommerceAnalyticsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Credentials and an /// AmazonAWSMarketplaceCommerceAnalyticsClient Configuration object. /// /// AWS Credentials /// The AmazonAWSMarketplaceCommerceAnalyticsClient Configuration Object public AmazonAWSMarketplaceCommerceAnalyticsClient(AWSCredentials credentials, AmazonAWSMarketplaceCommerceAnalyticsConfig clientConfig) : base(credentials, clientConfig) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key public AmazonAWSMarketplaceCommerceAnalyticsClient(string awsAccessKeyId, string awsSecretAccessKey) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonAWSMarketplaceCommerceAnalyticsConfig()) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// The region to connect. public AmazonAWSMarketplaceCommerceAnalyticsClient(string awsAccessKeyId, string awsSecretAccessKey, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, new AmazonAWSMarketplaceCommerceAnalyticsConfig() {RegionEndpoint=region}) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Access Key ID, AWS Secret Key and an /// AmazonAWSMarketplaceCommerceAnalyticsClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// The AmazonAWSMarketplaceCommerceAnalyticsClient Configuration Object public AmazonAWSMarketplaceCommerceAnalyticsClient(string awsAccessKeyId, string awsSecretAccessKey, AmazonAWSMarketplaceCommerceAnalyticsConfig clientConfig) : base(awsAccessKeyId, awsSecretAccessKey, clientConfig) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Access Key ID and AWS Secret Key /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token public AmazonAWSMarketplaceCommerceAnalyticsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAWSMarketplaceCommerceAnalyticsConfig()) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient 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 AmazonAWSMarketplaceCommerceAnalyticsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, RegionEndpoint region) : this(awsAccessKeyId, awsSecretAccessKey, awsSessionToken, new AmazonAWSMarketplaceCommerceAnalyticsConfig{RegionEndpoint = region}) { } /// /// Constructs AmazonAWSMarketplaceCommerceAnalyticsClient with AWS Access Key ID, AWS Secret Key and an /// AmazonAWSMarketplaceCommerceAnalyticsClient Configuration object. /// /// AWS Access Key ID /// AWS Secret Access Key /// AWS Session Token /// The AmazonAWSMarketplaceCommerceAnalyticsClient Configuration Object public AmazonAWSMarketplaceCommerceAnalyticsClient(string awsAccessKeyId, string awsSecretAccessKey, string awsSessionToken, AmazonAWSMarketplaceCommerceAnalyticsConfig 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 AmazonAWSMarketplaceCommerceAnalyticsEndpointResolver()); } /// /// 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 GenerateDataSet /// /// Given a data set type and data set publication date, asynchronously publishes the /// requested data set to the specified S3 bucket and notifies the specified SNS topic /// once the data is available. Returns a unique request identifier that can be used to /// correlate requests with notifications from the SNS topic. Data sets will be published /// in comma-separated values (CSV) format with the file name {data_set_type}_YYYY-MM-DD.csv. /// If a file with the same name already exists (e.g. if the same data set is requested /// twice), the original file will be overwritten by the new file. Requires a Role with /// an attached permissions policy providing Allow permissions for the following actions: /// s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy. /// /// Container for the necessary parameters to execute the GenerateDataSet service method. /// /// The response from the GenerateDataSet service method, as returned by AWSMarketplaceCommerceAnalytics. /// /// This exception is thrown when an internal service error occurs. /// /// REST API Reference for GenerateDataSet Operation public virtual GenerateDataSetResponse GenerateDataSet(GenerateDataSetRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = GenerateDataSetRequestMarshaller.Instance; options.ResponseUnmarshaller = GenerateDataSetResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the GenerateDataSet operation. /// /// /// Container for the necessary parameters to execute the GenerateDataSet operation on AmazonAWSMarketplaceCommerceAnalyticsClient. /// 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 EndGenerateDataSet /// operation. /// REST API Reference for GenerateDataSet Operation public virtual IAsyncResult BeginGenerateDataSet(GenerateDataSetRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = GenerateDataSetRequestMarshaller.Instance; options.ResponseUnmarshaller = GenerateDataSetResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the GenerateDataSet operation. /// /// /// The IAsyncResult returned by the call to BeginGenerateDataSet. /// /// Returns a GenerateDataSetResult from AWSMarketplaceCommerceAnalytics. /// REST API Reference for GenerateDataSet Operation public virtual GenerateDataSetResponse EndGenerateDataSet(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion #region StartSupportDataExport /// /// Given a data set type and a from date, asynchronously publishes the requested customer /// support data to the specified S3 bucket and notifies the specified SNS topic once /// the data is available. Returns a unique request identifier that can be used to correlate /// requests with notifications from the SNS topic. Data sets will be published in comma-separated /// values (CSV) format with the file name {data_set_type}_YYYY-MM-DD'T'HH-mm-ss'Z'.csv. /// If a file with the same name already exists (e.g. if the same data set is requested /// twice), the original file will be overwritten by the new file. Requires a Role with /// an attached permissions policy providing Allow permissions for the following actions: /// s3:PutObject, s3:GetBucketLocation, sns:GetTopicAttributes, sns:Publish, iam:GetRolePolicy. /// /// Container for the necessary parameters to execute the StartSupportDataExport service method. /// /// The response from the StartSupportDataExport service method, as returned by AWSMarketplaceCommerceAnalytics. /// /// This exception is thrown when an internal service error occurs. /// /// REST API Reference for StartSupportDataExport Operation public virtual StartSupportDataExportResponse StartSupportDataExport(StartSupportDataExportRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = StartSupportDataExportRequestMarshaller.Instance; options.ResponseUnmarshaller = StartSupportDataExportResponseUnmarshaller.Instance; return Invoke(request, options); } /// /// Initiates the asynchronous execution of the StartSupportDataExport operation. /// /// /// Container for the necessary parameters to execute the StartSupportDataExport operation on AmazonAWSMarketplaceCommerceAnalyticsClient. /// 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 EndStartSupportDataExport /// operation. /// REST API Reference for StartSupportDataExport Operation public virtual IAsyncResult BeginStartSupportDataExport(StartSupportDataExportRequest request, AsyncCallback callback, object state) { var options = new InvokeOptions(); options.RequestMarshaller = StartSupportDataExportRequestMarshaller.Instance; options.ResponseUnmarshaller = StartSupportDataExportResponseUnmarshaller.Instance; return BeginInvoke(request, options, callback, state); } /// /// Finishes the asynchronous execution of the StartSupportDataExport operation. /// /// /// The IAsyncResult returned by the call to BeginStartSupportDataExport. /// /// Returns a StartSupportDataExportResult from AWSMarketplaceCommerceAnalytics. /// REST API Reference for StartSupportDataExport Operation public virtual StartSupportDataExportResponse EndStartSupportDataExport(IAsyncResult asyncResult) { return EndInvoke(asyncResult); } #endregion } }