diff --git a/.changes/b0f89880-988f-46c1-87dc-f1741587860d.json b/.changes/b0f89880-988f-46c1-87dc-f1741587860d.json new file mode 100644 index 00000000000..60c50f5a1ad --- /dev/null +++ b/.changes/b0f89880-988f-46c1-87dc-f1741587860d.json @@ -0,0 +1,5 @@ +{ + "id": "b0f89880-988f-46c1-87dc-f1741587860d", + "type": "misc", + "description": "Track upstream changes that make `ByteArrayContent` and friends internal. Users should only be using `ByteStream.fromBytes()`, `ByteStream.fromString()`, and `HttpBody.fromBytes()`." +} \ No newline at end of file diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/EcsCredentialsProviderTest.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/EcsCredentialsProviderTest.kt index eb2e336a963..1b68a3ae0fe 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/EcsCredentialsProviderTest.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/EcsCredentialsProviderTest.kt @@ -9,9 +9,9 @@ import aws.sdk.kotlin.runtime.config.AwsSdkSetting import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException import aws.smithy.kotlin.runtime.http.Headers +import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpMethod import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.request.HttpRequest import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder import aws.smithy.kotlin.runtime.http.request.header @@ -54,7 +54,7 @@ class EcsCredentialsProviderTest { "Expiration" : "${expectedExpiration.format(TimestampFormat.ISO_8601)}" } """.encodeToByteArray() - return HttpResponse(HttpStatusCode.OK, Headers.Empty, ByteArrayContent(payload)) + return HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.fromBytes(payload)) } private fun errorResponse( @@ -62,7 +62,7 @@ class EcsCredentialsProviderTest { headers: Headers = Headers.Empty, body: String = "", ): HttpResponse = - HttpResponse(statusCode, headers, ByteArrayContent(body.encodeToByteArray())) + HttpResponse(statusCode, headers, HttpBody.fromBytes(body.encodeToByteArray())) private fun ecsRequest(url: String, authToken: String? = null): HttpRequest { val resolvedUrl = Url.parse(url) diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/ImdsCredentialsProviderTest.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/ImdsCredentialsProviderTest.kt index c701eaa2a5c..b3eebe13d62 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/ImdsCredentialsProviderTest.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/ImdsCredentialsProviderTest.kt @@ -14,7 +14,6 @@ import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpCall import aws.smithy.kotlin.runtime.http.HttpMethod import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.engine.HttpClientEngineBase import aws.smithy.kotlin.runtime.http.engine.HttpClientEngineConfig import aws.smithy.kotlin.runtime.http.request.HttpRequest @@ -241,7 +240,7 @@ class ImdsCredentialsProviderTest { HttpResponse( HttpStatusCode.NotFound, Headers.Empty, - ByteArrayContent( + HttpBody.fromBytes( """ diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/SsoCredentialsProviderTest.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/SsoCredentialsProviderTest.kt index 142ee0a9a0e..78e6503f4ab 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/SsoCredentialsProviderTest.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/SsoCredentialsProviderTest.kt @@ -9,7 +9,6 @@ import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.response.HttpResponse import aws.smithy.kotlin.runtime.httptest.TestConnection import aws.smithy.kotlin.runtime.httptest.buildTestConnection @@ -169,7 +168,7 @@ class SsoCredentialsProviderTest { val engine = buildTestConnection { expect( - HttpResponse(HttpStatusCode.OK, Headers.Empty, ByteArrayContent(serviceResp.encodeToByteArray())), + HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.fromBytes(serviceResp.encodeToByteArray())), ) } diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsAssumeRoleCredentialsProviderTest.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsAssumeRoleCredentialsProviderTest.kt index 0a04754752c..c7b5d13815d 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsAssumeRoleCredentialsProviderTest.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsAssumeRoleCredentialsProviderTest.kt @@ -8,8 +8,8 @@ package aws.sdk.kotlin.runtime.auth.credentials import aws.sdk.kotlin.runtime.auth.credentials.internal.sts.model.RegionDisabledException import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException import aws.smithy.kotlin.runtime.http.Headers +import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.response.HttpResponse import aws.smithy.kotlin.runtime.httptest.CallAsserter import aws.smithy.kotlin.runtime.httptest.buildTestConnection @@ -105,7 +105,7 @@ class StsAssumeRoleCredentialsProviderTest { """ val testEngine = buildTestConnection { - expect(HttpResponse(HttpStatusCode.BadRequest, Headers.Empty, ByteArrayContent(errorResponseBody.encodeToByteArray()))) + expect(HttpResponse(HttpStatusCode.BadRequest, Headers.Empty, HttpBody.fromBytes(errorResponseBody.encodeToByteArray()))) } val provider = StsAssumeRoleCredentialsProvider( @@ -132,7 +132,7 @@ class StsAssumeRoleCredentialsProviderTest { """ val testEngine = buildTestConnection { - expect(HttpResponse(HttpStatusCode.Forbidden, Headers.Empty, ByteArrayContent(errorResponseBody.encodeToByteArray()))) + expect(HttpResponse(HttpStatusCode.Forbidden, Headers.Empty, HttpBody.fromBytes(errorResponseBody.encodeToByteArray()))) } val provider = StsAssumeRoleCredentialsProvider( diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsTestUtils.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsTestUtils.kt index 885fabc5cef..b162306469a 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsTestUtils.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsTestUtils.kt @@ -10,7 +10,6 @@ import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpMethod import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.request.HttpRequestBuilder import aws.smithy.kotlin.runtime.http.request.url import aws.smithy.kotlin.runtime.http.response.HttpResponse @@ -76,6 +75,6 @@ object StsTestUtils { """.trimIndent() - return HttpResponse(HttpStatusCode.OK, Headers.Empty, ByteArrayContent(body.encodeToByteArray())) + return HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.fromBytes(body.encodeToByteArray())) } } diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsWebIdentityCredentialsProviderTest.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsWebIdentityCredentialsProviderTest.kt index 06a1ff12668..0c6bc2b0728 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsWebIdentityCredentialsProviderTest.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/StsWebIdentityCredentialsProviderTest.kt @@ -8,8 +8,8 @@ package aws.sdk.kotlin.runtime.auth.credentials import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProviderException import aws.smithy.kotlin.runtime.http.Headers +import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.response.HttpResponse import aws.smithy.kotlin.runtime.httptest.CallAsserter import aws.smithy.kotlin.runtime.httptest.TestConnection @@ -67,7 +67,7 @@ class StsWebIdentityCredentialsProviderTest { """.trimIndent() - return HttpResponse(HttpStatusCode.OK, Headers.Empty, ByteArrayContent(body.encodeToByteArray())) + return HttpResponse(HttpStatusCode.OK, Headers.Empty, HttpBody.fromBytes(body.encodeToByteArray())) } @Test @@ -160,7 +160,7 @@ class StsWebIdentityCredentialsProviderTest { """ val testEngine = buildTestConnection { - expect(HttpResponse(HttpStatusCode.BadRequest, Headers.Empty, ByteArrayContent(errorResponseBody.encodeToByteArray()))) + expect(HttpResponse(HttpStatusCode.BadRequest, Headers.Empty, HttpBody.fromBytes(errorResponseBody.encodeToByteArray()))) } val testPlatform = TestPlatformProvider( diff --git a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/config/imds/ImdsTestUtils.kt b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/config/imds/ImdsTestUtils.kt index 5859ce0079b..af7263fc960 100644 --- a/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/config/imds/ImdsTestUtils.kt +++ b/aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/config/imds/ImdsTestUtils.kt @@ -6,9 +6,9 @@ package aws.sdk.kotlin.runtime.config.imds import aws.smithy.kotlin.runtime.http.Headers +import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpMethod import aws.smithy.kotlin.runtime.http.HttpStatusCode -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent import aws.smithy.kotlin.runtime.http.request.HttpRequest import aws.smithy.kotlin.runtime.http.request.url import aws.smithy.kotlin.runtime.http.response.HttpResponse @@ -27,7 +27,7 @@ fun tokenResponse(ttl: Int, token: String): HttpResponse = HttpResponse( Headers { append(X_AWS_EC2_METADATA_TOKEN_TTL_SECONDS, ttl.toString()) }, - ByteArrayContent(token.encodeToByteArray()), + HttpBody.fromBytes(token.encodeToByteArray()), ) fun imdsRequest(url: String, token: String): HttpRequest = HttpRequest { @@ -39,5 +39,5 @@ fun imdsRequest(url: String, token: String): HttpRequest = HttpRequest { fun imdsResponse(body: String): HttpResponse = HttpResponse( HttpStatusCode.OK, Headers.Empty, - ByteArrayContent(body.encodeToByteArray()), + HttpBody.fromBytes(body.encodeToByteArray()), ) diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/PresignerGenerator.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/PresignerGenerator.kt index 8ef74d596ad..616c13c8083 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/PresignerGenerator.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/PresignerGenerator.kt @@ -121,7 +121,7 @@ class PresignerGenerator : KotlinIntegration { val serializerSymbol = buildSymbol { definitionFile = "${op.serializerName()}.kt" name = op.serializerName() - namespace = "${ctx.settings.pkg.name}.transform" + namespace = ctx.settings.pkg.serde } val contextMap: Map, Any> = mapOf( diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3Generator.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3Generator.kt index 93eab271519..e14d0bc78f8 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3Generator.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/customization/s3/S3Generator.kt @@ -92,7 +92,7 @@ class S3Generator : RestXml() { val errSymbol = ctx.symbolProvider.toSymbol(ctx.model.expectShape(err)) val errDeserializerSymbol = buildSymbol { name = "${errSymbol.name}Deserializer" - namespace = "${ctx.settings.pkg.name}.transform" + namespace = ctx.settings.pkg.serde } writer.write("#S -> #T().deserialize(context, wrappedCall)", getErrorCode(ctx, err), errDeserializerSymbol) } diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestJson1.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestJson1.kt index 07c94a942fe..b00d159678b 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestJson1.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestJson1.kt @@ -55,8 +55,7 @@ class RestJson1 : JsonHttpBindingProtocolGenerator() { val target = ctx.model.expectShape(httpPayload.member.target) writer.withBlock("if (input.#L == null) {", "}", memberName) { if (target is StructureShape) { - addImport(RuntimeTypes.Http.ByteArrayContent) - write("builder.body = #T(#S.encodeToByteArray())", RuntimeTypes.Http.ByteArrayContent, "{}") + write("builder.body = #T.fromBytes(#S.encodeToByteArray())", RuntimeTypes.Http.HttpBody, "{}") } // Content-Type still needs to be set for non-structured payloads // https://github.com/awslabs/smithy/blob/main/smithy-aws-protocol-tests/model/restJson1/http-content-type.smithy#L174 diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestXml.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestXml.kt index fcdba3e3a7f..c24d2499cf1 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestXml.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/RestXml.kt @@ -89,7 +89,7 @@ class RestXmlParserGenerator( return buildSymbol { val xmlName = xmlNameTrait.value.replaceFirstChar(Char::uppercase) name = "deserialize${memberSymbol.name}PayloadWithXmlName$xmlName" - namespace = ctx.settings.pkg.subpackage("transform") + namespace = ctx.settings.pkg.serde definitionFile = "${memberSymbol.name}PayloadDeserializer.kt" renderBy = { writer -> addNestedDocumentDeserializers(ctx, targetShape, writer) @@ -145,7 +145,7 @@ class RestXmlSerializerGenerator( return buildSymbol { val xmlName = xmlNameTrait.value.replaceFirstChar(Char::uppercase) name = "serialize${memberSymbol.name}PayloadWithXmlName$xmlName" - namespace = ctx.settings.pkg.subpackage("transform") + namespace = ctx.settings.pkg.serde // TODO - it would be nice to just inline this into the operation file as a private function instead // since that is the only place it should be accessed definitionFile = "${memberSymbol.name}PayloadSerializer.kt" diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt index 7d746e0c099..c05245c0624 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGenerator.kt @@ -172,7 +172,7 @@ abstract class AwsHttpBindingProtocolGenerator : HttpBindingProtocolGenerator() val errSymbol = ctx.symbolProvider.toSymbol(ctx.model.expectShape(err)) val errDeserializerSymbol = buildSymbol { name = "${errSymbol.name}Deserializer" - namespace = "${ctx.settings.pkg.name}.transform" + namespace = ctx.settings.pkg.serde } writer.write("#S -> #T().deserialize(context, wrappedCall)", getErrorCode(ctx, err), errDeserializerSymbol) } diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt index 075fe1347d2..7afec237622 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/core/QueryHttpBindingProtocolGenerator.kt @@ -56,7 +56,7 @@ abstract class QueryHttpBindingProtocolGenerator : AwsHttpBindingProtocolGenerat val service = ctx.model.expectShape(ctx.settings.service) val version = service.version writer.write("""val content = "Action=$action&Version=$version"""") - writer.write("builder.body = #T(content.encodeToByteArray())", RuntimeTypes.Http.ByteArrayContent) + writer.write("builder.body = #T.fromBytes(content.encodeToByteArray())", RuntimeTypes.Http.HttpBody) } else { super.renderSerializeHttpBody(ctx, op, writer) } diff --git a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt index 971ea9a59da..8bc7d569fc5 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/main/kotlin/aws/sdk/kotlin/codegen/protocols/eventstream/EventStreamSerializerGenerator.kt @@ -122,7 +122,7 @@ class EventStreamSerializerGenerator( val streamSymbol = ctx.symbolProvider.toSymbol(streamShape) val fnName = "encode${op.capitalizedDefaultName()}${streamSymbol.name}EventMessage" name = fnName - namespace = ctx.settings.pkg.subpackage("transform") + namespace = ctx.settings.pkg.serde // place it in same file as the operation serializer definitionFile = "${op.serializerName()}.kt" diff --git a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt b/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt index 6610a0babff..3f4d36644ca 100644 --- a/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt +++ b/codegen/smithy-aws-kotlin-codegen/src/test/kotlin/aws/sdk/kotlin/codegen/protocols/core/AwsHttpBindingProtocolGeneratorTest.kt @@ -56,13 +56,13 @@ class AwsHttpBindingProtocolGeneratorTest { val fn = unit.operationErrorHandler(testCtx.generationCtx, op) // use the symbol to ensure it's generated via GeneratedDependency - testCtx.generationCtx.delegator.useFileWriter("GetFooOperationDeserializer.kt", "com.test.transform") { + testCtx.generationCtx.delegator.useFileWriter("GetFooOperationDeserializer.kt", "com.test.serde") { it.write("#T(context, response)", fn) } testCtx.generationCtx.delegator.finalize() testCtx.generationCtx.delegator.flushWriters() - val actual = testCtx.manifest.expectFileString("src/main/kotlin/com/test/transform/GetFooOperationDeserializer.kt") + val actual = testCtx.manifest.expectFileString("src/main/kotlin/com/test/serde/GetFooOperationDeserializer.kt") val expected = """ throw ${serviceSdkName}Exception("Failed to parse response as 'restJson1' error", ex).also { """.trimIndent() diff --git a/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt b/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt index d127ab23451..d7e86372afe 100644 --- a/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt +++ b/services/glacier/common/test/aws/sdk/kotlin/services/glacier/internal/TreeHasherTest.kt @@ -8,7 +8,7 @@ package aws.sdk.kotlin.services.glacier.internal import aws.smithy.kotlin.runtime.content.ByteStream import aws.smithy.kotlin.runtime.hashing.HashFunction import aws.smithy.kotlin.runtime.hashing.Sha256 -import aws.smithy.kotlin.runtime.http.content.ByteArrayContent +import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.toHttpBody import aws.smithy.kotlin.runtime.io.SdkBuffer import aws.smithy.kotlin.runtime.io.SdkByteChannel @@ -37,7 +37,7 @@ class TreeHasherTest { val chunkSize = 3 val hasher = TreeHasherImpl(chunkSize) { RollingSumHashFunction(chunkSize) } - val body = ByteArrayContent(payload) + val body = HttpBody.fromBytes(payload) val hashes = hasher.calculateHashes(body) assertContentEquals(fullHash, hashes.fullHash) diff --git a/services/route53/common/test/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshallingTest.kt b/services/route53/common/test/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshallingTest.kt index 3f83fff14a5..f2f8c38567b 100644 --- a/services/route53/common/test/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshallingTest.kt +++ b/services/route53/common/test/aws/sdk/kotlin/services/route53/internal/ChangeResourceRecordSetsUnmarshallingTest.kt @@ -6,7 +6,7 @@ package aws.sdk.kotlin.services.route53.internal import aws.sdk.kotlin.services.route53.model.InvalidChangeBatch import aws.sdk.kotlin.services.route53.model.Route53Exception -import aws.sdk.kotlin.services.route53.transform.ChangeResourceRecordSetsOperationDeserializer +import aws.sdk.kotlin.services.route53.serde.ChangeResourceRecordSetsOperationDeserializer import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpCall diff --git a/services/s3/common/test/aws/sdk/kotlin/services/s3/internal/GetBucketLocationOperationDeserializerTest.kt b/services/s3/common/test/aws/sdk/kotlin/services/s3/internal/GetBucketLocationOperationDeserializerTest.kt index a72d9882ca8..f7f44ed4f32 100644 --- a/services/s3/common/test/aws/sdk/kotlin/services/s3/internal/GetBucketLocationOperationDeserializerTest.kt +++ b/services/s3/common/test/aws/sdk/kotlin/services/s3/internal/GetBucketLocationOperationDeserializerTest.kt @@ -7,7 +7,7 @@ package aws.sdk.kotlin.services.s3.internal import aws.sdk.kotlin.services.s3.model.BucketLocationConstraint import aws.sdk.kotlin.services.s3.model.S3Exception -import aws.sdk.kotlin.services.s3.transform.GetBucketLocationOperationDeserializer +import aws.sdk.kotlin.services.s3.serde.GetBucketLocationOperationDeserializer import aws.smithy.kotlin.runtime.http.Headers import aws.smithy.kotlin.runtime.http.HttpBody import aws.smithy.kotlin.runtime.http.HttpCall diff --git a/tests/codegen/event-stream/src/test/kotlin/HttpEventStreamTests.kt b/tests/codegen/event-stream/src/test/kotlin/HttpEventStreamTests.kt index 251fdb26434..d513db35762 100644 --- a/tests/codegen/event-stream/src/test/kotlin/HttpEventStreamTests.kt +++ b/tests/codegen/event-stream/src/test/kotlin/HttpEventStreamTests.kt @@ -5,8 +5,8 @@ import aws.sdk.kotlin.runtime.auth.credentials.StaticCredentialsProvider import aws.sdk.kotlin.test.eventstream.restjson1.model.* -import aws.sdk.kotlin.test.eventstream.restjson1.transform.deserializeTestStreamOpOperationBody -import aws.sdk.kotlin.test.eventstream.restjson1.transform.serializeTestStreamOpOperationBody +import aws.sdk.kotlin.test.eventstream.restjson1.serde.deserializeTestStreamOpOperationBody +import aws.sdk.kotlin.test.eventstream.restjson1.serde.serializeTestStreamOpOperationBody import aws.smithy.kotlin.runtime.InternalApi import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigningAttributes diff --git a/tests/codegen/event-stream/src/test/kotlin/RpcEventStreamTests.kt b/tests/codegen/event-stream/src/test/kotlin/RpcEventStreamTests.kt index 11a33511b9c..604d10927c2 100644 --- a/tests/codegen/event-stream/src/test/kotlin/RpcEventStreamTests.kt +++ b/tests/codegen/event-stream/src/test/kotlin/RpcEventStreamTests.kt @@ -7,8 +7,8 @@ import aws.sdk.kotlin.test.eventstream.awsjson11.model.MessageWithString import aws.sdk.kotlin.test.eventstream.awsjson11.model.TestStream import aws.sdk.kotlin.test.eventstream.awsjson11.model.TestStreamOperationWithInitialRequestResponseRequest import aws.sdk.kotlin.test.eventstream.awsjson11.model.TestStreamOperationWithInitialRequestResponseResponse -import aws.sdk.kotlin.test.eventstream.awsjson11.transform.deserializeTestStreamOperationWithInitialRequestResponseOperationBody -import aws.sdk.kotlin.test.eventstream.awsjson11.transform.serializeTestStreamOperationWithInitialRequestResponseOperationBody +import aws.sdk.kotlin.test.eventstream.awsjson11.serde.deserializeTestStreamOperationWithInitialRequestResponseOperationBody +import aws.sdk.kotlin.test.eventstream.awsjson11.serde.serializeTestStreamOperationWithInitialRequestResponseOperationBody import aws.smithy.kotlin.runtime.InternalApi import aws.smithy.kotlin.runtime.auth.awscredentials.Credentials import aws.smithy.kotlin.runtime.auth.awssigning.AwsSigningAttributes