diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index 06674aeb4b86..43c1252c8c9a 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -552,7 +552,7 @@ public List S3AllowListOperations new Operation(this, "CreateSession", DocumentRoot[OperationsKey]["CreateSession"]), new Operation(this, "GetBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["GetBucketAnalyticsConfiguration"]), new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]), - //new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]), + new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]), //new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]), new Operation(this, "GetBucketMetricsConfiguration", DocumentRoot[OperationsKey]["GetBucketMetricsConfiguration"]), //new Operation(this, "GetBucketVersioning", DocumentRoot[OperationsKey]["GetBucketVersioning"]), diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index 65e2199bf87c..77891d4f19c6 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1127,6 +1127,16 @@ "Format":{"emitPropertyName":"InventoryFormat"} } ] + }, + "GetBucketInventoryConfigurationRequest":{ + "modify":[ + { + "Id":{"emitPropertyName":"InventoryId"} + }, + { + "ExpectedBucketOwner":{"injectXmlIsSet":["return !String.IsNullOrEmpty(this._expectedBucketOwner);"]} + } + ] } }, diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.cs index 5b298baf4b49..58eb3a39eb35 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.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"). @@ -21,52 +21,14 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations { - /// - /// Get InventoryConfiguration Request Marshaller + /// + /// Custom marshaller for GetBucketInventoryConfiguration /// - public class GetBucketInventoryConfigurationRequestMarshaller : IMarshaller, IMarshaller + public partial class GetBucketInventoryConfigurationRequestMarshaller : IMarshaller, IMarshaller { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) + partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketInventoryConfigurationRequest publicRequest) { - return this.Marshall((GetBucketInventoryConfigurationRequest)input); - } - - public IRequest Marshall(GetBucketInventoryConfigurationRequest getInventoryConfigurationRequest) - { - IRequest request = new DefaultRequest(getInventoryConfigurationRequest, "Amazon.S3"); - - request.Suppress404Exceptions = true; - request.HttpMethod = "GET"; - - if (getInventoryConfigurationRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(getInventoryConfigurationRequest.ExpectedBucketOwner)); - - if (string.IsNullOrEmpty(getInventoryConfigurationRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketInventoryConfigurationRequest.BucketName"); - - request.ResourcePath = "/"; - request.AddSubResource("inventory"); - request.AddSubResource("id", getInventoryConfigurationRequest.InventoryId); - request.UseQueryString = true; - - return request; - } - - private static GetBucketInventoryConfigurationRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static GetBucketInventoryConfigurationRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new GetBucketInventoryConfigurationRequestMarshaller(); - } - return _instance; - } + defaultRequest.Suppress404Exceptions = true; } } } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationResponseUnmarshaller.cs deleted file mode 100644 index 847d66c8613b..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationResponseUnmarshaller.cs +++ /dev/null @@ -1,139 +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 GetInventoryConfiguration operation - /// - public class GetBucketInventoryConfigurationResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - GetBucketInventoryConfigurationResponse response = new GetBucketInventoryConfigurationResponse(); - - while (context.Read()) - { - if (context.IsStartElement) - { - UnmarshallResult(context, response); - continue; - } - } - - return response; - } - - private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketInventoryConfigurationResponse response) - { - - int originalDepth = context.CurrentDepth; - int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - - response.InventoryConfiguration = new InventoryConfiguration(); - - while (context.Read()) - { - if (context.IsStartElement || context.IsAttribute) - { - if (context.TestExpression("Destination", targetDepth)) - { - response.InventoryConfiguration.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("IsEnabled", targetDepth)) - { - response.InventoryConfiguration.IsEnabled = BoolUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("Filter", targetDepth)) - { - response.InventoryConfiguration.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("Id", targetDepth)) - { - response.InventoryConfiguration.InventoryId = StringUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("IncludedObjectVersions", targetDepth)) - { - response.InventoryConfiguration.IncludedObjectVersions = StringUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("Field", targetDepth + 1)) - { - if (response.InventoryConfiguration.InventoryOptionalFields == null) - { - response.InventoryConfiguration.InventoryOptionalFields = new List(); - } - response.InventoryConfiguration.InventoryOptionalFields.Add(StringUnmarshaller.Instance.Unmarshall(context)); - continue; - } - if (context.TestExpression("Schedule", targetDepth)) - { - response.InventoryConfiguration.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context); - - continue; - } - } - else if (context.IsEndElement && context.CurrentDepth < originalDepth) - { - return; - } - } - - return; - } - - private static GetBucketInventoryConfigurationResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static GetBucketInventoryConfigurationResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new GetBucketInventoryConfigurationResponseUnmarshaller(); - } - return _instance; - } - } - - } -} diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryConfigurationUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryConfigurationUnmarshaller.cs deleted file mode 100644 index d1a00b1fb71a..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryConfigurationUnmarshaller.cs +++ /dev/null @@ -1,120 +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.Collections.Generic; - -using Amazon.S3.Model; -using Amazon.Runtime.Internal.Transform; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// InventoryConfiguration Unmarshaller - /// - public class InventoryConfigurationUnmarshaller : IXmlUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public InventoryConfiguration Unmarshall(XmlUnmarshallerContext context) - { - InventoryConfiguration response = new InventoryConfiguration(); - int originalDepth = context.CurrentDepth; - int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - - while (context.Read()) - { - if (context.IsStartElement || context.IsAttribute) - { - if (context.TestExpression("Destination", targetDepth)) - { - response.Destination = InventoryDestinationUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("IsEnabled", targetDepth)) - { - response.IsEnabled = BoolUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("Filter", targetDepth)) - { - response.InventoryFilter = InventoryFilterUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("Id", targetDepth)) - { - response.InventoryId = StringUnmarshaller.Instance.Unmarshall(context); - - continue; - } - if (context.TestExpression("IncludedObjectVersions", targetDepth)) - { - response.IncludedObjectVersions = InventoryIncludedObjectVersions.FindValue(StringUnmarshaller.Instance.Unmarshall(context)); - - continue; - } - if (context.TestExpression("Field", targetDepth + 1)) - { - if (response.InventoryOptionalFields == null) - { - response.InventoryOptionalFields = new List(); - } - response.InventoryOptionalFields.Add(InventoryOptionalField.FindValue(StringUnmarshaller.Instance.Unmarshall(context))); - continue; - } - if (context.TestExpression("Schedule", targetDepth)) - { - response.Schedule = InventoryScheduleUnmarshaller.Instance.Unmarshall(context); - - continue; - } - } - else if (context.IsEndElement && context.CurrentDepth < originalDepth) - { - return response; - } - } - - - - return response; - } - - - private static InventoryConfigurationUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static InventoryConfigurationUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new InventoryConfigurationUnmarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SSES3Unmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SSES3Unmarshaller.cs deleted file mode 100644 index e6fbff95a7c1..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SSES3Unmarshaller.cs +++ /dev/null @@ -1,71 +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 Amazon.Runtime.Internal.Transform; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// SSES3 Unmarshaller - /// - public class SSES3Unmarshaller : IXmlUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public SSES3 Unmarshall(XmlUnmarshallerContext context) - { - SSES3 condition = new SSES3(); - int originalDepth = context.CurrentDepth; - int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - - while (context.Read()) - { - if (context.IsStartElement || context.IsAttribute) - { - // Currently SSES3 is an empty shape and does not have any members inside of it. - continue; - } - else if (context.IsEndElement && context.CurrentDepth < originalDepth) - { - return condition; - } - } - return condition; - } - - private static SSES3Unmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static SSES3Unmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new SSES3Unmarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketInventoryConfigurationRequest.cs b/sdk/src/Services/S3/Generated/Model/GetBucketInventoryConfigurationRequest.cs similarity index 68% rename from sdk/src/Services/S3/Custom/Model/GetBucketInventoryConfigurationRequest.cs rename to sdk/src/Services/S3/Generated/Model/GetBucketInventoryConfigurationRequest.cs index 778e08b9d18b..cbde2bf3f52f 100644 --- a/sdk/src/Services/S3/Custom/Model/GetBucketInventoryConfigurationRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/GetBucketInventoryConfigurationRequest.cs @@ -12,31 +12,37 @@ * 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 { /// /// Container for the parameters to the GetBucketInventoryConfiguration operation. /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported for directory buckets. /// /// /// - /// Returns an inventory configuration (identified by the inventory configuration ID) + /// Returns an S3 Inventory configuration (identified by the inventory configuration ID) /// from the bucket. /// /// /// - /// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration + /// To use this operation, you must have permissions to perform the s3:GetInventoryConfiguration /// action. The bucket owner has this permission by default and can grant this permission /// to others. For more information about permissions, see Permissions /// Related to Bucket Subresource Operations and Managing @@ -49,7 +55,7 @@ namespace Amazon.S3.Model /// /// /// - /// The following operations are related to GetBucketInventoryConfiguration: + /// The following operations are related to GetBucketInventoryConfiguration: /// /// + /// + /// + /// 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 GetBucketInventoryConfigurationRequest : AmazonWebServiceRequest { - private string bucketName; - private string inventoryId; - private string expectedBucketOwner; + private string _bucketName; + private string _expectedBucketOwner; + private string _inventoryId; /// + /// Gets and sets the property BucketName. + /// /// The name of the bucket containing the inventory configuration to retrieve. + /// /// + [AWSProperty(Required=true)] public string BucketName { - get { return this.bucketName; } - set { this.bucketName = value; } + get { return this._bucketName; } + set { this._bucketName = value; } } // Check to see if BucketName property is set internal bool IsSetBucketName() { - return !(string.IsNullOrEmpty(this.bucketName)); + return this._bucketName != null; } /// - /// The ID used to identify the inventory configuration. + /// Gets and sets the property ExpectedBucketOwner. + /// + /// 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). + /// /// - public string InventoryId + public string ExpectedBucketOwner { - get { return this.inventoryId; } - set { this.inventoryId = value; } + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } } - // Check to see if InventoryId property is set - internal bool IsSetInventoryId() + // Check to see if ExpectedBucketOwner property is set + internal bool IsSetExpectedBucketOwner() { - return !(string.IsNullOrEmpty(this.inventoryId)); + return !String.IsNullOrEmpty(this._expectedBucketOwner); } /// - /// Gets and sets the property ExpectedBucketOwner. + /// Gets and sets the property InventoryId. /// - /// 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). + /// The ID used to identify the inventory configuration. /// /// - public string ExpectedBucketOwner + [AWSProperty(Required=true)] + public string InventoryId { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } + get { return this._inventoryId; } + set { this._inventoryId = value; } } - /// - /// Checks to see if ExpectedBucketOwner is set. - /// - /// true, if ExpectedBucketOwner property is set. - internal bool IsSetExpectedBucketOwner() + // Check to see if InventoryId property is set + internal bool IsSetInventoryId() { - return !String.IsNullOrEmpty(this.expectedBucketOwner); + return this._inventoryId != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketInventoryConfigurationResponse.cs b/sdk/src/Services/S3/Generated/Model/GetBucketInventoryConfigurationResponse.cs similarity index 64% rename from sdk/src/Services/S3/Custom/Model/GetBucketInventoryConfigurationResponse.cs rename to sdk/src/Services/S3/Generated/Model/GetBucketInventoryConfigurationResponse.cs index f7c51291dee0..8905ab0fe5cf 100644 --- a/sdk/src/Services/S3/Custom/Model/GetBucketInventoryConfigurationResponse.cs +++ b/sdk/src/Services/S3/Generated/Model/GetBucketInventoryConfigurationResponse.cs @@ -12,35 +12,47 @@ * 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 { /// - /// GetInventoryConfigurationResponse Response + /// This is the response object from the GetBucketInventoryConfiguration operation. /// public partial class GetBucketInventoryConfigurationResponse : AmazonWebServiceResponse { - InventoryConfiguration inventoryConfiguration; + private InventoryConfiguration _inventoryConfiguration; /// + /// Gets and sets the property InventoryConfiguration. + /// /// Specifies the inventory configuration. + /// /// public InventoryConfiguration InventoryConfiguration { - get { return this.inventoryConfiguration; } - set { this.inventoryConfiguration = value; } + get { return this._inventoryConfiguration; } + set { this._inventoryConfiguration = value; } } // Check to see if InventoryConfiguration property is set internal bool IsSetInventoryConfiguration() { - return this.inventoryConfiguration != null; + return this._inventoryConfiguration != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.cs new file mode 100644 index 000000000000..ced479fd4f69 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationRequestMarshaller.cs @@ -0,0 +1,101 @@ +/* + * 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 +{ + /// + /// GetBucketInventoryConfiguration Request Marshaller + /// + public partial class GetBucketInventoryConfigurationRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((GetBucketInventoryConfigurationRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(GetBucketInventoryConfigurationRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "GET"; + request.AddSubResource("inventory"); + + 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.", "GetBucketInventoryConfigurationRequest.BucketName"); + if (string.IsNullOrEmpty(publicRequest.InventoryId)) + throw new AmazonS3Exception("Request object does not have required field InventoryId set"); + + if (publicRequest.IsSetInventoryId()) + request.Parameters.Add("id", StringUtils.FromString(publicRequest.InventoryId)); + request.ResourcePath = "/"; + + PostMarshallCustomization(request, publicRequest); + request.UseQueryString = true; + return request; + } + private static GetBucketInventoryConfigurationRequestMarshaller _instance = new GetBucketInventoryConfigurationRequestMarshaller(); + + internal static GetBucketInventoryConfigurationRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketInventoryConfigurationRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, GetBucketInventoryConfigurationRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketInventoryConfigurationRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationResponseUnmarshaller.cs new file mode 100644 index 000000000000..9bad3d1e2399 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketInventoryConfigurationResponseUnmarshaller.cs @@ -0,0 +1,126 @@ +/* + * 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 GetBucketInventoryConfiguration operation + /// + public partial class GetBucketInventoryConfigurationResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + GetBucketInventoryConfigurationResponse response = new GetBucketInventoryConfigurationResponse(); + UnmarshallResult(context,response); + + PostUnmarshallCustomization(context, response); + return response; + } + + private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketInventoryConfigurationResponse response) + { + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + if (context.IsEmptyResponse) + { + return; + } + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("InventoryConfiguration", targetDepth)) + { + var unmarshaller = InventoryConfigurationUnmarshaller.Instance; + response.InventoryConfiguration = unmarshaller.Unmarshall(context); + continue; + } + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return; + } + } + return; + } + + + /// + /// 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, GetBucketInventoryConfigurationResponse response); + + private static GetBucketInventoryConfigurationResponseUnmarshaller _instance = new GetBucketInventoryConfigurationResponseUnmarshaller(); + + internal static GetBucketInventoryConfigurationResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketInventoryConfigurationResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryConfigurationUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryConfigurationUnmarshaller.cs new file mode 100644 index 000000000000..29030ab0a989 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryConfigurationUnmarshaller.cs @@ -0,0 +1,131 @@ +/* + * 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 InventoryConfiguration Object + /// + public partial class InventoryConfigurationUnmarshaller : IXmlUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public InventoryConfiguration Unmarshall(XmlUnmarshallerContext context) + { + InventoryConfiguration unmarshalledObject = new InventoryConfiguration(); + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + + if (context.IsStartOfDocument) + targetDepth += 2; + + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("Destination", targetDepth)) + { + var unmarshaller = InventoryDestinationUnmarshaller.Instance; + unmarshalledObject.Destination = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("IncludedObjectVersions", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.IncludedObjectVersions = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("Filter", targetDepth)) + { + var unmarshaller = InventoryFilterUnmarshaller.Instance; + unmarshalledObject.InventoryFilter = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("Id", targetDepth)) + { + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.InventoryId = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("OptionalFields/Field", targetDepth)) + { + if (unmarshalledObject.InventoryOptionalFields == null) + { + unmarshalledObject.InventoryOptionalFields = new List(); + } + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.InventoryOptionalFields.Add(unmarshaller.Unmarshall(context)); + continue; + } + if (context.TestExpression("IsEnabled", targetDepth)) + { + var unmarshaller = NullableBoolUnmarshaller.Instance; + unmarshalledObject.IsEnabled = unmarshaller.Unmarshall(context); + continue; + } + if (context.TestExpression("Schedule", targetDepth)) + { + var unmarshaller = InventoryScheduleUnmarshaller.Instance; + unmarshalledObject.Schedule = unmarshaller.Unmarshall(context); + continue; + } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return unmarshalledObject; + } + } + return unmarshalledObject; + } + + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, InventoryConfiguration unmarshalledObject, int targetDepth); + + private static InventoryConfigurationUnmarshaller _instance = new InventoryConfigurationUnmarshaller(); + + /// + /// Gets the singleton. + /// + public static InventoryConfigurationUnmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryDestinationUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryDestinationUnmarshaller.cs similarity index 56% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryDestinationUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryDestinationUnmarshaller.cs index 93c782ac0451..c6efcb2accd7 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryDestinationUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryDestinationUnmarshaller.cs @@ -12,69 +12,80 @@ * 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 { /// - /// InventoryDestination Unmarshaller - /// - public class InventoryDestinationUnmarshaller : IXmlUnmarshaller + /// Response Unmarshaller for InventoryDestination Object + /// + public partial class InventoryDestinationUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public InventoryDestination Unmarshall(XmlUnmarshallerContext context) { - InventoryDestination condition = new InventoryDestination(); + InventoryDestination unmarshalledObject = new InventoryDestination(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - + + if (context.IsStartOfDocument) + targetDepth += 2; + while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("S3BucketDestination", targetDepth)) { - condition.S3BucketDestination = InventoryS3BucketDestinationUnmarshaller.Instance.Unmarshall(context); - + var unmarshaller = InventoryS3BucketDestinationUnmarshaller.Instance; + unmarshalledObject.S3BucketDestination = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return condition; + return unmarshalledObject; } - } - - - - return condition; + } + return unmarshalledObject; } - private static InventoryDestinationUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, InventoryDestination unmarshalledObject, int targetDepth); + + private static InventoryDestinationUnmarshaller _instance = new InventoryDestinationUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static InventoryDestinationUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new InventoryDestinationUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryEncryptionUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryEncryptionUnmarshaller.cs similarity index 55% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryEncryptionUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryEncryptionUnmarshaller.cs index bc5616bf6843..903856c6b99c 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryEncryptionUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryEncryptionUnmarshaller.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,75 +12,86 @@ * 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 { /// - /// InventoryEncryption Unmarshaller - /// - public class InventoryEncryptionUnmarshaller : IXmlUnmarshaller + /// Response Unmarshaller for InventoryEncryption Object + /// + public partial class InventoryEncryptionUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public InventoryEncryption Unmarshall(XmlUnmarshallerContext context) { - InventoryEncryption condition = new InventoryEncryption(); + InventoryEncryption unmarshalledObject = new InventoryEncryption(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - + + if (context.IsStartOfDocument) + targetDepth += 2; + while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("SSE-KMS", targetDepth)) { - condition.SSEKMS = SSEKMSUnmarshaller.Instance.Unmarshall(context); - + var unmarshaller = SSEKMSUnmarshaller.Instance; + unmarshalledObject.SSEKMS = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SSE-S3", targetDepth)) { - condition.SSES3 = SSES3Unmarshaller.Instance.Unmarshall(context); - + var unmarshaller = SSES3Unmarshaller.Instance; + unmarshalledObject.SSES3 = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return condition; + return unmarshalledObject; } - } - - - - return condition; + } + return unmarshalledObject; } - private static InventoryEncryptionUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, InventoryEncryption unmarshalledObject, int targetDepth); + + private static InventoryEncryptionUnmarshaller _instance = new InventoryEncryptionUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static InventoryEncryptionUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new InventoryEncryptionUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryS3BucketDestinationUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryS3BucketDestinationUnmarshaller.cs similarity index 52% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryS3BucketDestinationUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryS3BucketDestinationUnmarshaller.cs index 3491947ef7ac..3df91d426220 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryS3BucketDestinationUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryS3BucketDestinationUnmarshaller.cs @@ -12,91 +12,104 @@ * 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 { /// - /// InventoryS3BucketDestination Unmarshaller - /// - public class InventoryS3BucketDestinationUnmarshaller : IXmlUnmarshaller + /// Response Unmarshaller for InventoryS3BucketDestination Object + /// + public partial class InventoryS3BucketDestinationUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public InventoryS3BucketDestination Unmarshall(XmlUnmarshallerContext context) { - InventoryS3BucketDestination condition = new InventoryS3BucketDestination(); + InventoryS3BucketDestination unmarshalledObject = new InventoryS3BucketDestination(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - + + if (context.IsStartOfDocument) + targetDepth += 2; + while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AccountId", targetDepth)) { - condition.AccountId = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.AccountId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Bucket", targetDepth)) { - condition.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.BucketName = unmarshaller.Unmarshall(context); continue; } - if (context.TestExpression("Format", targetDepth)) + if (context.TestExpression("Encryption", targetDepth)) { - condition.InventoryFormat = InventoryFormat.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context)); - + var unmarshaller = InventoryEncryptionUnmarshaller.Instance; + unmarshalledObject.InventoryEncryption = unmarshaller.Unmarshall(context); continue; } - if (context.TestExpression("Prefix", targetDepth)) + if (context.TestExpression("Format", targetDepth)) { - condition.Prefix = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.InventoryFormat = unmarshaller.Unmarshall(context); continue; } - if (context.TestExpression("Encryption", targetDepth)) + if (context.TestExpression("Prefix", targetDepth)) { - condition.InventoryEncryption = InventoryEncryptionUnmarshaller.Instance.Unmarshall(context); + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Prefix = unmarshaller.Unmarshall(context); + continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return condition; + return unmarshalledObject; } - } - - - - return condition; + } + return unmarshalledObject; } - private static InventoryS3BucketDestinationUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, InventoryS3BucketDestination unmarshalledObject, int targetDepth); + + private static InventoryS3BucketDestinationUnmarshaller _instance = new InventoryS3BucketDestinationUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static InventoryS3BucketDestinationUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new InventoryS3BucketDestinationUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryScheduleUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryScheduleUnmarshaller.cs similarity index 54% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryScheduleUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryScheduleUnmarshaller.cs index 24600dffeba6..f0165c7dbd26 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/InventoryScheduleUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/InventoryScheduleUnmarshaller.cs @@ -12,68 +12,80 @@ * 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 { /// - /// InventorySchedule Unmarshaller - /// - public class InventoryScheduleUnmarshaller : IXmlUnmarshaller + /// Response Unmarshaller for InventorySchedule Object + /// + public partial class InventoryScheduleUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public InventorySchedule Unmarshall(XmlUnmarshallerContext context) { - InventorySchedule condition = new InventorySchedule(); + InventorySchedule unmarshalledObject = new InventorySchedule(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - + + if (context.IsStartOfDocument) + targetDepth += 2; + while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Frequency", targetDepth)) { - - condition.Frequency = InventoryFrequency.FindValue(StringUnmarshaller.GetInstance().Unmarshall(context)); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Frequency = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return condition; + return unmarshalledObject; } - } - - return condition; + } + return unmarshalledObject; } - private static InventoryScheduleUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, InventorySchedule unmarshalledObject, int targetDepth); + + private static InventoryScheduleUnmarshaller _instance = new InventoryScheduleUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static InventoryScheduleUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new InventoryScheduleUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SSEKMSUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SSEKMSUnmarshaller.cs similarity index 55% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SSEKMSUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SSEKMSUnmarshaller.cs index 730e45196c88..d4fb53e9dc77 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/SSEKMSUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SSEKMSUnmarshaller.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,69 +12,80 @@ * 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 { /// - /// SSEKMS Unmarshaller - /// - public class SSEKMSUnmarshaller : IXmlUnmarshaller + /// Response Unmarshaller for SSEKMS Object + /// + public partial class SSEKMSUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public SSEKMS Unmarshall(XmlUnmarshallerContext context) { - SSEKMS condition = new SSEKMS(); + SSEKMS unmarshalledObject = new SSEKMS(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - + + if (context.IsStartOfDocument) + targetDepth += 2; + while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("KeyId", targetDepth)) { - condition.KeyId = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.KeyId = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return condition; + return unmarshalledObject; } - } - - - - return condition; + } + return unmarshalledObject; } - private static SSEKMSUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, SSEKMS unmarshalledObject, int targetDepth); + + private static SSEKMSUnmarshaller _instance = new SSEKMSUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static SSEKMSUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new SSEKMSUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SSES3Unmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SSES3Unmarshaller.cs new file mode 100644 index 000000000000..470b40e506b3 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/SSES3Unmarshaller.cs @@ -0,0 +1,85 @@ +/* + * 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 SSES3 Object + /// + public partial class SSES3Unmarshaller : IXmlUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public SSES3 Unmarshall(XmlUnmarshallerContext context) + { + SSES3 unmarshalledObject = new SSES3(); + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + + if (context.IsStartOfDocument) + targetDepth += 2; + + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); + } + else if (context.IsEndElement && context.CurrentDepth < originalDepth) + { + return unmarshalledObject; + } + } + return unmarshalledObject; + } + + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, SSES3 unmarshalledObject, int targetDepth); + + private static SSES3Unmarshaller _instance = new SSES3Unmarshaller(); + + /// + /// Gets the singleton. + /// + public static SSES3Unmarshaller Instance + { + get + { + return _instance; + } + } + } +} \ No newline at end of file