Skip to content

Commit 5aab0cd

Browse files
committed
Remove AmazonWebServiceResponse as base class for transfer utility repsonse objects.
stack-info: PR: #4087, branch: GarrettBeatty/stacked/12
1 parent a62545e commit 5aab0cd

File tree

5 files changed

+18
-28
lines changed

5 files changed

+18
-28
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"services": [
3+
{
4+
"serviceName": "S3",
5+
"type": "patch",
6+
"changeLogMessages": [
7+
"Remove AmazonWebServiceResponse as base class for transfer utility repsonse objects."
8+
]
9+
}
10+
]
11+
}

sdk/src/Services/S3/Custom/Transfer/Internal/ResponseMapper.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,6 @@ internal static TransferUtilityUploadResponse MapPutObjectResponse(PutObjectResp
6161
response.ServerSideEncryptionKeyManagementServiceKeyId = source.ServerSideEncryptionKeyManagementServiceKeyId;
6262
response.ServerSideEncryptionMethod = source.ServerSideEncryptionMethod;
6363
response.VersionId = source.VersionId;
64-
65-
// Copy response metadata
66-
response.ResponseMetadata = source.ResponseMetadata;
67-
response.ContentLength = source.ContentLength;
68-
response.HttpStatusCode = source.HttpStatusCode;
69-
7064
return response;
7165
}
7266

@@ -97,12 +91,6 @@ internal static TransferUtilityUploadResponse MapCompleteMultipartUploadResponse
9791
response.ServerSideEncryptionMethod = source.ServerSideEncryptionMethod;
9892
response.ServerSideEncryptionKeyManagementServiceKeyId = source.ServerSideEncryptionKeyManagementServiceKeyId;
9993
response.VersionId = source.VersionId;
100-
101-
// Copy response metadata
102-
response.ResponseMetadata = source.ResponseMetadata;
103-
response.ContentLength = source.ContentLength;
104-
response.HttpStatusCode = source.HttpStatusCode;
105-
10694
return response;
10795
}
10896

@@ -153,12 +141,6 @@ internal static TransferUtilityDownloadResponse MapGetObjectResponse(GetObjectRe
153141
response.TagCount = source.TagCount;
154142
response.VersionId = source.VersionId;
155143
response.WebsiteRedirectLocation = source.WebsiteRedirectLocation;
156-
157-
// Copy response metadata
158-
response.ResponseMetadata = source.ResponseMetadata;
159-
response.ContentLength = source.ContentLength;
160-
response.HttpStatusCode = source.HttpStatusCode;
161-
162144
return response;
163145
}
164146

sdk/src/Services/S3/Custom/Transfer/TransferUtilityDownloadResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace Amazon.S3.Transfer
3131
/// Response object for Transfer Utility download operations.
3232
/// Contains response metadata from download operations.
3333
/// </summary>
34-
public class TransferUtilityDownloadResponse : AmazonWebServiceResponse
34+
public class TransferUtilityDownloadResponse
3535
{
3636
/// <summary>
3737
/// Gets and sets the AcceptRanges property.

sdk/src/Services/S3/Custom/Transfer/TransferUtilityUploadResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ namespace Amazon.S3.Transfer
3232
/// Contains unified response fields from both simple uploads (PutObjectResponse)
3333
/// and multipart uploads (CompleteMultipartUploadResponse).
3434
/// </summary>
35-
public class TransferUtilityUploadResponse : AmazonWebServiceResponse
35+
public class TransferUtilityUploadResponse
3636
{
3737
private bool? _bucketKeyEnabled;
3838
private string _checksumCRC32;

sdk/test/Services/S3/UnitTests/Custom/ResponseMapperTests.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,7 @@ public void MapPutObjectResponse_AllMappedProperties_WorkCorrectly()
149149
},
150150
(sourceResponse, targetResponse) =>
151151
{
152-
Assert.AreEqual(sourceResponse.HttpStatusCode, targetResponse.HttpStatusCode, "HttpStatusCode should match");
153-
Assert.AreEqual(sourceResponse.ContentLength, targetResponse.ContentLength, "ContentLength should match");
152+
154153
});
155154
}
156155

@@ -524,12 +523,11 @@ public void MapCompleteMultipartUploadResponse_AllMappedProperties_WorkCorrectly
524523
(sourceResponse) =>
525524
{
526525
sourceResponse.HttpStatusCode = HttpStatusCode.OK;
527-
sourceResponse.ContentLength = 2048;
526+
sourceResponse.ContentLength = 1024;
528527
},
529528
(sourceResponse, targetResponse) =>
530529
{
531-
Assert.AreEqual(sourceResponse.HttpStatusCode, targetResponse.HttpStatusCode, "HttpStatusCode should match");
532-
Assert.AreEqual(sourceResponse.ContentLength, targetResponse.ContentLength, "ContentLength should match");
530+
533531
});
534532
}
535533

@@ -600,12 +598,11 @@ public void MapGetObjectResponse_AllMappedProperties_WorkCorrectly()
600598
(sourceResponse) =>
601599
{
602600
sourceResponse.HttpStatusCode = HttpStatusCode.OK;
603-
sourceResponse.ContentLength = 2048;
601+
sourceResponse.ContentLength = 1024;
604602
},
605603
(sourceResponse, targetResponse) =>
606604
{
607-
Assert.AreEqual(sourceResponse.HttpStatusCode, targetResponse.HttpStatusCode, "HttpStatusCode should match");
608-
Assert.AreEqual(sourceResponse.ContentLength, targetResponse.ContentLength, "ContentLength should match");
605+
609606
});
610607
}
611608

0 commit comments

Comments
 (0)