diff --git a/generator/ServiceClientGeneratorLib/ServiceModel.cs b/generator/ServiceClientGeneratorLib/ServiceModel.cs index b215dc74940c..8fb6e75bf7c4 100644 --- a/generator/ServiceClientGeneratorLib/ServiceModel.cs +++ b/generator/ServiceClientGeneratorLib/ServiceModel.cs @@ -551,7 +551,7 @@ public List S3AllowListOperations // phase 3 (including those moved from phase 1) new Operation(this, "CreateSession", DocumentRoot[OperationsKey]["CreateSession"]), new Operation(this, "GetBucketAnalyticsConfiguration", DocumentRoot[OperationsKey]["GetBucketAnalyticsConfiguration"]), - //new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]), + new Operation(this, "GetBucketIntelligentTieringConfiguration", DocumentRoot[OperationsKey]["GetBucketIntelligentTieringConfiguration"]), //new Operation(this, "GetBucketInventoryConfiguration", DocumentRoot[OperationsKey]["GetBucketInventoryConfiguration"]), //new Operation(this, "GetBucketLogging", DocumentRoot[OperationsKey]["GetBucketLogging"]), new Operation(this, "GetBucketMetricsConfiguration", DocumentRoot[OperationsKey]["GetBucketMetricsConfiguration"]), diff --git a/generator/ServiceModels/s3/s3.customizations.json b/generator/ServiceModels/s3/s3.customizations.json index faecb8a73e07..78d1918f216a 100644 --- a/generator/ServiceModels/s3/s3.customizations.json +++ b/generator/ServiceModels/s3/s3.customizations.json @@ -1028,6 +1028,21 @@ "injectXmlMarshallCode": ["IntelligentTieringFilterCustomMarshall(publicRequest, xmlWriter);"] } } + ], + "predicateListUnmarshallers": [ + { + "IntelligentTieringFilter" :{ + "predicateListUnmarshallerName" : "IntelligentTieringPredicateListFilterUnmarshaller", + "filterPredicateName": "IntelligentTieringFilterPredicate" + } + } + ] + }, + "GetBucketIntelligentTieringConfigurationRequest":{ + "modify":[ + { + "Id" : {"emitPropertyName": "IntelligentTieringId"} + } ] } }, diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.cs index 76ad48826a85..0590f6846535 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.cs +++ b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.cs @@ -28,49 +28,11 @@ namespace Amazon.S3.Model.Internal.MarshallTransformations /// /// Get InventoryConfiguration Request Marshaller /// - public class GetBucketIntelligentTieringConfigurationRequestMarshaller : IMarshaller, IMarshaller + public partial class GetBucketIntelligentTieringConfigurationRequestMarshaller : IMarshaller, IMarshaller { - public IRequest Marshall(Amazon.Runtime.AmazonWebServiceRequest input) + partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketIntelligentTieringConfigurationRequest publicRequest) { - return this.Marshall((GetBucketIntelligentTieringConfigurationRequest)input); - } - - public IRequest Marshall(GetBucketIntelligentTieringConfigurationRequest getBucketIntelligentTieringConfigurationRequest) - { - IRequest request = new DefaultRequest(getBucketIntelligentTieringConfigurationRequest, "Amazon.S3"); - - request.Suppress404Exceptions = true; - request.HttpMethod = "GET"; - - if (string.IsNullOrEmpty(getBucketIntelligentTieringConfigurationRequest.BucketName)) - throw new System.ArgumentException("BucketName is a required property and must be set before making this call.", "GetBucketInventoryConfigurationRequest.BucketName"); - - if (getBucketIntelligentTieringConfigurationRequest.IsSetExpectedBucketOwner()) - request.Headers.Add(S3Constants.AmzHeaderExpectedBucketOwner, S3Transforms.ToStringValue(getBucketIntelligentTieringConfigurationRequest.ExpectedBucketOwner)); - - request.ResourcePath = "/"; - request.AddSubResource("intelligent-tiering"); - request.AddSubResource("id", getBucketIntelligentTieringConfigurationRequest.IntelligentTieringId); - request.UseQueryString = true; - - return request; - } - - private static GetBucketIntelligentTieringConfigurationRequestMarshaller _instance; - - /// - /// Singleton for marshaller - /// - public static GetBucketIntelligentTieringConfigurationRequestMarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new GetBucketIntelligentTieringConfigurationRequestMarshaller(); - } - return _instance; - } + defaultRequest.Suppress404Exceptions = true; } } } diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationResponseUnmarshaller.cs deleted file mode 100644 index 663cb976ac31..000000000000 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationResponseUnmarshaller.cs +++ /dev/null @@ -1,123 +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; -using Amazon.Runtime.Internal.Transform; -using Amazon.S3.Model.Internal.MarshallTransformations; -using System; -using System.Collections.Generic; -using System.Text; - -namespace Amazon.S3.Model.Internal.MarshallTransformations -{ - /// - /// Response Unmarshaller for GetBucketIntelligentTieringConfiguration operation - /// - public class GetBucketIntelligentTieringConfigurationResponseUnmarshaller : S3ReponseUnmarshaller - { - /// - /// Unmarshaller the response from the service to the response class. - /// - /// - /// - public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) - { - GetBucketIntelligentTieringConfigurationResponse response = new GetBucketIntelligentTieringConfigurationResponse(); - - while (context.Read()) - { - if (context.IsStartElement) - { - UnmarshallResult(context, response); - continue; - } - } - - return response; - } - - private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketIntelligentTieringConfigurationResponse response) - { - - int originalDepth = context.CurrentDepth; - int targetDepth = originalDepth + 1; - - if (context.IsStartOfDocument) - targetDepth += 2; - - response.IntelligentTieringConfiguration = new IntelligentTieringConfiguration(); - - while (context.Read()) - { - if (context.IsStartElement || context.IsAttribute) - { - if (context.TestExpression("Filter", targetDepth)) - { - response.IntelligentTieringConfiguration.IntelligentTieringFilter = new IntelligentTieringFilter() - { - IntelligentTieringFilterPredicate = (IntelligentTieringPredicateListFilterUnmarshaller.Instance.Unmarshall(context))[0] - }; - continue; - } - - if (context.TestExpression("Id", targetDepth)) - { - response.IntelligentTieringConfiguration.IntelligentTieringId = StringUnmarshaller.Instance.Unmarshall(context); - continue; - } - - if (context.TestExpression("Status", targetDepth)) - { - response.IntelligentTieringConfiguration.Status = StringUnmarshaller.Instance.Unmarshall(context); - continue; - } - - if (context.TestExpression("Tiering", targetDepth)) - { - if (response.IntelligentTieringConfiguration.Tierings == null) - { - response.IntelligentTieringConfiguration.Tierings = new List(); - } - response.IntelligentTieringConfiguration.Tierings.Add(TieringUnmarshaller.Instance.Unmarshall(context)); - continue; - } - - } - else if (context.IsEndElement && context.CurrentDepth < originalDepth) - { - return; - } - } - - return; - } - - private static GetBucketIntelligentTieringConfigurationResponseUnmarshaller _instance; - - /// - /// Singleton for the unmarshaller - /// - public static GetBucketIntelligentTieringConfigurationResponseUnmarshaller Instance - { - get - { - if (_instance == null) - { - _instance = new GetBucketIntelligentTieringConfigurationResponseUnmarshaller(); - } - return _instance; - } - } - } -} diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketIntelligentTieringConfigurationRequest.cs b/sdk/src/Services/S3/Generated/Model/GetBucketIntelligentTieringConfigurationRequest.cs similarity index 66% rename from sdk/src/Services/S3/Custom/Model/GetBucketIntelligentTieringConfigurationRequest.cs rename to sdk/src/Services/S3/Generated/Model/GetBucketIntelligentTieringConfigurationRequest.cs index 82a8d961ab7a..b7b5b96bbfe8 100644 --- a/sdk/src/Services/S3/Custom/Model/GetBucketIntelligentTieringConfigurationRequest.cs +++ b/sdk/src/Services/S3/Generated/Model/GetBucketIntelligentTieringConfigurationRequest.cs @@ -1,29 +1,39 @@ -/* - *Copyright Amazon.com, Inc.or its affiliates. All Rights Reserved. +/* + * 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. + * 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 + * + * 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; + +/* + * 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 GetBucketIntelligentTieringConfiguration operation. /// /// - /// This operation is not supported by directory buckets. + /// This operation is not supported for directory buckets. /// /// /// @@ -53,8 +63,7 @@ namespace Amazon.S3.Model /// /// /// - /// Operations related to GetBucketIntelligentTieringConfiguration include: - /// + /// Operations related to GetBucketIntelligentTieringConfiguration include: /// /// + /// + /// + /// 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 GetBucketIntelligentTieringConfigurationRequest : AmazonWebServiceRequest - { - - private string bucketName; - private string expectedBucketOwner; - private string intelligentTieringId; + { + private string _bucketName; + private string _expectedBucketOwner; + private string _intelligentTieringId; /// - /// The name of the Amazon S3 bucket whose configuration you want to modify or retrieve. + /// Gets and sets the property BucketName. + /// + /// The name of the Amazon S3 bucket whose configuration you want to modify or 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 this.BucketName != null; + return this._bucketName != null; } /// @@ -105,29 +123,34 @@ internal bool IsSetBucketName() /// public string ExpectedBucketOwner { - get { return this.expectedBucketOwner; } - set { this.expectedBucketOwner = value; } + get { return this._expectedBucketOwner; } + set { this._expectedBucketOwner = value; } } // Check to see if ExpectedBucketOwner property is set internal bool IsSetExpectedBucketOwner() { - return this.expectedBucketOwner != null; + return this._expectedBucketOwner != null; } /// - /// The ID used to identify the S3 Intelligent-Tiering configuration. + /// Gets and sets the property IntelligentTieringId. + /// + /// The ID used to identify the S3 Intelligent-Tiering configuration. + /// /// + [AWSProperty(Required=true)] public string IntelligentTieringId - { - get { return this.intelligentTieringId; } - set { this.intelligentTieringId = value; } + { + get { return this._intelligentTieringId; } + set { this._intelligentTieringId = value; } } // Check to see if IntelligentTieringId property is set internal bool IsSetIntelligentTieringId() { - return !(string.IsNullOrEmpty(this.intelligentTieringId)); + return this._intelligentTieringId != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/GetBucketIntelligentTieringConfigurationResponse.cs b/sdk/src/Services/S3/Generated/Model/GetBucketIntelligentTieringConfigurationResponse.cs similarity index 54% rename from sdk/src/Services/S3/Custom/Model/GetBucketIntelligentTieringConfigurationResponse.cs rename to sdk/src/Services/S3/Generated/Model/GetBucketIntelligentTieringConfigurationResponse.cs index d0c6de60f432..eba495c8dc41 100644 --- a/sdk/src/Services/S3/Custom/Model/GetBucketIntelligentTieringConfigurationResponse.cs +++ b/sdk/src/Services/S3/Generated/Model/GetBucketIntelligentTieringConfigurationResponse.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,33 +12,47 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -using Amazon.Runtime; + +/* + * 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 { /// - /// Response object for the GetBucketIntelligentTieringConfiguration operation. + /// This is the response object from the GetBucketIntelligentTieringConfiguration operation. /// public partial class GetBucketIntelligentTieringConfigurationResponse : AmazonWebServiceResponse - { - IntelligentTieringConfiguration intelligentTieringConfiguration; + { + private IntelligentTieringConfiguration _intelligentTieringConfiguration; /// - /// Container for S3 Intelligent-Tiering configuration. + /// Gets and sets the property IntelligentTieringConfiguration. + /// + /// Container for S3 Intelligent-Tiering configuration. + /// /// public IntelligentTieringConfiguration IntelligentTieringConfiguration { - get { return this.intelligentTieringConfiguration; } - set { this.intelligentTieringConfiguration = value; } + get { return this._intelligentTieringConfiguration; } + set { this._intelligentTieringConfiguration = value; } } - // Check to see if InventoryConfiguration property is set + // Check to see if IntelligentTieringConfiguration property is set internal bool IsSetIntelligentTieringConfiguration() { - return this.intelligentTieringConfiguration != null; + return this._intelligentTieringConfiguration != null; } + } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.cs new file mode 100644 index 000000000000..dd4cd5d3f2c9 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationRequestMarshaller.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 +{ + /// + /// GetBucketIntelligentTieringConfiguration Request Marshaller + /// + public partial class GetBucketIntelligentTieringConfigurationRequestMarshaller : IMarshaller , IMarshaller + { + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(AmazonWebServiceRequest input) + { + return this.Marshall((GetBucketIntelligentTieringConfigurationRequest)input); + } + + /// + /// Marshaller the request object to the HTTP request. + /// + /// + /// + public IRequest Marshall(GetBucketIntelligentTieringConfigurationRequest publicRequest) + { + var request = new DefaultRequest(publicRequest, "Amazon.S3"); + PreMarshallCustomization(request, publicRequest); + request.HttpMethod = "GET"; + request.AddSubResource("intelligent-tiering"); + + 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.", "GetBucketIntelligentTieringConfigurationRequest.BucketName"); + if (string.IsNullOrEmpty(publicRequest.IntelligentTieringId)) + throw new AmazonS3Exception("Request object does not have required field IntelligentTieringId set"); + + if (publicRequest.IsSetIntelligentTieringId()) + request.Parameters.Add("id", StringUtils.FromString(publicRequest.IntelligentTieringId)); + request.ResourcePath = "/"; + + PostMarshallCustomization(request, publicRequest); + request.UseQueryString = true; + return request; + } + private static GetBucketIntelligentTieringConfigurationRequestMarshaller _instance = new GetBucketIntelligentTieringConfigurationRequestMarshaller(); + + internal static GetBucketIntelligentTieringConfigurationRequestMarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketIntelligentTieringConfigurationRequestMarshaller Instance + { + get + { + return _instance; + } + } + + partial void PostMarshallCustomization(DefaultRequest defaultRequest, GetBucketIntelligentTieringConfigurationRequest publicRequest); + partial void PreMarshallCustomization(DefaultRequest defaultRequest, GetBucketIntelligentTieringConfigurationRequest publicRequest); + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationResponseUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationResponseUnmarshaller.cs new file mode 100644 index 000000000000..f24155ad6c43 --- /dev/null +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/GetBucketIntelligentTieringConfigurationResponseUnmarshaller.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 GetBucketIntelligentTieringConfiguration operation + /// + public partial class GetBucketIntelligentTieringConfigurationResponseUnmarshaller : S3ReponseUnmarshaller + { + /// + /// Unmarshaller the response from the service to the response class. + /// + /// + /// + public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) + { + GetBucketIntelligentTieringConfigurationResponse response = new GetBucketIntelligentTieringConfigurationResponse(); + UnmarshallResult(context,response); + + PostUnmarshallCustomization(context, response); + return response; + } + + private static void UnmarshallResult(XmlUnmarshallerContext context, GetBucketIntelligentTieringConfigurationResponse response) + { + int originalDepth = context.CurrentDepth; + int targetDepth = originalDepth + 1; + if (context.IsEmptyResponse) + { + return; + } + while (context.Read()) + { + if (context.IsStartElement || context.IsAttribute) + { + if (context.TestExpression("IntelligentTieringConfiguration", targetDepth)) + { + var unmarshaller = IntelligentTieringConfigurationUnmarshaller.Instance; + response.IntelligentTieringConfiguration = 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, GetBucketIntelligentTieringConfigurationResponse response); + + private static GetBucketIntelligentTieringConfigurationResponseUnmarshaller _instance = new GetBucketIntelligentTieringConfigurationResponseUnmarshaller(); + + internal static GetBucketIntelligentTieringConfigurationResponseUnmarshaller GetInstance() + { + return _instance; + } + + /// + /// Gets the singleton. + /// + public static GetBucketIntelligentTieringConfigurationResponseUnmarshaller Instance + { + get + { + return _instance; + } + } + + } +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/IntelligentTieringConfigurationUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/IntelligentTieringConfigurationUnmarshaller.cs similarity index 50% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/IntelligentTieringConfigurationUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/IntelligentTieringConfigurationUnmarshaller.cs index 58fc880dc9f8..212a8065eaa8 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/IntelligentTieringConfigurationUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/IntelligentTieringConfigurationUnmarshaller.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,91 +12,103 @@ * express or implied. See the License for the specific language governing * permissions and limitations under the License. */ -using Amazon.Runtime.Internal.Transform; + +/* + * 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 { /// - /// Unmarshaller for IntelligentTieringConfiguration - /// - public class IntelligentTieringConfigurationUnmarshaller : IXmlUnmarshaller + /// Response Unmarshaller for IntelligentTieringConfiguration Object + /// + public partial class IntelligentTieringConfigurationUnmarshaller : IXmlUnmarshaller { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public IntelligentTieringConfiguration Unmarshall(XmlUnmarshallerContext context) { - IntelligentTieringConfiguration response = new IntelligentTieringConfiguration(); + IntelligentTieringConfiguration unmarshalledObject = new IntelligentTieringConfiguration(); 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("Filter", targetDepth)) { - response.IntelligentTieringFilter = new IntelligentTieringFilter() - { - IntelligentTieringFilterPredicate = (IntelligentTieringPredicateListFilterUnmarshaller.Instance.Unmarshall(context))[0] - }; + var predicateList = IntelligentTieringPredicateListFilterUnmarshaller.Instance.Unmarshall(context); + unmarshalledObject.IntelligentTieringFilter = new IntelligentTieringFilter(); + unmarshalledObject.IntelligentTieringFilter.IntelligentTieringFilterPredicate = predicateList[0]; continue; } if (context.TestExpression("Id", targetDepth)) { - response.IntelligentTieringId = StringUnmarshaller.Instance.Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.IntelligentTieringId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { - response.Status = StringUnmarshaller.Instance.Unmarshall(context); + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } - if (context.TestExpression("Tiering", targetDepth)) { - if (response.Tierings == null) + if (unmarshalledObject.Tierings == null) { - response.Tierings = new List(); + unmarshalledObject.Tierings = new List(); } - response.Tierings.Add(TieringUnmarshaller.Instance.Unmarshall(context)); + var unmarshaller = TieringUnmarshaller.Instance; + unmarshalledObject.Tierings.Add(unmarshaller.Unmarshall(context)); continue; } + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return response; + return unmarshalledObject; } - } - - return response; + } + return unmarshalledObject; } - private static IntelligentTieringConfigurationUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, IntelligentTieringConfiguration unmarshalledObject, int targetDepth); + + private static IntelligentTieringConfigurationUnmarshaller _instance = new IntelligentTieringConfigurationUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static IntelligentTieringConfigurationUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new IntelligentTieringConfigurationUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file diff --git a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/TieringUnmarshaller.cs b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/TieringUnmarshaller.cs similarity index 54% rename from sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/TieringUnmarshaller.cs rename to sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/TieringUnmarshaller.cs index 4c4e5bbf0e21..e4ecaa9591a2 100644 --- a/sdk/src/Services/S3/Custom/Model/Internal/MarshallTransformations/TieringUnmarshaller.cs +++ b/sdk/src/Services/S3/Generated/Model/Internal/MarshallTransformations/TieringUnmarshaller.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"). @@ -13,74 +13,85 @@ * permissions and limitations under the License. */ -using Amazon.Runtime.Internal.Transform; +/* + * 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.Linq; +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 { - /// - /// Tiering Unmarshaller - /// - public class TieringUnmarshaller : IXmlUnmarshaller - { + /// + /// Response Unmarshaller for Tiering Object + /// + public partial class TieringUnmarshaller : IXmlUnmarshaller + { /// /// Unmarshaller the response from the service to the response class. - /// + /// /// /// public Tiering Unmarshall(XmlUnmarshallerContext context) { - Tiering tiering = new Tiering(); + Tiering unmarshalledObject = new Tiering(); 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("Days", targetDepth)) + if (context.TestExpression("AccessTier", targetDepth)) { - tiering.Days = IntUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = StringUnmarshaller.Instance; + unmarshalledObject.AccessTier = unmarshaller.Unmarshall(context); continue; } - if (context.TestExpression("AccessTier", targetDepth)) + if (context.TestExpression("Days", targetDepth)) { - tiering.AccessTier = StringUnmarshaller.GetInstance().Unmarshall(context); - + var unmarshaller = NullableIntUnmarshaller.Instance; + unmarshalledObject.Days = unmarshaller.Unmarshall(context); continue; } + + XmlStructureUnmarshallCustomization(context, unmarshalledObject, targetDepth); } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { - return tiering; + return unmarshalledObject; } - } - - return tiering; + } + return unmarshalledObject; } - private static TieringUnmarshaller _instance; + partial void XmlStructureUnmarshallCustomization(XmlUnmarshallerContext context, Tiering unmarshalledObject, int targetDepth); + + private static TieringUnmarshaller _instance = new TieringUnmarshaller(); /// - /// Singleton for the unmarshaller - /// + /// Gets the singleton. + /// public static TieringUnmarshaller Instance { get { - if (_instance == null) - { - _instance = new TieringUnmarshaller(); - } return _instance; } } } -} +} \ No newline at end of file