Skip to content

Commit f37afba

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

File tree

5 files changed

+18
-26
lines changed

5 files changed

+18
-26
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 & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,6 @@ internal static TransferUtilityUploadResponse MapPutObjectResponse(PutObjectResp
6363
response.VersionId = source.VersionId;
6464
response.Size = source.Size;
6565

66-
// Copy response metadata
67-
response.ResponseMetadata = source.ResponseMetadata;
68-
response.ContentLength = source.ContentLength;
69-
response.HttpStatusCode = source.HttpStatusCode;
70-
7166
return response;
7267
}
7368

@@ -102,11 +97,6 @@ internal static TransferUtilityUploadResponse MapCompleteMultipartUploadResponse
10297
response.Key = source.Key;
10398
response.Location = source.Location;
10499

105-
// Copy response metadata
106-
response.ResponseMetadata = source.ResponseMetadata;
107-
response.ContentLength = source.ContentLength;
108-
response.HttpStatusCode = source.HttpStatusCode;
109-
110100
return response;
111101
}
112102

@@ -157,12 +147,6 @@ internal static TransferUtilityDownloadResponse MapGetObjectResponse(GetObjectRe
157147
response.TagCount = source.TagCount;
158148
response.VersionId = source.VersionId;
159149
response.WebsiteRedirectLocation = source.WebsiteRedirectLocation;
160-
161-
// Copy response metadata
162-
response.ResponseMetadata = source.ResponseMetadata;
163-
response.ContentLength = source.ContentLength;
164-
response.HttpStatusCode = source.HttpStatusCode;
165-
166150
return response;
167151
}
168152

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 _bucketName;

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)