diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 19bdddaa8a53..e26bfff008ca 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -562,7 +562,7 @@ public List S3AllowListOperations //new Operation(this, "PutBucketAccelerateConfiguration", DocumentRoot[OperationsKey]["PutBucketAccelerateConfiguration"]), //new Operation(this, "RestoreObject", DocumentRoot[OperationsKey]["RestoreObject"]), //new Operation(this, "SelectObjectContent", DocumentRoot[OperationsKey]["SelectObjectContent"]), - //new Operation(this, "PutBucketAnalyticsConfiguration" , DocumentRoot[OperationsKey]["PutBucketAnalyticsConfiguration"]), + new Operation(this, "PutBucketAnalyticsConfiguration" , DocumentRoot[OperationsKey]["PutBucketAnalyticsConfiguration"]), //new Operation(this, "PutBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["PutBucketIntelligentTieringConfiguration"]), //new Operation(this, "PutBucketInventoryConfiguration", DocumentRoot[OperationsKey]["PutBucketInventoryConfiguration"]), new Operation(this, "PutBucketMetricsConfiguration", DocumentRoot[OperationsKey]["PutBucketMetricsConfiguration"]), diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 345ff770b057..9ca183a779ac 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -907,6 +907,52 @@ } } ] + }, + "PutBucketAnalyticsConfigurationRequest":{ + "modify":[ + { + "Id":{"emitPropertyName":"AnalyticsId"} + }, + { + "ExpectedBucketOwner":{ + "injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"] + } + } + ] + }, + "AnalyticsConfiguration": { + "modify": [ + { + "Id":{"emitPropertyName": "AnalyticsId"} + }, + { + "Filter" :{"emitPropertyName": "AnalyticsFilter"} + }, + { + "AnalyticsFilter" :{ + "injectXmlMarshallCode": ["AnalyticsFilterCustomMarshall(publicRequest, xmlWriter);"] + } + } + ] + }, + "AnalyticsS3BucketDestination" : { + "modify":[ + { + "BucketAccountId" :{ + "injectXmlIsSet":["return !String.IsNullOrEmpty(this._bucketAccountId);"] + } + }, + { + "BucketName":{ + "injectXmlIsSet": ["return !String.IsNullOrEmpty(this._bucketName);"] + } + }, + { + "Prefix":{ + "injectXmlIsSet": ["return !String.IsNullOrEmpty(this._prefix);"] + } + } + ] } }, "operationModifiers": { @@ -1195,6 +1241,13 @@ "Marshaller" : "Amazon.Util.AWSSDKUtils.Join", "Unmarshaller" : "StringUnmarshaller" } + }, + "AnalyticsS3BucketDestination":{ + "Format":{ + "Type": "string", + "Marshaller": "StringUtils.FromString", + "Unmarshaller": "StringUnmarshaller" + } } }, "excludeMembers":{ @@ -1272,6 +1325,8 @@ "NotificationConfiguration", "CopyPartResult", "MetricsFilter", - "MetricsAndOperator" + "MetricsAndOperator", + "AnalyticsFilter", + "AnalyticsAndOperator" ] } diff --git a/sdk/src/Services/S3/Custom/Model/AnalyticsConfiguration.cs b/sdk/src/Services/S3/Custom/Model/AnalyticsConfiguration.cs deleted file mode 100644 index 895601ea841a..000000000000 --- a/sdk/src/Services/S3/Custom/Model/AnalyticsConfiguration.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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. - */ -using System; -using System.Collections.Generic; -using System.Xml.Serialization; -using System.Text; -using System.IO; -using Amazon.Runtime.Internal; - - -namespace Amazon.S3.Model -{ - /// - /// Class for AnalyticsConfiguration - /// - public class AnalyticsConfiguration - { - private string analyticsId; - private AnalyticsFilter analyticsFilter; - private StorageClassAnalysis storageClassAnalysis; - - - /// - /// The filter used to describe a set of objects for analyses. - /// A filter must have exactly one prefix, one tag, or one conjunction (AnalyticsAndOperator). - /// If no filter is provided, all objects will be considered in any analysis. - /// - public AnalyticsFilter AnalyticsFilter - { - get { return this.analyticsFilter; } - set { this.analyticsFilter = value; } - } - - // Check to see if Filter property is set - internal bool IsSetAnalyticsFilter() - { - return this.analyticsFilter != null; - } - - /// - /// The identifier used to represent an analytics configuration. - /// - [AWSProperty(Required = true)] - public string AnalyticsId - { - get { return this.analyticsId; } - set { this.analyticsId = value; } - } - - // Check to see if Id property is set - internal bool IsSetAnalyticsId() - { - return !(string.IsNullOrEmpty(this.analyticsId)); - } - - /// - /// If present, it indicates that data related to access patterns will be collected - /// and made available to analyze the tradeoffs between different storage classes. - /// - [AWSProperty(Required = true)] - public StorageClassAnalysis StorageClassAnalysis - { - get { return this.storageClassAnalysis; } - set { this.storageClassAnalysis = value; } - } - - // Check to see if StorageClassAnalysis property is set - internal bool IsSetStorageClassAnalysis() - { - return this.storageClassAnalysis != null; - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/AnalyticsS3BucketDestination.cs b/sdk/src/Services/S3/Custom/Model/AnalyticsS3BucketDestination.cs deleted file mode 100644 index 9d5d5d5b6ae6..000000000000 --- a/sdk/src/Services/S3/Custom/Model/AnalyticsS3BucketDestination.cs +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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. - */ -using System; -using System.Collections.Generic; -using System.Xml.Serialization; -using System.Text; -using System.IO; - - -namespace Amazon.S3.Model -{ - /// - /// Class for AnalyticsS3BucketDestination - /// - public class AnalyticsS3BucketDestination - { - private AnalyticsS3ExportFileFormat analyticsS3ExportFileFormat; - private string accountId; - private string bucketName; - private string prefix; - - /// - /// The account ID that owns the destination bucket. If no account ID is provided, the owner will not be validated prior to exporting data. - /// - public string BucketAccountId - { - get { return this.accountId; } - set { this.accountId = value; } - } - - // Check to see if BucketAccountId property is set - internal bool IsSetBucketAccountId() - { - return !(string.IsNullOrEmpty(this.accountId)); - } - - /// - /// The Amazon resource name (ARN) of the bucket to which data is exported. - /// - public string BucketName - { - get { return this.bucketName; } - set { this.bucketName = value; } - } - - // Check to see if Bucket property is set - internal bool IsSetBucketName() - { - return !(string.IsNullOrEmpty(this.bucketName)); - } - - /// - /// The file format used when exporting data to Amazon S3. - /// - public string Format - { - get { return this.analyticsS3ExportFileFormat; } - set { this.analyticsS3ExportFileFormat = value; } - } - - // Check to see if Format property is set - internal bool IsSetFormat() - { - return this.analyticsS3ExportFileFormat != null; - } - - /// - /// The prefix to use when exporting data. The exported data begins with this prefix. - /// - public string Prefix - { - get { return this.prefix; } - set { this.prefix = value; } - } - - // Check to see if Format property is set - internal bool IsSetPrefix() - { - return !(string.IsNullOrEmpty(this.prefix)); - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs index b4a52ba672d8..d98e06b3dd2c 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs @@ -32,138 +32,21 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations /// /// Request Marshaller for PutAnalyticsConfiguration operation /// - public class PutBucketAnalyticsConfigurationRequestMarshaller : IMarshaller, IMarshaller + public partial class PutBucketAnalyticsConfigurationRequestMarshaller : IMarshaller, IMarshaller { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) + void AnalyticsFilterCustomMarshall(PutBucketAnalyticsConfigurationRequest publicRequest, XmlWriter xmlWriter) { - return this.Marshall((PutBucketAnalyticsConfigurationRequest)input); - } - public IRequest Marshall(PutBucketAnalyticsConfigurationRequest putBucketAnalyticsConfigurationRequest) - { - IRequest request = new DefaultRequest(putBucketAnalyticsConfigurationRequest, "Amazon.S3"); - - request.HttpMethod = "PUT"; - - if (putBucketAnalyticsConfigurationRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(putBucketAnalyticsConfigurationRequest.ExpectedBucketOwner)); - - if (string.IsNullOrEmpty(putBucketAnalyticsConfigurationRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "PutBucketAnalyticsConfigurationRequest.BucketName"); - - request.ResourcePath = "/"; - - request.AddSubResource("analytics"); - - if (putBucketAnalyticsConfigurationRequest.IsSetAnalyticsId()) - { - request.AddSubResource("id", S3Transforms.ToStringValue(putBucketAnalyticsConfigurationRequest.AnalyticsId)); - } - - var stringWriter = new XMLEncodedStringWriter(System.Globalization.CultureInfo.InvariantCulture); - using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) + if (publicRequest.AnalyticsConfiguration.AnalyticsFilter != null) { - if (putBucketAnalyticsConfigurationRequest.IsSetAnalyticsConfiguration()) - { - var analyticsConfiguration = putBucketAnalyticsConfigurationRequest.AnalyticsConfiguration; - xmlWriter.WriteStartElement("AnalyticsConfiguration", S3Constants.S3RequestXmlNamespace); - if (analyticsConfiguration.IsSetAnalyticsId()) - { - xmlWriter.WriteElementString("Id", analyticsConfiguration.AnalyticsId); - } - if (analyticsConfiguration.IsSetAnalyticsFilter()) - { - xmlWriter.WriteStartElement("Filter"); - var predicate = analyticsConfiguration.AnalyticsFilter.AnalyticsFilterPredicate; - predicate.Accept(new AnalyticsPredicateVisitor(xmlWriter)); - xmlWriter.WriteEndElement(); - } - if (analyticsConfiguration.IsSetStorageClassAnalysis()) - { - if (analyticsConfiguration.IsSetStorageClassAnalysis()) - { - StorageClassAnalysis storageClassAnalysis = analyticsConfiguration.StorageClassAnalysis; - xmlWriter.WriteStartElement("StorageClassAnalysis"); - if (storageClassAnalysis.IsSetDataExport()) - { - xmlWriter.WriteStartElement("DataExport"); - StorageClassAnalysisDataExport storageClassAnalysisDataExport = storageClassAnalysis.DataExport; - if(storageClassAnalysisDataExport.IsSetOutputSchemaVersion()) - { - StorageClassAnalysisSchemaVersion storageClassAnalysisSchemaVersion = storageClassAnalysisDataExport.OutputSchemaVersion; - if (storageClassAnalysisSchemaVersion != null) - { - xmlWriter.WriteElementString("OutputSchemaVersion", storageClassAnalysisSchemaVersion); - } - } - if (storageClassAnalysisDataExport.IsSetDestination()) - { - xmlWriter.WriteStartElement("Destination"); - AnalyticsExportDestination analyticsExportDestination = storageClassAnalysisDataExport.Destination; - if (analyticsExportDestination.IsSetS3BucketDestination()) - { - xmlWriter.WriteStartElement("S3BucketDestination"); - AnalyticsS3BucketDestination analyticsS3BucketDestination = analyticsExportDestination.S3BucketDestination; - if (analyticsS3BucketDestination.IsSetFormat()) - { - xmlWriter.WriteElementString("Format", analyticsS3BucketDestination.Format); - } - if (analyticsS3BucketDestination.IsSetBucketAccountId()) - { - xmlWriter.WriteElementString("BucketAccountId", analyticsS3BucketDestination.BucketAccountId); - } - if (analyticsS3BucketDestination.IsSetBucketName()) - { - xmlWriter.WriteElementString("Bucket", analyticsS3BucketDestination.BucketName); - } - if (analyticsS3BucketDestination.IsSetPrefix()) - { - xmlWriter.WriteElementString("Prefix", analyticsS3BucketDestination.Prefix); - } - xmlWriter.WriteEndElement(); - } - xmlWriter.WriteEndElement(); - } - xmlWriter.WriteEndElement(); - } - xmlWriter.WriteEndElement(); - } - } - xmlWriter.WriteEndElement(); - } + xmlWriter.WriteStartElement("Filter"); + var predicate = publicRequest.AnalyticsConfiguration.AnalyticsFilter.AnalyticsFilterPredicate; + predicate.Accept(new AnalyticsPredicateVisitor(xmlWriter)); + xmlWriter.WriteEndElement(); } - - try - { - var content = stringWriter.ToString(); - request.Content = Encoding.UTF8.GetBytes(content); - request.Headers[HeaderKeys.ContentTypeHeader] = "application/xml"; - - ChecksumUtils.SetChecksumData(request); - } - catch (EncoderFallbackException e) - { - throw new AmazonServiceException("Unable to marshall request to XML", e); - } - - return request; } - - - private static PutBucketAnalyticsConfigurationRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static PutBucketAnalyticsConfigurationRequestMarshaller Instance + partial void PostMarshallCustomization(DefaultRequest defaultRequest, PutBucketAnalyticsConfigurationRequest publicRequest) { - get - { - if (_instance == null) - { - _instance = new PutBucketAnalyticsConfigurationRequestMarshaller(); - } - return _instance; - } + ChecksumUtils.SetChecksumData(defaultRequest); } } } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationResponseUnmarshaller.cs deleted file mode 100644 index 62ac63f55dce..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationResponseUnmarshaller.cs +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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. - */ -using System; -using System.Net; -using System.Collections.Generic; -using Amazon.S3.Model; -using Amazon.Runtime; -using Amazon.Runtime.Internal; -using Amazon.Runtime.Internal.Transform; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Response Unmarshaller for PutBucketAnalytics operation - /// - public class PutBucketAnalyticsConfigurationResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - PutBucketAnalyticsConfigurationResponse response = new PutBucketAnalyticsConfigurationResponse(); - - - return response; - } - - private static PutBucketAnalyticsConfigurationResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static PutBucketAnalyticsConfigurationResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new PutBucketAnalyticsConfigurationResponseUnmarshaller(); - } - return _instance; - } - } - - } -} - - diff --git a/sdk/src/Services/S3/Generated/Model/AnalyticsConfiguration.cs b/sdk/src/Services/S3/Generated/Model/AnalyticsConfiguration.cs new file mode 100644 index 000000000000..7678b55c9519 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/AnalyticsConfiguration.cs @@ -0,0 +1,102 @@ +/* + * 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 s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Specifies the configuration and any analyses for the analytics filter of an Amazon + /// S3 bucket. + /// + public partial class AnalyticsConfiguration + { + private AnalyticsFilter _analyticsFilter; + private string _analyticsId; + private StorageClassAnalysis _storageClassAnalysis; + + /// + /// Gets and sets the property AnalyticsFilter. + /// + /// The filter used to describe a set of objects for analyses. A filter must have exactly + /// one prefix, one tag, or one conjunction (AnalyticsAndOperator). If no filter is provided, + /// all objects will be considered in any analysis. + /// + /// + public AnalyticsFilter AnalyticsFilter + { + get { return this._analyticsFilter; } + set { this._analyticsFilter = value; } + } + + // Check to see if AnalyticsFilter property is set + internal bool IsSetAnalyticsFilter() + { + return this._analyticsFilter != null; + } + + /// + /// Gets and sets the property AnalyticsId. + /// + /// The ID that identifies the analytics configuration. + /// + /// + [AWSProperty(Required=true)] + public string AnalyticsId + { + get { return this._analyticsId; } + set { this._analyticsId = value; } + } + + // Check to see if AnalyticsId property is set + internal bool IsSetAnalyticsId() + { + return this._analyticsId != null; + } + + /// + /// Gets and sets the property StorageClassAnalysis. + /// + /// Contains data related to access patterns to be collected and made available to analyze + /// the tradeoffs between different storage classes. + /// + /// + [AWSProperty(Required=true)] + public StorageClassAnalysis StorageClassAnalysis + { + get { return this._storageClassAnalysis; } + set { this._storageClassAnalysis = value; } + } + + // Check to see if StorageClassAnalysis property is set + internal bool IsSetStorageClassAnalysis() + { + return this._storageClassAnalysis != null; + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/AnalyticsExportDestination.cs b/sdk/src/Services/S3/Generated/Model/AnalyticsExportDestination.cs similarity index 56% rename from sdk/src/Services/S3/Custom/Model/AnalyticsExportDestination.cs rename to sdk/src/Services/S3/Generated/Model/AnalyticsExportDestination.cs index a6d940647fc7..af31f4915091 100644 --- a/sdk/src/Services/S3/Custom/Model/AnalyticsExportDestination.cs +++ b/sdk/src/Services/S3/Generated/Model/AnalyticsExportDestination.cs @@ -1,4 +1,6 @@ -/* +/* + * 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 @@ -10,35 +12,48 @@ * 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 s3-2006-03-01.normal.json service model. + */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; +using System.Net; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +#pragma warning disable CS0612,CS0618,CS1570 namespace Amazon.S3.Model { /// - /// Class for AnalyticsExportDestination + /// Where to publish the analytics results. /// - public class AnalyticsExportDestination + public partial class AnalyticsExportDestination { - private AnalyticsS3BucketDestination analyticsS3BucketDestination; + private AnalyticsS3BucketDestination _s3BucketDestination; /// + /// Gets and sets the property S3BucketDestination. + /// /// A destination signifying output to an S3 bucket. + /// /// + [AWSProperty(Required=true)] public AnalyticsS3BucketDestination S3BucketDestination { - get { return this.analyticsS3BucketDestination; } - set { this.analyticsS3BucketDestination = value; } + get { return this._s3BucketDestination; } + set { this._s3BucketDestination = value; } } // Check to see if S3BucketDestination property is set internal bool IsSetS3BucketDestination() { - return this.analyticsS3BucketDestination != null; + return this._s3BucketDestination != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/AnalyticsS3BucketDestination.cs b/sdk/src/Services/S3/Generated/Model/AnalyticsS3BucketDestination.cs new file mode 100644 index 000000000000..e7bf68e30a34 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/AnalyticsS3BucketDestination.cs @@ -0,0 +1,124 @@ +/* + * 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 s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; + +#pragma warning disable CS0612,CS0618,CS1570 +namespace Amazon.S3.Model +{ + /// + /// Contains information about where to publish the analytics results. + /// + public partial class AnalyticsS3BucketDestination + { + private string _bucketAccountId; + private string _bucketName; + private string _format; + private string _prefix; + + /// + /// Gets and sets the property BucketAccountId. + /// + /// The account ID that owns the destination S3 bucket. If no account ID is provided, + /// the owner is not validated before exporting data. + /// + /// + /// + /// Although this value is optional, we strongly recommend that you set it to help prevent + /// problems if the destination bucket ownership changes. + /// + /// + /// + public string BucketAccountId + { + get { return this._bucketAccountId; } + set { this._bucketAccountId = value; } + } + + // Check to see if BucketAccountId property is set + internal bool IsSetBucketAccountId() + { + return !String.IsNullOrEmpty(this._bucketAccountId); + } + + /// + /// Gets and sets the property BucketName. + /// + /// The Amazon Resource Name (ARN) of the bucket to which data is exported. + /// + /// + [AWSProperty(Required=true)] + public string BucketName + { + get { return this._bucketName; } + set { this._bucketName = value; } + } + + // Check to see if BucketName property is set + internal bool IsSetBucketName() + { + return !String.IsNullOrEmpty(this._bucketName); + } + + /// + /// Gets and sets the property Format. + /// + /// Specifies the file format used when exporting data to Amazon S3. + /// + /// + [AWSProperty(Required=true)] + public string Format + { + get { return this._format; } + set { this._format = value; } + } + + // Check to see if Format property is set + internal bool IsSetFormat() + { + return this._format != null; + } + + /// + /// Gets and sets the property Prefix. + /// + /// The prefix to use when exporting data. The prefix is prepended to all results. + /// + /// + public string Prefix + { + get { return this._prefix; } + set { this._prefix = value; } + } + + // Check to see if Prefix property is set + internal bool IsSetPrefix() + { + return !String.IsNullOrEmpty(this._prefix); + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs new file mode 100644 index 000000000000..7a899e4ee7f4 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationRequestMarshaller.cs @@ -0,0 +1,155 @@ +/* + * 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 s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; +using System.Xml; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// PutBucketAnalyticsConfiguration Request Marshaller + /// + public partial class PutBucketAnalyticsConfigurationRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((PutBucketAnalyticsConfigurationRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(PutBucketAnalyticsConfigurationRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "PUT"; + request.AddSubResource("analytics"); + + if (publicRequest.IsSetExpectedBucketOwner()) + { + request.Headers["x-amz-expected-bucket-owner"] = publicRequest.ExpectedBucketOwner; + } + if (string.IsNullOrEmpty(publicRequest.BucketName)) + throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "PutBucketAnalyticsConfigurationRequest.BucketName"); + if (string.IsNullOrEmpty(publicRequest.AnalyticsId)) + throw new AmazonS3Exception("Request object does not have required field AnalyticsId set"); + + if (publicRequest.IsSetAnalyticsId()) + request.Parameters.Add("id", StringUtils.FromString(publicRequest.AnalyticsId)); + request.ResourcePath = "/"; + var stringWriter = new XMLEncodedStringWriter(CultureInfo.InvariantCulture); + using (var xmlWriter = XmlWriter.Create(stringWriter, new XmlWriterSettings() { Encoding = System.Text.Encoding.UTF8, OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.Entitize })) + { + if (publicRequest.IsSetAnalyticsConfiguration()) + { + xmlWriter.WriteStartElement("AnalyticsConfiguration", "http://s3.amazonaws.com/doc/2006-03-01/"); + AnalyticsFilterCustomMarshall(publicRequest, xmlWriter); + if(publicRequest.AnalyticsConfiguration.IsSetAnalyticsId()) + xmlWriter.WriteElementString("Id", StringUtils.FromString(publicRequest.AnalyticsConfiguration.AnalyticsId)); + + if (publicRequest.AnalyticsConfiguration.StorageClassAnalysis != null) + { + xmlWriter.WriteStartElement("StorageClassAnalysis"); + if (publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport != null) + { + xmlWriter.WriteStartElement("DataExport"); + if (publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination != null) + { + xmlWriter.WriteStartElement("Destination"); + if (publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination != null) + { + xmlWriter.WriteStartElement("S3BucketDestination"); + if(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.IsSetBucketAccountId()) + xmlWriter.WriteElementString("BucketAccountId", StringUtils.FromString(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.BucketAccountId)); + if(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.IsSetBucketName()) + xmlWriter.WriteElementString("Bucket", StringUtils.FromString(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.BucketName)); + if(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.IsSetFormat()) + xmlWriter.WriteElementString("Format", StringUtils.FromString(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.Format)); + if(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.IsSetPrefix()) + xmlWriter.WriteElementString("Prefix", StringUtils.FromString(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.Destination.S3BucketDestination.Prefix)); + xmlWriter.WriteEndElement(); + } + xmlWriter.WriteEndElement(); + } + if(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.IsSetOutputSchemaVersion()) + xmlWriter.WriteElementString("OutputSchemaVersion", StringUtils.FromString(publicRequest.AnalyticsConfiguration.StorageClassAnalysis.DataExport.OutputSchemaVersion)); + xmlWriter.WriteEndElement(); + } + xmlWriter.WriteEndElement(); + } + + xmlWriter.WriteEndElement(); + } + } + PostMarshallCustomization(request, publicRequest); + try + { + string content = stringWriter.ToString(); + request.Content = System.Text.Encoding.UTF8.GetBytes(content); + request.Headers["Content-Type"] = "application/xml"; + request.Headers[Amazon.Util.HeaderKeys.XAmzApiVersion] = "2006-03-01"; + } + catch (EncoderFallbackException e) + { + throw new AmazonServiceException("Unable to marshall request to XML", e); + } + request.UseQueryString = true; + return request; + } + private static PutBucketAnalyticsConfigurationRequestMarshaller _instance = new PutBucketAnalyticsConfigurationRequestMarshaller(); + + internal static PutBucketAnalyticsConfigurationRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutBucketAnalyticsConfigurationRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, PutBucketAnalyticsConfigurationRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, PutBucketAnalyticsConfigurationRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationResponseUnmarshaller.cs new file mode 100644 index 000000000000..3a176377a943 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/PutBucketAnalyticsConfigurationResponseUnmarshaller.cs @@ -0,0 +1,98 @@ +/* + * 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 s3-2006-03-01.normal.json service model. + */ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Net; +using System.Text; +using System.Xml.Serialization; + +using Amazon.S3.Model; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +using Amazon.Runtime.Internal.Transform; +using Amazon.Runtime.Internal.Util; + +#pragma warning disable CS0612,CS0618 +namespace Amazon.S3.Model.Internal.MarshallTransformations +{ + /// + /// Response Unmarshaller for PutBucketAnalyticsConfiguration operation + /// + public partial class PutBucketAnalyticsConfigurationResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + PutBucketAnalyticsConfigurationResponse response = new PutBucketAnalyticsConfigurationResponse(); + + PostUnmarshallCustomization(context, response); + return response; + } + + + /// + /// Unmarshaller error response to exception. + /// + /// + /// + /// + /// + public override AmazonServiceException UnmarshallException(XmlUnmarshallerContext context, Exception innerException, HttpStatusCode statusCode) + { + S3ErrorResponse errorResponse = S3ErrorResponseUnmarshaller.Instance.Unmarshall(context); + errorResponse.InnerException = innerException; + errorResponse.StatusCode = statusCode; + + var responseBodyBytes = context.GetResponseBodyBytes(); + + using (var streamCopy = new MemoryStream(responseBodyBytes)) + using (var contextCopy = new XmlUnmarshallerContext(streamCopy, false, null)) + { + } + return base.ConstructS3Exception(context, errorResponse, innerException, statusCode); + } + + partial void PostUnmarshallCustomization(XmlUnmarshallerContext context, PutBucketAnalyticsConfigurationResponse response); + + private static PutBucketAnalyticsConfigurationResponseUnmarshaller _instance = new PutBucketAnalyticsConfigurationResponseUnmarshaller(); + + internal static PutBucketAnalyticsConfigurationResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static PutBucketAnalyticsConfigurationResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutBucketAnalyticsConfigurationRequest.cs b/sdk/src/Services/S3/Generated/Model/PutBucketAnalyticsConfigurationRequest.cs similarity index 70% rename from sdk/src/Services/S3/Custom/Model/PutBucketAnalyticsConfigurationRequest.cs rename to sdk/src/Services/S3/Generated/Model/PutBucketAnalyticsConfigurationRequest.cs index fc17cac859af..0a347d7f173a 100644 --- a/sdk/src/Services/S3/Custom/Model/PutBucketAnalyticsConfigurationRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/PutBucketAnalyticsConfigurationRequest.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,20 +12,28 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -using Amazon.Runtime; -using Amazon.Runtime.Internal; + +/* + * Do not modify this file. This file is generated from the s3-2006-03-01.normal.json service model. + */ using System; using System.Collections.Generic; -using System.Text; using System.Xml.Serialization; +using System.Text; +using System.IO; +using System.Net; + +using Amazon.Runtime; +using Amazon.Runtime.Internal; +#pragma warning disable CS0612,CS0618,CS1570 namespace Amazon.S3.Model { /// /// Container for the parameters to the PutBucketAnalyticsConfiguration operation. /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported for directory buckets. /// /// /// @@ -35,9 +43,9 @@ namespace Amazon.S3.Model /// /// /// You can choose to have storage class analysis export analysis reports sent to a comma-separated - /// values (CSV) flat file. See the DataExport request element. Reports are - /// updated daily and are based on the object filters that you configure. When selecting - /// data export, you specify a destination bucket and an optional destination prefix where + /// values (CSV) flat file. See the DataExport request element. Reports are updated + /// daily and are based on the object filters that you configure. When selecting data + /// export, you specify a destination bucket and an optional destination prefix where /// the file is written. You can export the data to a destination bucket in a different /// account. However, the destination bucket must be in the same Region as the bucket /// that you are making the PUT analytics configuration to. For more information, see @@ -53,7 +61,7 @@ namespace Amazon.S3.Model /// /// /// - /// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration + /// To use this operation, you must have permissions to perform the s3:PutAnalyticsConfiguration /// action. The bucket owner has this permission by default. The bucket owner can grant /// this permission to others. For more information about permissions, see Permissions /// Related to Bucket Subresource Operations and Managing @@ -61,7 +69,7 @@ namespace Amazon.S3.Model /// /// /// - /// PutBucketAnalyticsConfiguration has the following special errors: + /// PutBucketAnalyticsConfiguration has the following special errors: /// ///
    • /// @@ -103,7 +111,7 @@ namespace Amazon.S3.Model /// ///
