Skip to content

Commit bb254b6

Browse files
muhammad-othmandscpinheiro
authored andcommitted
Rename ErrorType exception properties to avoid hiding inherited member
1 parent 3c80370 commit bb254b6

File tree

8 files changed

+37
-33
lines changed

8 files changed

+37
-33
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
3+
{
4+
"services": [
5+
{
6+
"serviceName": "Account",
7+
"type": "patch",
8+
"changeLogMessages": [
9+
"Rename internal exception property to avoid hiding inherited AmazonServiceException member."
10+
]
11+
}
12+
]
13+
}

generator/ServiceClientGeneratorLib/Member.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,10 @@ public string BasePropertyName
253253
}
254254
}
255255

256+
// Rename ErrorType exception properties to avoid hiding AmazonServiceException.ErrorType inherited member.
257+
if (OwningShape.IsException && _name.ToUpperFirstCharacter() == "ErrorType")
258+
return "RequestErrorType";
259+
256260
return _name.ToUpperFirstCharacter();
257261
}
258262
}

generator/ServiceModels/account/account.customizations.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

sdk/src/Services/Account/Generated/Model/AccessDeniedException.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Amazon.Account.Model
3838
#endif
3939
public partial class AccessDeniedException : AmazonAccountException
4040
{
41-
private string _requestErrorType;
41+
private string _errorType;
4242

4343
/// <summary>
4444
/// Constructs a new AccessDeniedException with the specified error
@@ -133,14 +133,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
133133
/// </summary>
134134
public string RequestErrorType
135135
{
136-
get { return this._requestErrorType; }
137-
set { this._requestErrorType = value; }
136+
get { return this._errorType; }
137+
set { this._errorType = value; }
138138
}
139139

140140
// Check to see if RequestErrorType property is set
141141
internal bool IsSetRequestErrorType()
142142
{
143-
return !string.IsNullOrEmpty(this._requestErrorType);
143+
return !string.IsNullOrEmpty(this._errorType);
144144
}
145145

146146
}

sdk/src/Services/Account/Generated/Model/ConflictException.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace Amazon.Account.Model
4040
#endif
4141
public partial class ConflictException : AmazonAccountException
4242
{
43-
private string _requestErrorType;
43+
private string _errorType;
4444

4545
/// <summary>
4646
/// Constructs a new ConflictException with the specified error
@@ -135,14 +135,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
135135
/// </summary>
136136
public string RequestErrorType
137137
{
138-
get { return this._requestErrorType; }
139-
set { this._requestErrorType = value; }
138+
get { return this._errorType; }
139+
set { this._errorType = value; }
140140
}
141141

142142
// Check to see if RequestErrorType property is set
143143
internal bool IsSetRequestErrorType()
144144
{
145-
return !string.IsNullOrEmpty(this._requestErrorType);
145+
return !string.IsNullOrEmpty(this._errorType);
146146
}
147147

148148
}

sdk/src/Services/Account/Generated/Model/InternalServerException.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Amazon.Account.Model
3838
#endif
3939
public partial class InternalServerException : AmazonAccountException
4040
{
41-
private string _requestErrorType;
41+
private string _errorType;
4242

4343
private RetryableDetails _retryableDetails = new RetryableDetails(false);
4444

@@ -135,14 +135,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
135135
/// </summary>
136136
public string RequestErrorType
137137
{
138-
get { return this._requestErrorType; }
139-
set { this._requestErrorType = value; }
138+
get { return this._errorType; }
139+
set { this._errorType = value; }
140140
}
141141

142142
// Check to see if RequestErrorType property is set
143143
internal bool IsSetRequestErrorType()
144144
{
145-
return !string.IsNullOrEmpty(this._requestErrorType);
145+
return !string.IsNullOrEmpty(this._errorType);
146146
}
147147

148148
/// <summary>

sdk/src/Services/Account/Generated/Model/ResourceNotFoundException.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ namespace Amazon.Account.Model
3737
#endif
3838
public partial class ResourceNotFoundException : AmazonAccountException
3939
{
40-
private string _requestErrorType;
40+
private string _errorType;
4141

4242
/// <summary>
4343
/// Constructs a new ResourceNotFoundException with the specified error
@@ -132,14 +132,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
132132
/// </summary>
133133
public string RequestErrorType
134134
{
135-
get { return this._requestErrorType; }
136-
set { this._requestErrorType = value; }
135+
get { return this._errorType; }
136+
set { this._errorType = value; }
137137
}
138138

139139
// Check to see if RequestErrorType property is set
140140
internal bool IsSetRequestErrorType()
141141
{
142-
return !string.IsNullOrEmpty(this._requestErrorType);
142+
return !string.IsNullOrEmpty(this._errorType);
143143
}
144144

145145
}

sdk/src/Services/Account/Generated/Model/TooManyRequestsException.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Amazon.Account.Model
3838
#endif
3939
public partial class TooManyRequestsException : AmazonAccountException
4040
{
41-
private string _requestErrorType;
41+
private string _errorType;
4242

4343
private RetryableDetails _retryableDetails = new RetryableDetails(true);
4444

@@ -135,14 +135,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
135135
/// </summary>
136136
public string RequestErrorType
137137
{
138-
get { return this._requestErrorType; }
139-
set { this._requestErrorType = value; }
138+
get { return this._errorType; }
139+
set { this._errorType = value; }
140140
}
141141

142142
// Check to see if RequestErrorType property is set
143143
internal bool IsSetRequestErrorType()
144144
{
145-
return !string.IsNullOrEmpty(this._requestErrorType);
145+
return !string.IsNullOrEmpty(this._errorType);
146146
}
147147

148148
/// <summary>

0 commit comments

Comments
 (0)