diff --git a/.changes/2652a0e3-6588-4542-a35d-eafd5adf8c77.json b/.changes/2652a0e3-6588-4542-a35d-eafd5adf8c77.json new file mode 100644 index 000000000..997f8f6f7 --- /dev/null +++ b/.changes/2652a0e3-6588-4542-a35d-eafd5adf8c77.json @@ -0,0 +1,5 @@ +{ + "id": "2652a0e3-6588-4542-a35d-eafd5adf8c77", + "type": "misc", + "description": "Refactor codegen to place serialization and serialization into the `serde` package rather than the `transform` package. Relocate `TlsVersion` to the `net` package. Make `ByteArrayContent` and friends `internal` and force consumers to go through companion object convenience functions." +} \ No newline at end of file diff --git a/.changes/bd8a575c-ecec-4744-bde6-44f8900d573d.json b/.changes/bd8a575c-ecec-4744-bde6-44f8900d573d.json new file mode 100644 index 000000000..57d6df910 --- /dev/null +++ b/.changes/bd8a575c-ecec-4744-bde6-44f8900d573d.json @@ -0,0 +1,5 @@ +{ + "id": "bd8a575c-ecec-4744-bde6-44f8900d573d", + "type": "misc", + "description": "Refactor codegen to place serialization and serialization into the `serde` package rather than the `transform` package. Relocate `TlsVersion` to the package. Make `ByteArrayContent` and friends `internal` and force consumers to go through companion object convenience functions." +} \ No newline at end of file diff --git a/runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/ConnectionManager.kt b/runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/ConnectionManager.kt index e02d7a559..2da86f823 100644 --- a/runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/ConnectionManager.kt +++ b/runtime/protocol/http-client-engines/http-client-engine-crt/common/src/aws/smithy/kotlin/runtime/http/engine/crt/ConnectionManager.kt @@ -9,13 +9,13 @@ import aws.sdk.kotlin.crt.io.SocketOptions import aws.sdk.kotlin.crt.io.TlsContext import aws.sdk.kotlin.crt.io.TlsContextOptionsBuilder import aws.sdk.kotlin.crt.io.Uri -import aws.smithy.kotlin.runtime.net.TlsVersion import aws.smithy.kotlin.runtime.crt.SdkDefaultIO import aws.smithy.kotlin.runtime.http.HttpErrorCode import aws.smithy.kotlin.runtime.http.HttpException import aws.smithy.kotlin.runtime.http.engine.ProxyConfig import aws.smithy.kotlin.runtime.http.request.HttpRequest import aws.smithy.kotlin.runtime.io.Closeable +import aws.smithy.kotlin.runtime.net.TlsVersion import kotlinx.coroutines.TimeoutCancellationException import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.Semaphore diff --git a/runtime/protocol/http-client-engines/http-client-engine-okhttp/jvm/src/aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngine.kt b/runtime/protocol/http-client-engines/http-client-engine-okhttp/jvm/src/aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngine.kt index 39cce1fc8..ea8c8773d 100644 --- a/runtime/protocol/http-client-engines/http-client-engine-okhttp/jvm/src/aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngine.kt +++ b/runtime/protocol/http-client-engines/http-client-engine-okhttp/jvm/src/aws/smithy/kotlin/runtime/http/engine/okhttp/OkHttpEngine.kt @@ -5,12 +5,12 @@ package aws.smithy.kotlin.runtime.http.engine.okhttp -import aws.smithy.kotlin.runtime.net.TlsVersion import aws.smithy.kotlin.runtime.http.HttpCall import aws.smithy.kotlin.runtime.http.config.EngineFactory import aws.smithy.kotlin.runtime.http.engine.* import aws.smithy.kotlin.runtime.http.engine.internal.HttpClientMetrics import aws.smithy.kotlin.runtime.http.request.HttpRequest +import aws.smithy.kotlin.runtime.net.TlsVersion import aws.smithy.kotlin.runtime.operation.ExecutionContext import aws.smithy.kotlin.runtime.time.Instant import aws.smithy.kotlin.runtime.time.fromEpochMilliseconds diff --git a/runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/engine/TlsContext.kt b/runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/engine/TlsContext.kt index e06592324..2bfcf864b 100644 --- a/runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/engine/TlsContext.kt +++ b/runtime/protocol/http-client/common/src/aws/smithy/kotlin/runtime/http/engine/TlsContext.kt @@ -5,9 +5,9 @@ package aws.smithy.kotlin.runtime.http.engine import aws.smithy.kotlin.runtime.client.config.ClientSettings -import aws.smithy.kotlin.runtime.net.TlsVersion import aws.smithy.kotlin.runtime.config.resolve import aws.smithy.kotlin.runtime.http.config.HttpEngineConfigDsl +import aws.smithy.kotlin.runtime.net.TlsVersion /** * Defines values related to TLS and secure connections. diff --git a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/net/TlsVersion.kt b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/net/TlsVersion.kt index 452c66347..ce7ed9540 100644 --- a/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/net/TlsVersion.kt +++ b/runtime/runtime-core/common/src/aws/smithy/kotlin/runtime/net/TlsVersion.kt @@ -1,3 +1,7 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ package aws.smithy.kotlin.runtime.net /** @@ -23,4 +27,4 @@ public enum class TlsVersion { * TLS version 1.3 */ TLS_1_3, -} \ No newline at end of file +} diff --git a/runtime/smithy-client/common/src/aws/smithy/kotlin/runtime/client/config/ClientSettings.kt b/runtime/smithy-client/common/src/aws/smithy/kotlin/runtime/client/config/ClientSettings.kt index a1f5190d9..5b7e68606 100644 --- a/runtime/smithy-client/common/src/aws/smithy/kotlin/runtime/client/config/ClientSettings.kt +++ b/runtime/smithy-client/common/src/aws/smithy/kotlin/runtime/client/config/ClientSettings.kt @@ -7,9 +7,9 @@ package aws.smithy.kotlin.runtime.client.config import aws.smithy.kotlin.runtime.InternalApi import aws.smithy.kotlin.runtime.client.LogMode import aws.smithy.kotlin.runtime.config.EnvironmentSetting -import aws.smithy.kotlin.runtime.net.TlsVersion import aws.smithy.kotlin.runtime.config.enumEnvSetting import aws.smithy.kotlin.runtime.config.intEnvSetting +import aws.smithy.kotlin.runtime.net.TlsVersion @InternalApi public object ClientSettings {