/// - /// The following operations are related to PutBucketAnalyticsConfiguration: + /// The following operations are related to PutBucketAnalyticsConfiguration: /// ///
+ /// + /// + /// You must URL encode any signed header values that contain spaces. For example, if + /// your header value is my file.txt, containing two spaces after my, you + /// must URL encode this value to my%20%20file.txt. + /// + /// ///
public partial class PutBucketAnalyticsConfigurationRequest : AmazonWebServiceRequest { - private string bucketName; - private string analyticsId; - private AnalyticsConfiguration analyticsConfiguration; - private string expectedBucketOwner; + private AnalyticsConfiguration _analyticsConfiguration; + private string _analyticsId; + private string _bucketName; + private string _expectedBucketOwner; /// - /// The name of the bucket to which an analytics configuration is stored. + /// Gets and sets the property AnalyticsConfiguration. + /// + /// The configuration and any analyses for the analytics filter. + /// /// - public string BucketName + [AWSProperty(Required=true)] + public AnalyticsConfiguration AnalyticsConfiguration { - get { return this.bucketName; } - set { this.bucketName = value; } + get { return this._analyticsConfiguration; } + set { this._analyticsConfiguration = value; } } - // Check to see if Bucket property is set - internal bool IsSetBucket() + // Check to see if AnalyticsConfiguration property is set + internal bool IsSetAnalyticsConfiguration() { - return !(string.IsNullOrEmpty(this.bucketName)); + return this._analyticsConfiguration != null; } /// - /// The identifier used to represent an analytics configuration. + /// Gets and sets the property AnalyticsId. + /// + /// The ID that identifies the analytics configuration. + /// /// + [AWSProperty(Required=true)] public string AnalyticsId { - get { return this.analyticsId; } - set { this.analyticsId = value; } + get { return this._analyticsId; } + set { this._analyticsId = value; } } // Check to see if AnalyticsId property is set internal bool IsSetAnalyticsId() { - return !(string.IsNullOrEmpty(this.analyticsId)); + return this._analyticsId != null; } /// - /// The configuration and any analyses for the analytics filter. + /// Gets and sets the property BucketName. + /// + /// The name of the bucket to which an analytics configuration is stored. + /// /// - [AWSProperty(Required = true)] - public AnalyticsConfiguration AnalyticsConfiguration + [AWSProperty(Required=true)] + public string BucketName { - get { return this.analyticsConfiguration; } - set { this.analyticsConfiguration = value; } + get { return this._bucketName; } + set { this._bucketName = value; } } - // Check to see if AnalyticsConfiguration property is set - internal bool IsSetAnalyticsConfiguration() + // Check to see if BucketName property is set + internal bool IsSetBucketName() { - return this.analyticsConfiguration != null; + return this._bucketName != null; } /// @@ -180,22 +205,20 @@ internal bool IsSetAnalyticsConfiguration() /// /// The account ID of the expected bucket owner. If the account ID that you provide does /// not match the actual owner of the bucket, the request fails with the HTTP status code - /// 403 Forbidden (access denied). + /// 403 Forbidden (access denied). /// /// public string ExpectedBucketOwner { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } } - /// - /// Checks to see if ExpectedBucketOwner is set. - /// - /// true, if ExpectedBucketOwner property is set. + // Check to see if ExpectedBucketOwner property is set internal bool IsSetExpectedBucketOwner() { - return !String.IsNullOrEmpty(this.expectedBucketOwner); + return !String.IsNullOrEmpty(this._expectedBucketOwner); } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/PutBucketAnalyticsConfigurationResponse.cs b/sdk/src/Services/S3/Generated/Model/PutBucketAnalyticsConfigurationResponse.cs similarity index 73% rename from sdk/src/Services/S3/Custom/Model/PutBucketAnalyticsConfigurationResponse.cs rename to sdk/src/Services/S3/Generated/Model/PutBucketAnalyticsConfigurationResponse.cs index 4243be5eaab0..616e6fa6afa7 100644 --- a/sdk/src/Services/S3/Custom/Model/PutBucketAnalyticsConfigurationResponse.cs +++ b/sdk/src/Services/S3/Generated/Model/PutBucketAnalyticsConfigurationResponse.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,22 +12,28 @@ * 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 s3-2006-03-01.normal.json service model. + */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; +using System.IO; +using System.Net; using Amazon.Runtime; +using Amazon.Runtime.Internal; +#pragma warning disable CS0612,CS0618,CS1570 namespace Amazon.S3.Model { /// - /// Returns information about the PutBucketAnalyticsConfigurationResponse response metadata. - /// The PutBucketAnalyticsConfigurationResponse operation has a void result type. + /// This is the response object from the PutBucketAnalyticsConfiguration operation. /// public partial class PutBucketAnalyticsConfigurationResponse : AmazonWebServiceResponse { - } -} - + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/StorageClassAnalysis.cs b/sdk/src/Services/S3/Generated/Model/StorageClassAnalysis.cs similarity index 53% rename from sdk/src/Services/S3/Custom/Model/StorageClassAnalysis.cs rename to sdk/src/Services/S3/Generated/Model/StorageClassAnalysis.cs index 362840d4172b..3e63af812db4 100644 --- a/sdk/src/Services/S3/Custom/Model/StorageClassAnalysis.cs +++ b/sdk/src/Services/S3/Generated/Model/StorageClassAnalysis.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,35 +12,49 @@ * 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 s3-2006-03-01.normal.json service model. + */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; +using System.Net; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +#pragma warning disable CS0612,CS0618,CS1570 namespace Amazon.S3.Model { /// - /// Class for StorageClassAnalysis + /// Specifies data related to access patterns to be collected and made available to analyze + /// the tradeoffs between different storage classes for an Amazon S3 bucket. /// - public class StorageClassAnalysis + public partial class StorageClassAnalysis { - private StorageClassAnalysisDataExport storageClassAnalysisDataExport; + private StorageClassAnalysisDataExport _dataExport; /// - /// A container used to describe how data related to the storage class analysis should be exported. + /// Gets and sets the property DataExport. + /// + /// Specifies how data related to the storage class analysis for an Amazon S3 bucket should + /// be exported. + /// /// public StorageClassAnalysisDataExport DataExport { - get { return this.storageClassAnalysisDataExport; } - set { this.storageClassAnalysisDataExport = value; } + get { return this._dataExport; } + set { this._dataExport = value; } } // Check to see if DataExport property is set internal bool IsSetDataExport() { - return this.storageClassAnalysisDataExport != null; + return this._dataExport != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/StorageClassAnalysisDataExport.cs b/sdk/src/Services/S3/Generated/Model/StorageClassAnalysisDataExport.cs similarity index 53% rename from sdk/src/Services/S3/Custom/Model/StorageClassAnalysisDataExport.cs rename to sdk/src/Services/S3/Generated/Model/StorageClassAnalysisDataExport.cs index 163c5ddca87a..16241607ca5b 100644 --- a/sdk/src/Services/S3/Custom/Model/StorageClassAnalysisDataExport.cs +++ b/sdk/src/Services/S3/Generated/Model/StorageClassAnalysisDataExport.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). @@ -12,51 +12,69 @@ * 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 s3-2006-03-01.normal.json service model. + */ using System; using System.Collections.Generic; using System.Xml.Serialization; using System.Text; using System.IO; +using System.Net; +using Amazon.Runtime; +using Amazon.Runtime.Internal; +#pragma warning disable CS0612,CS0618,CS1570 namespace Amazon.S3.Model { /// - /// Class for StorageClassAnalysisDataExport + /// Container for data related to the storage class analysis for an Amazon S3 bucket for + /// export. /// - public class StorageClassAnalysisDataExport + public partial class StorageClassAnalysisDataExport { - private StorageClassAnalysisSchemaVersion storageClassAnalysisSchemaVersion; - private AnalyticsExportDestination analyticsExportDestination; + private AnalyticsExportDestination _destination; + private StorageClassAnalysisSchemaVersion _outputSchemaVersion; /// - /// The version of the output schema to use when exporting data. Must be V_1. + /// Gets and sets the property Destination. + /// + /// The place to store the data for an analysis. + /// /// - public StorageClassAnalysisSchemaVersion OutputSchemaVersion + [AWSProperty(Required=true)] + public AnalyticsExportDestination Destination { - get { return this.storageClassAnalysisSchemaVersion; } - set { this.storageClassAnalysisSchemaVersion = value; } + get { return this._destination; } + set { this._destination = value; } } - // Check to see if OutputSchemaVersion property is set - internal bool IsSetOutputSchemaVersion() + // Check to see if Destination property is set + internal bool IsSetDestination() { - return this.storageClassAnalysisSchemaVersion != null; + return this._destination != null; } /// - /// The place to store the data for an analysis. + /// Gets and sets the property OutputSchemaVersion. + /// + /// The version of the output schema to use when exporting data. Must be V_1. + /// /// - public AnalyticsExportDestination Destination + [AWSProperty(Required=true)] + public StorageClassAnalysisSchemaVersion OutputSchemaVersion { - get { return this.analyticsExportDestination; } - set { this.analyticsExportDestination = value; } + get { return this._outputSchemaVersion; } + set { this._outputSchemaVersion = value; } } - // Check to see if DataExport property is set - internal bool IsSetDestination() + // Check to see if OutputSchemaVersion property is set + internal bool IsSetOutputSchemaVersion() { - return this.analyticsExportDestination != null; + return this._outputSchemaVersion != null; } + } -} +} \ No newline at end of file