Skip to content

Commit ca2130c

Browse files
muhammad-othmandscpinheiro
authored andcommitted
Rename ErrorType exception properties to avoid hiding inherited member
1 parent dc51341 commit ca2130c

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
@@ -237,6 +237,10 @@ public string BasePropertyName
237237
}
238238
}
239239

240+
// Rename ErrorType exception properties to avoid hiding AmazonServiceException.ErrorType inherited member.
241+
if (OwningShape.IsException && _name.ToUpperFirstCharacter() == "ErrorType")
242+
return "RequestErrorType";
243+
240244
return _name.ToUpperFirstCharacter();
241245
}
242246
}

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
@@ -128,14 +128,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
128128
/// </summary>
129129
public string RequestErrorType
130130
{
131-
get { return this._requestErrorType; }
132-
set { this._requestErrorType = value; }
131+
get { return this._errorType; }
132+
set { this._errorType = value; }
133133
}
134134

135135
// Check to see if RequestErrorType property is set
136136
internal bool IsSetRequestErrorType()
137137
{
138-
return this._requestErrorType != null;
138+
return this._errorType != null;
139139
}
140140

141141
}

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
@@ -130,14 +130,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
130130
/// </summary>
131131
public string RequestErrorType
132132
{
133-
get { return this._requestErrorType; }
134-
set { this._requestErrorType = value; }
133+
get { return this._errorType; }
134+
set { this._errorType = value; }
135135
}
136136

137137
// Check to see if RequestErrorType property is set
138138
internal bool IsSetRequestErrorType()
139139
{
140-
return this._requestErrorType != null;
140+
return this._errorType != null;
141141
}
142142

143143
}

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

@@ -130,14 +130,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
130130
/// </summary>
131131
public string RequestErrorType
132132
{
133-
get { return this._requestErrorType; }
134-
set { this._requestErrorType = value; }
133+
get { return this._errorType; }
134+
set { this._errorType = value; }
135135
}
136136

137137
// Check to see if RequestErrorType property is set
138138
internal bool IsSetRequestErrorType()
139139
{
140-
return this._requestErrorType != null;
140+
return this._errorType != null;
141141
}
142142

143143
/// <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
@@ -127,14 +127,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
127127
/// </summary>
128128
public string RequestErrorType
129129
{
130-
get { return this._requestErrorType; }
131-
set { this._requestErrorType = value; }
130+
get { return this._errorType; }
131+
set { this._errorType = value; }
132132
}
133133

134134
// Check to see if RequestErrorType property is set
135135
internal bool IsSetRequestErrorType()
136136
{
137-
return this._requestErrorType != null;
137+
return this._errorType != null;
138138
}
139139

140140
}

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

@@ -130,14 +130,14 @@ public override void GetObjectData(System.Runtime.Serialization.SerializationInf
130130
/// </summary>
131131
public string RequestErrorType
132132
{
133-
get { return this._requestErrorType; }
134-
set { this._requestErrorType = value; }
133+
get { return this._errorType; }
134+
set { this._errorType = value; }
135135
}
136136

137137
// Check to see if RequestErrorType property is set
138138
internal bool IsSetRequestErrorType()
139139
{
140-
return this._requestErrorType != null;
140+
return this._errorType != null;
141141
}
142142

143143
/// <summary>

0 commit comments

Comments
 (0)