diff --git a/generator/.DevConfigs/e2fd4917-66af-4f7a-a019-8c8fec7a1899.json b/generator/.DevConfigs/e2fd4917-66af-4f7a-a019-8c8fec7a1899.json new file mode 100644 index 000000000000..b217dec716d6 --- /dev/null +++ b/generator/.DevConfigs/e2fd4917-66af-4f7a-a019-8c8fec7a1899.json @@ -0,0 +1,13 @@ + + +{ + "services": [ + { + "serviceName": "Account", + "type": "patch", + "changeLogMessages": [ + "Rename internal exception property to avoid hiding inherited AmazonServiceException member." + ] + } + ] +} \ No newline at end of file diff --git a/generator/ServiceClientGeneratorLib/Member.cs b/generator/ServiceClientGeneratorLib/Member.cs index 7b673fbb0923..53dc16ce09fb 100644 --- a/generator/ServiceClientGeneratorLib/Member.cs +++ b/generator/ServiceClientGeneratorLib/Member.cs @@ -237,6 +237,10 @@ public string BasePropertyName } } + // Rename ErrorType exception properties to avoid hiding AmazonServiceException.ErrorType inherited member. + if (OwningShape.IsException && _name.ToUpperFirstCharacter() == "ErrorType") + return "RequestErrorType"; + return _name.ToUpperFirstCharacter(); } } diff --git a/generator/ServiceModels/account/account.customizations.json b/generator/ServiceModels/account/account.customizations.json deleted file mode 100644 index 7d7ac70f495c..000000000000 --- a/generator/ServiceModels/account/account.customizations.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "shapeModifiers": { - "*": { - "modify": [ - { - "errorType": { - "emitPropertyName": "RequestErrorType" - } - } - ] - } - } -} \ No newline at end of file diff --git a/sdk/src/Services/Account/Generated/Model/AccessDeniedException.cs b/sdk/src/Services/Account/Generated/Model/AccessDeniedException.cs index c517dea4033a..3a0931bfc3f0 100644 --- a/sdk/src/Services/Account/Generated/Model/AccessDeniedException.cs +++ b/sdk/src/Services/Account/Generated/Model/AccessDeniedException.cs @@ -38,7 +38,7 @@ namespace Amazon.Account.Model #endif public partial class AccessDeniedException : AmazonAccountException { - private string _requestErrorType; + private string _errorType; /// /// Constructs a new AccessDeniedException with the specified error @@ -128,14 +128,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf /// public string RequestErrorType { - get { return this._requestErrorType; } - set { this._requestErrorType = value; } + get { return this._errorType; } + set { this._errorType = value; } } // Check to see if RequestErrorType property is set internal bool IsSetRequestErrorType() { - return this._requestErrorType != null; + return this._errorType != null; } } diff --git a/sdk/src/Services/Account/Generated/Model/ConflictException.cs b/sdk/src/Services/Account/Generated/Model/ConflictException.cs index 311404c4cc4f..d1d4dad78087 100644 --- a/sdk/src/Services/Account/Generated/Model/ConflictException.cs +++ b/sdk/src/Services/Account/Generated/Model/ConflictException.cs @@ -40,7 +40,7 @@ namespace Amazon.Account.Model #endif public partial class ConflictException : AmazonAccountException { - private string _requestErrorType; + private string _errorType; /// /// Constructs a new ConflictException with the specified error @@ -130,14 +130,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf /// public string RequestErrorType { - get { return this._requestErrorType; } - set { this._requestErrorType = value; } + get { return this._errorType; } + set { this._errorType = value; } } // Check to see if RequestErrorType property is set internal bool IsSetRequestErrorType() { - return this._requestErrorType != null; + return this._errorType != null; } } diff --git a/sdk/src/Services/Account/Generated/Model/InternalServerException.cs b/sdk/src/Services/Account/Generated/Model/InternalServerException.cs index 0cf27a962239..7fd98c2431a6 100644 --- a/sdk/src/Services/Account/Generated/Model/InternalServerException.cs +++ b/sdk/src/Services/Account/Generated/Model/InternalServerException.cs @@ -38,7 +38,7 @@ namespace Amazon.Account.Model #endif public partial class InternalServerException : AmazonAccountException { - private string _requestErrorType; + private string _errorType; private RetryableDetails _retryableDetails = new RetryableDetails(false); @@ -130,14 +130,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf /// public string RequestErrorType { - get { return this._requestErrorType; } - set { this._requestErrorType = value; } + get { return this._errorType; } + set { this._errorType = value; } } // Check to see if RequestErrorType property is set internal bool IsSetRequestErrorType() { - return this._requestErrorType != null; + return this._errorType != null; } /// diff --git a/sdk/src/Services/Account/Generated/Model/ResourceNotFoundException.cs b/sdk/src/Services/Account/Generated/Model/ResourceNotFoundException.cs index d9a24839a44f..7cd1bbede25a 100644 --- a/sdk/src/Services/Account/Generated/Model/ResourceNotFoundException.cs +++ b/sdk/src/Services/Account/Generated/Model/ResourceNotFoundException.cs @@ -37,7 +37,7 @@ namespace Amazon.Account.Model #endif public partial class ResourceNotFoundException : AmazonAccountException { - private string _requestErrorType; + private string _errorType; /// /// Constructs a new ResourceNotFoundException with the specified error @@ -127,14 +127,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf /// public string RequestErrorType { - get { return this._requestErrorType; } - set { this._requestErrorType = value; } + get { return this._errorType; } + set { this._errorType = value; } } // Check to see if RequestErrorType property is set internal bool IsSetRequestErrorType() { - return this._requestErrorType != null; + return this._errorType != null; } } diff --git a/sdk/src/Services/Account/Generated/Model/TooManyRequestsException.cs b/sdk/src/Services/Account/Generated/Model/TooManyRequestsException.cs index 53214a2bd981..dc5ddc8028d6 100644 --- a/sdk/src/Services/Account/Generated/Model/TooManyRequestsException.cs +++ b/sdk/src/Services/Account/Generated/Model/TooManyRequestsException.cs @@ -38,7 +38,7 @@ namespace Amazon.Account.Model #endif public partial class TooManyRequestsException : AmazonAccountException { - private string _requestErrorType; + private string _errorType; private RetryableDetails _retryableDetails = new RetryableDetails(true); @@ -130,14 +130,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf /// public string RequestErrorType { - get { return this._requestErrorType; } - set { this._requestErrorType = value; } + get { return this._errorType; } + set { this._errorType = value; } } // Check to see if RequestErrorType property is set internal bool IsSetRequestErrorType() { - return this._requestErrorType != null; + return this._errorType != null; } ///