diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt index bcd99053a3..7fd4d56a83 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsEndpointDecorator.kt @@ -34,9 +34,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ServiceConfig import software.amazon.smithy.rust.codegen.client.smithy.generators.operationBuildError -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.orNull import kotlin.io.path.readText class AwsEndpointDecorator : RustCodegenDecorator { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt index 746443223b..8fca907308 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsFluentClientDecorator.kt @@ -33,7 +33,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.client.Fluen import software.amazon.smithy.rust.codegen.client.smithy.generators.client.FluentClientGenerator import software.amazon.smithy.rust.codegen.client.smithy.generators.client.FluentClientGenerics import software.amazon.smithy.rust.codegen.client.smithy.generators.client.FluentClientSection -import software.amazon.smithy.rust.codegen.client.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.expectTrait import software.amazon.smithy.rustsdk.AwsRuntimeType.defaultMiddleware private class Types(runtimeConfig: RuntimeConfig) { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt index 5fc2483208..e077de8bd6 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecorator.kt @@ -39,8 +39,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.error.errorS import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.MakeOperationGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpBoundProtocolPayloadGenerator import software.amazon.smithy.rust.codegen.client.util.cloneOperation -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait import software.amazon.smithy.rustsdk.AwsRuntimeType.defaultMiddleware import software.amazon.smithy.rustsdk.traits.PresignableTrait import kotlin.streams.toList diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt index 872cec7c11..fe1f1db4e5 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/AwsReadmeDecorator.kt @@ -15,7 +15,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.RustCrate import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.client.smithy.generators.ManifestCustomizations -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait import java.util.logging.Logger // Use a sigil that should always be unique in the text to fix line breaks and spaces diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt index 88791adbfc..ba21e3bec3 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpRequestChecksumDecorator.kt @@ -21,10 +21,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCust import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.client.smithy.generators.operationBuildError -import software.amazon.smithy.rust.codegen.client.util.expectMember -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.expectMember +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.orNull fun RuntimeConfig.awsInlineableBodyWithChecksum() = RuntimeType.forInlineDependency( InlineAwsDependency.forRustFile( diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt index 9d85714501..ecc83f0429 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/HttpResponseChecksumDecorator.kt @@ -15,10 +15,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator -import software.amazon.smithy.rust.codegen.client.util.expectMember -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.expectMember +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.orNull private fun HttpChecksumTrait.requestValidationModeMember( codegenContext: ClientCodegenContext, diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt index 5cb8ccebc5..bf62ecb863 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SdkSettings.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rustsdk import software.amazon.smithy.model.node.ObjectNode import software.amazon.smithy.rust.codegen.client.smithy.CoreRustSettings -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.orNull import java.nio.file.Path import java.nio.file.Paths diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt index 0ce13c8d5b..9f61d1f068 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/SigV4SigningDecorator.kt @@ -27,12 +27,12 @@ import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSect import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.config.EventStreamSigningConfig -import software.amazon.smithy.rust.codegen.client.smithy.letIf -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasEventStreamOperations -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.isInputEventStream +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasEventStreamOperations +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.isInputEventStream +import software.amazon.smithy.rust.codegen.core.util.letIf /** * The SigV4SigningDecorator: diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt index 31fa610a94..c3a1d5feed 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/UserAgentDecorator.kt @@ -23,8 +23,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsCustomi import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ServiceConfig -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait /** * Inserts a UserAgent configuration into the operation diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt index d2971c0ff8..449b74b4a0 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/apigateway/ApiGatewayDecorator.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator -import software.amazon.smithy.rust.codegen.client.smithy.letIf +import software.amazon.smithy.rust.codegen.core.util.letIf class ApiGatewayDecorator : RustCodegenDecorator { override val name: String = "ApiGateway" diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapes.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapes.kt index bd830d463e..77805ee91f 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapes.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapes.kt @@ -20,7 +20,7 @@ import software.amazon.smithy.model.shapes.Shape import software.amazon.smithy.model.shapes.ShortShape import software.amazon.smithy.model.traits.BoxTrait import software.amazon.smithy.model.transform.ModelTransformer -import software.amazon.smithy.rust.codegen.client.util.UNREACHABLE +import software.amazon.smithy.rust.codegen.core.util.UNREACHABLE import software.amazon.smithy.utils.ToSmithyBuilder object BoxPrimitiveShapes { diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt index fb8e67faf9..b1b5f91bb5 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/ec2/Ec2Decorator.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator -import software.amazon.smithy.rust.codegen.client.smithy.letIf +import software.amazon.smithy.rust.codegen.core.util.letIf class Ec2Decorator : RustCodegenDecorator { override val name: String = "Ec2" diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/AccountIdAutofill.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/AccountIdAutofill.kt index 023aea603d..af0460cadd 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/AccountIdAutofill.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/AccountIdAutofill.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rust import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.inputShape class AccountIdAutofill() : OperationCustomization() { override fun mutSelf(): Boolean = true diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/ApiVersionHeader.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/ApiVersionHeader.kt index a3ff2e76ae..9d29cd826c 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/ApiVersionHeader.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/glacier/ApiVersionHeader.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq class ApiVersionHeader( /** diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt index 4e6c988a4d..4db45856d6 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/route53/Route53Decorator.kt @@ -21,9 +21,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator -import software.amazon.smithy.rust.codegen.client.smithy.letIf -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.letIf import software.amazon.smithy.rustsdk.InlineAwsDependency import java.util.logging.Logger diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt index 39bd902d1c..d64672d96d 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/s3/S3Decorator.kt @@ -27,11 +27,11 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsSection -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.protocols.AllowInvalidXmlRoot import software.amazon.smithy.rust.codegen.client.smithy.protocols.ProtocolMap import software.amazon.smithy.rust.codegen.client.smithy.protocols.RestXml import software.amazon.smithy.rust.codegen.client.smithy.protocols.RestXmlFactory +import software.amazon.smithy.rust.codegen.core.util.letIf import software.amazon.smithy.rustsdk.AwsRuntimeType import java.util.logging.Logger diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/sts/STSDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/sts/STSDecorator.kt index 6dc1ccb36d..d3ef7f8f70 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/sts/STSDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/customize/sts/STSDecorator.kt @@ -15,8 +15,8 @@ import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.client.smithy.ClientCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDecorator -import software.amazon.smithy.rust.codegen.client.smithy.letIf -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.letIf import java.util.logging.Logger class STSDecorator : RustCodegenDecorator { diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecoratorTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecoratorTest.kt index ce9747258d..7a1460bc1e 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecoratorTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/AwsPresigningDecoratorTest.kt @@ -15,8 +15,8 @@ import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.HttpTrait import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.orNull import software.amazon.smithy.rustsdk.traits.PresignableTrait class AwsPresigningDecoratorTest { diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt index 47301e19d6..3489bc7c94 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/EndpointConfigCustomizationTest.kt @@ -24,7 +24,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext import software.amazon.smithy.rust.codegen.client.testutil.stubConfigCustomization import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand internal class EndpointConfigCustomizationTest { private val placeholderEndpointParams = AwsTestRuntimeConfig.awsEndpoint().asType().member("Params") diff --git a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapesTest.kt b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapesTest.kt index b9674c2b93..1677ea28d0 100644 --- a/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapesTest.kt +++ b/aws/sdk-codegen/src/test/kotlin/software/amazon/smithy/rustsdk/customize/ec2/BoxPrimitiveShapesTest.kt @@ -10,8 +10,8 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.traits.BoxTrait import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.lookup internal class BoxPrimitiveShapesTest { @Test diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/CargoDependency.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/CargoDependency.kt index 192393792d..18aa5a3194 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/CargoDependency.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/CargoDependency.kt @@ -9,7 +9,7 @@ import software.amazon.smithy.codegen.core.SymbolDependency import software.amazon.smithy.codegen.core.SymbolDependencyContainer import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq import java.nio.file.Path sealed class DependencyScope { diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWords.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWords.kt index 9789fa1bf4..becc7c0c1e 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWords.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWords.kt @@ -18,10 +18,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.MaybeRenamed import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.WrappingSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.generators.UnionGenerator -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.renamedFrom -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.letIf +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.toPascalCase class RustReservedWordSymbolProvider(private val base: RustSymbolProvider, private val model: Model) : WrappingSymbolProvider(base) { diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypes.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypes.kt index 6d20af877f..60819a4c50 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypes.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypes.kt @@ -6,7 +6,7 @@ package software.amazon.smithy.rust.codegen.client.rustlang import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq /** * Dereference [input] diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriter.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriter.kt index 1874c77eb4..24d59c01ab 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriter.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriter.kt @@ -22,10 +22,10 @@ import software.amazon.smithy.model.traits.DeprecatedTrait import software.amazon.smithy.model.traits.DocumentationTrait import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.isOptional -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.letIf +import software.amazon.smithy.rust.codegen.core.util.orNull import software.amazon.smithy.utils.AbstractCodeWriter import java.io.File import java.util.function.BiFunction diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CodegenVisitor.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CodegenVisitor.kt index 389e332ec3..f160b3d4e1 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CodegenVisitor.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CodegenVisitor.kt @@ -26,16 +26,17 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.implBlock import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.ProtocolGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.ProtocolGeneratorFactory import software.amazon.smithy.rust.codegen.client.smithy.protocols.ProtocolLoader -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait import software.amazon.smithy.rust.codegen.client.smithy.transformers.AddErrorMessage import software.amazon.smithy.rust.codegen.client.smithy.transformers.EventStreamNormalizer import software.amazon.smithy.rust.codegen.client.smithy.transformers.OperationNormalizer import software.amazon.smithy.rust.codegen.client.smithy.transformers.RecursiveShapeBoxer import software.amazon.smithy.rust.codegen.client.smithy.transformers.RemoveEventStreamOperations -import software.amazon.smithy.rust.codegen.client.util.CommandFailed -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.util.CommandFailed +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.letIf +import software.amazon.smithy.rust.codegen.core.util.runCommand import java.util.logging.Logger /** diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CoreRustSettings.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CoreRustSettings.kt index d3e6046e49..beac002e1b 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CoreRustSettings.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/CoreRustSettings.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.model.node.StringNode import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.model.shapes.Shape import software.amazon.smithy.model.shapes.ShapeId -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.orNull import java.util.Optional import java.util.logging.Logger import kotlin.streams.toList diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/EventStreamSymbolProvider.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/EventStreamSymbolProvider.kt index 92799b2f99..2f9d42819d 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/EventStreamSymbolProvider.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/EventStreamSymbolProvider.kt @@ -16,13 +16,13 @@ import software.amazon.smithy.rust.codegen.client.rustlang.render import software.amazon.smithy.rust.codegen.client.rustlang.stripOuter import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.generators.error.eventStreamErrorSymbol -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait import software.amazon.smithy.rust.codegen.client.smithy.transformers.eventStreamErrors -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.isEventStream -import software.amazon.smithy.rust.codegen.client.util.isInputEventStream -import software.amazon.smithy.rust.codegen.client.util.isOutputEventStream +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.isEventStream +import software.amazon.smithy.rust.codegen.core.util.isInputEventStream +import software.amazon.smithy.rust.codegen.core.util.isOutputEventStream /** * Wrapping symbol provider to wrap modeled types with the aws-smithy-http Event Stream send/receive types. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/RuntimeTypes.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/RuntimeTypes.kt index 63c01fcb25..66de796b83 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/RuntimeTypes.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/RuntimeTypes.kt @@ -23,8 +23,8 @@ import software.amazon.smithy.rust.codegen.client.rustlang.RustWriter import software.amazon.smithy.rust.codegen.client.rustlang.asType import software.amazon.smithy.rust.codegen.client.rustlang.rustInlineTemplate import software.amazon.smithy.rust.codegen.client.rustlang.writable -import software.amazon.smithy.rust.codegen.client.util.orNull import software.amazon.smithy.rust.codegen.core.Version +import software.amazon.smithy.rust.codegen.core.util.orNull import java.util.Optional private const val DEFAULT_KEY = "DEFAULT" diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingTraitSymbolProvider.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingTraitSymbolProvider.kt index a92078f642..88e1ba9511 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingTraitSymbolProvider.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingTraitSymbolProvider.kt @@ -14,11 +14,11 @@ import software.amazon.smithy.model.shapes.StringShape import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.shapes.UnionShape import software.amazon.smithy.rust.codegen.client.rustlang.RustMetadata -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.isStreaming +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.isStreaming /** * Wrapping symbol provider to change `Blob` to `ByteStream` when it targets a streaming member diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolMetadataProvider.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolMetadataProvider.kt index 1f65db2f90..8c7d7e70c4 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolMetadataProvider.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolMetadataProvider.kt @@ -19,7 +19,7 @@ import software.amazon.smithy.model.traits.StreamingTrait import software.amazon.smithy.rust.codegen.client.rustlang.Attribute import software.amazon.smithy.rust.codegen.client.rustlang.RustMetadata import software.amazon.smithy.rust.codegen.client.rustlang.Visibility -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait /** * Default delegator to enable easily decorating another symbol provider. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolVisitor.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolVisitor.kt index f6ee87b5de..e3087f1e21 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolVisitor.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/SymbolVisitor.kt @@ -39,13 +39,14 @@ import software.amazon.smithy.model.traits.EnumTrait import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.rust.codegen.client.rustlang.RustType import software.amazon.smithy.rust.codegen.client.rustlang.stripOuter -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.toPascalCase -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.letIf +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import kotlin.reflect.KClass /** Map from Smithy Shapes to Rust Types */ @@ -409,12 +410,3 @@ fun Symbol.isRustBoxed(): Boolean = rustType().stripOuter() is // Symbols should _always_ be created with a Rust type & shape attached fun Symbol.rustType(): RustType = this.expectProperty(RUST_TYPE_KEY, RustType::class.java) fun Symbol.shape(): Shape = this.expectProperty(SHAPE_KEY, Shape::class.java) - -/** - * Utility function similar to `let` that conditionally applies [f] only if [cond] is true. - */ -fun T.letIf(cond: Boolean, f: (T) -> T): T { - return if (cond) { - f(this) - } else this -} diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpChecksumRequiredGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpChecksumRequiredGenerator.kt index d134f429c4..5a3ee39e58 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpChecksumRequiredGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpChecksumRequiredGenerator.kt @@ -18,9 +18,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection import software.amazon.smithy.rust.codegen.client.smithy.generators.operationBuildError -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape class HttpChecksumRequiredGenerator( private val coreCodegenContext: CoreCodegenContext, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpVersionListCustomization.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpVersionListCustomization.kt index 953b98e8ad..ff2c1079f9 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpVersionListCustomization.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/HttpVersionListCustomization.kt @@ -15,8 +15,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.isEventStream +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.isEventStream private fun RuntimeConfig.httpVersionModule(): RuntimeType = RuntimeType("http_versions", this.runtimeCrate("http"), "aws_smithy_http") diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/IdempotencyTokenGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/IdempotencyTokenGenerator.kt index 090f76a6c8..d0bc823a74 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/IdempotencyTokenGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/IdempotencyTokenGenerator.kt @@ -13,8 +13,8 @@ import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationCustomization import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSection -import software.amazon.smithy.rust.codegen.client.util.findMemberWithTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.findMemberWithTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape class IdempotencyTokenGenerator(coreCodegenContext: CoreCodegenContext, private val operationShape: OperationShape) : OperationCustomization() { diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/SmithyTypesPubUseGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/SmithyTypesPubUseGenerator.kt index bb294d8453..94aa834566 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/SmithyTypesPubUseGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customizations/SmithyTypesPubUseGenerator.kt @@ -17,8 +17,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsSection -import software.amazon.smithy.rust.codegen.client.util.hasEventStreamMember -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasEventStreamMember +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember private data class PubUseType( val type: RuntimeType, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/NoOpEventStreamSigningDecorator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/NoOpEventStreamSigningDecorator.kt index c6c0f805fc..b6280b7503 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/NoOpEventStreamSigningDecorator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/NoOpEventStreamSigningDecorator.kt @@ -13,7 +13,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.config.EventStreamSigningConfig -import software.amazon.smithy.rust.codegen.client.util.hasEventStreamOperations +import software.amazon.smithy.rust.codegen.core.util.hasEventStreamOperations /** * The NoOpEventStreamSigningDecorator: diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RustCodegenDecorator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RustCodegenDecorator.kt index ed8975a702..edb96225cf 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RustCodegenDecorator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/customize/RustCodegenDecorator.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsCustomi import software.amazon.smithy.rust.codegen.client.smithy.generators.ManifestCustomizations import software.amazon.smithy.rust.codegen.client.smithy.generators.config.ConfigCustomization import software.amazon.smithy.rust.codegen.client.smithy.protocols.ProtocolMap -import software.amazon.smithy.rust.codegen.client.util.deepMergeWith +import software.amazon.smithy.rust.codegen.core.util.deepMergeWith import java.util.ServiceLoader import java.util.logging.Logger diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/BuilderGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/BuilderGenerator.kt index 11df4b09ac..d9a6d8edaa 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/BuilderGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/BuilderGenerator.kt @@ -32,8 +32,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.expectRustMetadata import software.amazon.smithy.rust.codegen.client.smithy.isOptional import software.amazon.smithy.rust.codegen.client.smithy.makeOptional import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase fun StructureShape.builderSymbol(symbolProvider: RustSymbolProvider): Symbol { val structureSymbol = symbolProvider.toSymbol(this) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CargoTomlGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CargoTomlGenerator.kt index b05a0bafc9..a6000ad0dc 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CargoTomlGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CargoTomlGenerator.kt @@ -11,8 +11,8 @@ import software.amazon.smithy.rust.codegen.client.rustlang.DependencyScope import software.amazon.smithy.rust.codegen.client.rustlang.Feature import software.amazon.smithy.rust.codegen.client.rustlang.RustWriter import software.amazon.smithy.rust.codegen.client.smithy.CoreRustSettings -import software.amazon.smithy.rust.codegen.client.util.deepMergeWith import software.amazon.smithy.rust.codegen.core.Version +import software.amazon.smithy.rust.codegen.core.util.deepMergeWith /** * Customizations to apply to the generated Cargo.toml file. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingGenerator.kt index d3c8b9034e..0742725435 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.generators.http.rustFormatString import software.amazon.smithy.rust.codegen.client.smithy.isOptional -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.inputShape fun EndpointTrait.prefixFormatString(): String { return this.hostPrefix.rustFormatString("", "") diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EnumGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EnumGenerator.kt index 9130e15fbe..1d5447caf3 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EnumGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EnumGenerator.kt @@ -22,10 +22,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.MaybeRenamed import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.expectRustMetadata -import software.amazon.smithy.rust.codegen.client.util.doubleQuote -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.doubleQuote +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.orNull /** Model that wraps [EnumDefinition] to calculate and cache values required to generate the Rust enum source. */ class EnumMemberModel(private val definition: EnumDefinition, private val symbolProvider: RustSymbolProvider) { diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/Instantiator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/Instantiator.kt index a54ab771d8..3cf94d8b71 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/Instantiator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/Instantiator.kt @@ -44,12 +44,12 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.isOptional -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.letIf /** * Instantiator generates code to instantiate a given Shape given a `Node` representing the value diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/LibRsGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/LibRsGenerator.kt index 2df4d03f85..7da60fe44f 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/LibRsGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/LibRsGenerator.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rust import software.amazon.smithy.rust.codegen.client.smithy.CoreRustSettings import software.amazon.smithy.rust.codegen.client.smithy.customize.NamedSectionGenerator import software.amazon.smithy.rust.codegen.client.smithy.customize.Section -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait sealed class LibRsSection(name: String) : Section(name) { object Attributes : LibRsSection("Attributes") diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGenerator.kt index 9c1873627a..b0ae733993 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGenerator.kt @@ -29,13 +29,13 @@ import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.generators.client.FluentClientGenerics import software.amazon.smithy.rust.codegen.client.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.findMemberWithTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.findMemberWithTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toPascalCase // TODO(https://github.com/awslabs/smithy-rs/issues/1013) Support pagination when the idempotency trait is present fun OperationShape.isPaginated(model: Model) = diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/ServiceGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/ServiceGenerator.kt index 637862e26c..219d8d08f0 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/ServiceGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/ServiceGenerator.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.error.TopLev import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.ProtocolGenerator import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.ProtocolTestGenerator -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.inputShape /** * ServiceGenerator diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/StructureGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/StructureGenerator.kt index 50e5e43b54..c1b93c7243 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/StructureGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/StructureGenerator.kt @@ -32,10 +32,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.error.ErrorG import software.amazon.smithy.rust.codegen.client.smithy.isOptional import software.amazon.smithy.rust.codegen.client.smithy.renamedFrom import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait fun RustWriter.implBlock(structureShape: Shape, symbolProvider: SymbolProvider, block: RustWriter.() -> Unit) { rustBlock("impl ${symbolProvider.toSymbol(structureShape).name}") { diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/UnionGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/UnionGenerator.kt index 5f4c1872d9..388dc2e14d 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/UnionGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/UnionGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rust import software.amazon.smithy.rust.codegen.client.rustlang.rustBlock import software.amazon.smithy.rust.codegen.client.smithy.expectRustMetadata import software.amazon.smithy.rust.codegen.client.smithy.renamedFrom -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase fun CodegenTarget.renderUnknownVariant() = when (this) { CodegenTarget.SERVER -> false diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt index c0e53cf052..1555af2c17 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/client/FluentClientGenerator.kt @@ -51,10 +51,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.isPaginated import software.amazon.smithy.rust.codegen.client.smithy.generators.setterName import software.amazon.smithy.rust.codegen.client.smithy.generators.smithyHttp import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase class FluentClientGenerator( private val codegenContext: ClientCodegenContext, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt index ce63b086d7..68eb2c0001 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.customize.NamedSectionGenerator import software.amazon.smithy.rust.codegen.client.smithy.customize.Section -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait /** * [ServiceConfig] is the parent type of sections that can be overridden when generating a config for a service. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/CombinedErrorGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/CombinedErrorGenerator.kt index d69981d55d..86f1c37fd2 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/CombinedErrorGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/CombinedErrorGenerator.kt @@ -30,8 +30,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.customize.Section import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.transformers.eventStreamErrors import software.amazon.smithy.rust.codegen.client.smithy.transformers.operationErrors -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase /** * For a given Operation ([this]), return the symbol referring to the unified error. This can be used diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ErrorGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ErrorGenerator.kt index e5972af9a7..748e0bff8a 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ErrorGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ErrorGenerator.kt @@ -19,10 +19,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType.Companion.S import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.isOptional -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.transformers.errorMessageMember -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.letIf sealed class ErrorKind { abstract fun writable(runtimeConfig: RuntimeConfig): Writable diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ServerCombinedErrorGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ServerCombinedErrorGenerator.kt index e78dcddc48..77196149a3 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ServerCombinedErrorGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/ServerCombinedErrorGenerator.kt @@ -19,7 +19,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rust import software.amazon.smithy.rust.codegen.client.rustlang.rustBlock import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase /** * Generates a unified error enum for [operation]. [ErrorGenerator] handles generating the individual variants, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/HttpBindingGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/HttpBindingGenerator.kt index b9f05a2041..2de37bbf81 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/HttpBindingGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/HttpBindingGenerator.kt @@ -47,14 +47,14 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.client.smithy.protocols.Protocol import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.EventStreamUnmarshallerGenerator import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.UNREACHABLE -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.isPrimitive -import software.amazon.smithy.rust.codegen.client.util.isStreaming -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.UNREACHABLE +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.isPrimitive +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase /** * The type of HTTP message from which we are (de)serializing the HTTP-bound data. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/RequestBindingGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/RequestBindingGenerator.kt index 2a4e7a603c..84e3f77213 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/RequestBindingGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/http/RequestBindingGenerator.kt @@ -27,9 +27,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.OperationBui import software.amazon.smithy.rust.codegen.client.smithy.generators.operationBuildError import software.amazon.smithy.rust.codegen.client.smithy.isOptional import software.amazon.smithy.rust.codegen.client.smithy.protocols.Protocol -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectMember -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectMember +import software.amazon.smithy.rust.codegen.core.util.inputShape fun HttpTrait.uriFormatString(): String { return uri.rustFormatString("/", "/") diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/MakeOperationGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/MakeOperationGenerator.kt index 2771e7b345..a18be2d44a 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/MakeOperationGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/MakeOperationGenerator.kt @@ -25,13 +25,13 @@ import software.amazon.smithy.rust.codegen.client.smithy.customize.OperationSect import software.amazon.smithy.rust.codegen.client.smithy.customize.writeCustomizations import software.amazon.smithy.rust.codegen.client.smithy.generators.http.RequestBindingGenerator import software.amazon.smithy.rust.codegen.client.smithy.generators.operationBuildError -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.client.smithy.protocols.Protocol -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.findStreamingMember -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.findStreamingMember +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.letIf /** Generates the `make_operation` function on input structs */ open class MakeOperationGenerator( diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolGenerator.kt index 82d1432a70..8a788196f7 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolGenerator.kt @@ -20,7 +20,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.BuilderGener import software.amazon.smithy.rust.codegen.client.smithy.generators.client.FluentClientGenerator import software.amazon.smithy.rust.codegen.client.smithy.generators.implBlock import software.amazon.smithy.rust.codegen.client.smithy.protocols.Protocol -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.inputShape /** * Payload Body Generator. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGenerator.kt index 9d61bc81bb..efc452973e 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGenerator.kt @@ -36,15 +36,15 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarge import software.amazon.smithy.rust.codegen.client.smithy.generators.Instantiator import software.amazon.smithy.rust.codegen.client.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.client.testutil.TokioTest -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.findMemberWithTrait -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.isStreaming -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.findMemberWithTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import java.util.logging.Logger data class ProtocolSupport( diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsJson.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsJson.kt index c43100c469..a50da4220e 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsJson.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsJson.kt @@ -27,7 +27,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.JsonPar import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.StructuredDataParserGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.JsonSerializerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.StructuredDataSerializerGenerator -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.inputShape sealed class AwsJsonVersion { abstract val value: String diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQuery.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQuery.kt index d749526484..d0f4ca0c14 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQuery.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQuery.kt @@ -25,7 +25,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.AwsQuer import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.StructuredDataParserGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.AwsQuerySerializerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.StructuredDataSerializerGenerator -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait class AwsQueryFactory : ProtocolGeneratorFactory { override fun protocol(codegenContext: ClientCodegenContext): Protocol = AwsQueryProtocol(codegenContext) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBindingResolver.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBindingResolver.kt index a2795ad1d1..4615048126 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBindingResolver.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBindingResolver.kt @@ -13,9 +13,9 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ToShapeId import software.amazon.smithy.model.traits.HttpTrait import software.amazon.smithy.model.traits.TimestampFormatTrait -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.orNull typealias HttpLocation = HttpBinding.Location diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolGenerator.kt index 607531ffeb..1d63ce1f03 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolGenerator.kt @@ -36,13 +36,13 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.setterName import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.StructuredDataParserGenerator import software.amazon.smithy.rust.codegen.client.smithy.transformers.errorMessageMember import software.amazon.smithy.rust.codegen.client.smithy.transformers.operationErrors -import software.amazon.smithy.rust.codegen.client.util.UNREACHABLE -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.isStreaming -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.UNREACHABLE +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase class HttpBoundProtocolGenerator( coreCodegenContext: CoreCodegenContext, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt index 57af610867..c8f7e855ba 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/HttpBoundProtocolPayloadGenerator.kt @@ -33,17 +33,17 @@ import software.amazon.smithy.rust.codegen.client.smithy.isOptional import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.EventStreamErrorMarshallerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.EventStreamMarshallerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.StructuredDataSerializerGenerator -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.UNREACHABLE -import software.amazon.smithy.rust.codegen.client.util.expectMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.isEventStream -import software.amazon.smithy.rust.codegen.client.util.isInputEventStream -import software.amazon.smithy.rust.codegen.client.util.isOutputEventStream -import software.amazon.smithy.rust.codegen.client.util.isStreaming -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.UNREACHABLE +import software.amazon.smithy.rust.codegen.core.util.expectMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.isEventStream +import software.amazon.smithy.rust.codegen.core.util.isInputEventStream +import software.amazon.smithy.rust.codegen.core.util.isOutputEventStream +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase class HttpBoundProtocolPayloadGenerator( coreCodegenContext: CoreCodegenContext, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamer.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamer.kt index ae3a33b3df..16d1c28668 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamer.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamer.kt @@ -16,8 +16,8 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.shapes.UnionShape import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase fun RustSymbolProvider.lensName(prefix: String, root: Shape, path: List): String { val base = shapeFunctionName("${prefix}lens", root) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJson.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJson.kt index a71c2277ff..123acd4f5e 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJson.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJson.kt @@ -26,9 +26,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.JsonPar import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.StructuredDataParserGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.JsonSerializerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.StructuredDataSerializerGenerator -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.outputShape class RestJsonFactory : ProtocolGeneratorFactory { override fun protocol(codegenContext: ClientCodegenContext): Protocol = RestJson(codegenContext) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXml.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXml.kt index f2cc52023e..09de074078 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXml.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXml.kt @@ -24,7 +24,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.RestXml import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.StructuredDataParserGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.StructuredDataSerializerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.XmlBindingTraitSerializerGenerator -import software.amazon.smithy.rust.codegen.client.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.expectTrait class RestXmlFactory( private val generator: (ClientCodegenContext) -> Protocol = { RestXml(it) }, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/XmlNameIndex.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/XmlNameIndex.kt index 233a93c077..a153ba7c65 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/XmlNameIndex.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/XmlNameIndex.kt @@ -11,13 +11,13 @@ import software.amazon.smithy.model.shapes.MemberShape import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.traits.XmlAttributeTrait import software.amazon.smithy.model.traits.XmlNameTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape /** * KnowledgeIndex to determine the name for a given shape based on the XmlName trait and the shape's id. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt index 038f3629de..2036ca246d 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/EventStreamUnmarshallerGenerator.kt @@ -39,12 +39,12 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.UnionGenerat import software.amazon.smithy.rust.codegen.client.smithy.generators.error.eventStreamErrorSymbol import software.amazon.smithy.rust.codegen.client.smithy.generators.renderUnknownVariant import software.amazon.smithy.rust.codegen.client.smithy.protocols.Protocol -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticEventStreamUnionTrait import software.amazon.smithy.rust.codegen.client.smithy.transformers.eventStreamErrors -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticEventStreamUnionTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.toPascalCase class EventStreamUnmarshallerGenerator( private val protocol: Protocol, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGenerator.kt index b9a7619a88..2fbf75ba8d 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGenerator.kt @@ -47,11 +47,11 @@ import software.amazon.smithy.rust.codegen.client.smithy.isRustBoxed import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpBindingResolver import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.client.smithy.protocols.deserializeFunctionName -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape import software.amazon.smithy.utils.StringUtils class JsonParserGenerator( diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/RestXmlParserGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/RestXmlParserGenerator.kt index d632533a98..b718071c52 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/RestXmlParserGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/RestXmlParserGenerator.kt @@ -9,10 +9,10 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.protocols.AllowInvalidXmlRoot -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.orNull class RestXmlParserGenerator( coreCodegenContext: CoreCodegenContext, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt index 43929fb2cc..051631d672 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGenerator.kt @@ -51,12 +51,12 @@ import software.amazon.smithy.rust.codegen.client.smithy.isRustBoxed import software.amazon.smithy.rust.codegen.client.smithy.protocols.XmlMemberIndex import software.amazon.smithy.rust.codegen.client.smithy.protocols.XmlNameIndex import software.amazon.smithy.rust.codegen.client.smithy.protocols.deserializeFunctionName -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape // The string argument is the name of the XML ScopedDecoder to continue parsing from typealias OperationInnerWriteable = RustWriter.(String) -> Unit diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt index da6a1fe838..25961611e4 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGenerator.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.model.traits.XmlFlattenedTrait import software.amazon.smithy.model.traits.XmlNameTrait import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait class AwsQuerySerializerGenerator(coreCodegenContext: CoreCodegenContext) : QuerySerializerGenerator(coreCodegenContext) { override val protocolName: String get() = "AWS Query" diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt index 24ff2f5035..f340ee05c9 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGenerator.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.traits.XmlNameTrait import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait import software.amazon.smithy.utils.StringUtils class Ec2QuerySerializerGenerator(coreCodegenContext: CoreCodegenContext) : QuerySerializerGenerator(coreCodegenContext) { diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamErrorMarshallerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamErrorMarshallerGenerator.kt index e96bda36ff..de02c7561b 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamErrorMarshallerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamErrorMarshallerGenerator.kt @@ -29,12 +29,12 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.error.eventS import software.amazon.smithy.rust.codegen.client.smithy.generators.renderUnknownVariant import software.amazon.smithy.rust.codegen.client.smithy.generators.unknownVariantError import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticEventStreamUnionTrait import software.amazon.smithy.rust.codegen.client.smithy.transformers.eventStreamErrors -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticEventStreamUnionTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.toPascalCase class EventStreamErrorMarshallerGenerator( private val model: Model, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt index 21f1367fa9..2b3e461646 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/EventStreamMarshallerGenerator.kt @@ -39,9 +39,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.renderUnknow import software.amazon.smithy.rust.codegen.client.smithy.generators.unknownVariantError import software.amazon.smithy.rust.codegen.client.smithy.isOptional import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.toPascalCase open class EventStreamMarshallerGenerator( private val model: Model, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGenerator.kt index 7ee3364521..650b079ef1 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGenerator.kt @@ -45,12 +45,12 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpBindingRe import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.client.smithy.protocols.serializeFunctionName import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape /** * Class describing a JSON section that can be used in a customization. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/QuerySerializerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/QuerySerializerGenerator.kt index 9fc5739fe4..4d59e38773 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/QuerySerializerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/QuerySerializerGenerator.kt @@ -40,11 +40,11 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.serializatio import software.amazon.smithy.rust.codegen.client.smithy.isOptional import software.amazon.smithy.rust.codegen.client.smithy.protocols.serializeFunctionName import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.orNull abstract class QuerySerializerGenerator(coreCodegenContext: CoreCodegenContext) : StructuredDataSerializerGenerator { protected data class Context( diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt index ec63267d50..e4270443eb 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGenerator.kt @@ -43,18 +43,18 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.UnionGenerat import software.amazon.smithy.rust.codegen.client.smithy.generators.renderUnknownVariant import software.amazon.smithy.rust.codegen.client.smithy.generators.serializationError import software.amazon.smithy.rust.codegen.client.smithy.isOptional -import software.amazon.smithy.rust.codegen.client.smithy.letIf import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpBindingResolver import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.client.smithy.protocols.XmlMemberIndex import software.amazon.smithy.rust.codegen.client.smithy.protocols.XmlNameIndex import software.amazon.smithy.rust.codegen.client.smithy.protocols.serializeFunctionName import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.letIf +import software.amazon.smithy.rust.codegen.core.util.outputShape class XmlBindingTraitSerializerGenerator( coreCodegenContext: CoreCodegenContext, diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/AddErrorMessage.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/AddErrorMessage.kt index 7757a5450d..bfb4163afd 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/AddErrorMessage.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/AddErrorMessage.kt @@ -11,8 +11,8 @@ import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.model.transform.ModelTransformer -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.orNull import java.util.logging.Logger fun StructureShape.errorMessageMember(): MemberShape? = this.getMember("message").or { this.getMember("Message") }.orNull() diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizer.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizer.kt index c3a3453e5e..4195891a34 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizer.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizer.kt @@ -15,12 +15,12 @@ import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.shapes.UnionShape import software.amazon.smithy.model.traits.ErrorTrait import software.amazon.smithy.model.transform.ModelTransformer -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticEventStreamUnionTrait -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.isEventStream -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticEventStreamUnionTrait +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.isEventStream +import software.amazon.smithy.rust.codegen.core.util.outputShape /** * Generates synthetic unions to replace the modeled unions for Event Stream types. diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizer.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizer.kt index fbf1f13d0f..1fae090fd9 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizer.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizer.kt @@ -11,10 +11,10 @@ import software.amazon.smithy.model.shapes.Shape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.transform.ModelTransformer -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.orNull import software.amazon.smithy.rust.codegen.client.util.rename +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.orNull import java.util.Optional import kotlin.streams.toList diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxer.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxer.kt index 9d7d53d30f..f14c0e9908 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxer.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxer.kt @@ -14,7 +14,7 @@ import software.amazon.smithy.model.shapes.SetShape import software.amazon.smithy.model.shapes.Shape import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.client.smithy.RustBoxTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait object RecursiveShapeBoxer { /** diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RemoveEventStreamOperations.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RemoveEventStreamOperations.kt index b22c5c0de2..aa48d9f0a0 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RemoveEventStreamOperations.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RemoveEventStreamOperations.kt @@ -10,8 +10,8 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.transform.ModelTransformer import software.amazon.smithy.rust.codegen.client.smithy.CoreRustSettings -import software.amazon.smithy.rust.codegen.client.util.findStreamingMember -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.findStreamingMember +import software.amazon.smithy.rust.codegen.core.util.orNull import java.util.logging.Logger // TODO(EventStream): [CLEANUP] Remove this class once the Event Stream implementation is stable diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/Rust.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/Rust.kt index 563131c5e4..a3e21dba78 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/Rust.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/Rust.kt @@ -28,11 +28,11 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RustCrate import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.SymbolVisitorConfig -import software.amazon.smithy.rust.codegen.client.smithy.letIf -import software.amazon.smithy.rust.codegen.client.util.CommandFailed -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.CommandFailed +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.letIf +import software.amazon.smithy.rust.codegen.core.util.runCommand import java.io.File import java.nio.file.Files.createTempDirectory import java.nio.file.Path diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/TestHelpers.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/TestHelpers.kt index 54c2cf6b38..e5762296b2 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/TestHelpers.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/testutil/TestHelpers.kt @@ -27,8 +27,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.BuilderGener import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.client.smithy.generators.implBlock -import software.amazon.smithy.rust.codegen.client.smithy.letIf -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.letIf import java.io.File val TestRuntimeConfig = diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Synthetics.kt b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Synthetics.kt index 33557a376b..1f2c99cac5 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Synthetics.kt +++ b/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Synthetics.kt @@ -10,6 +10,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.shapes.ToShapeId +import software.amazon.smithy.rust.codegen.core.util.orNull /** * Clones an entire operation and its input/output shapes under a new name. diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/customizations/HttpVersionListGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/customizations/HttpVersionListGeneratorTest.kt index 92b5171830..ef5188e9bf 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/customizations/HttpVersionListGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/customizations/HttpVersionListGeneratorTest.kt @@ -23,7 +23,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.AddRustTestsDecorator import software.amazon.smithy.rust.codegen.client.testutil.TokioTest import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand // If any of these tests fail, and you want to understand why, run them with logging: // ``` diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/EnumGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/EnumGeneratorTest.kt index 20d4c3cbc4..24855a6316 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/EnumGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/EnumGeneratorTest.kt @@ -18,9 +18,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.EnumMemberMo import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.orNull class EnumGeneratorTest { @Nested diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/StructureGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/StructureGeneratorTest.kt index 64456a83d2..00fac0b016 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/StructureGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/StructureGeneratorTest.kt @@ -25,7 +25,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup class StructureGeneratorTest { companion object { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/UnionGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/UnionGeneratorTest.kt index b9c2b73b15..a05f219b2d 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/UnionGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/UnionGeneratorTest.kt @@ -14,7 +14,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.UnionGenerat import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup class UnionGeneratorTest { @Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/RequestBindingGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/RequestBindingGeneratorTest.kt index cf79878f81..e17e79dde9 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/RequestBindingGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/RequestBindingGeneratorTest.kt @@ -29,8 +29,8 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait class RequestBindingGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/ResponseBindingGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/ResponseBindingGeneratorTest.kt index 551d81e1b5..03486aab4a 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/ResponseBindingGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/generators/http/ResponseBindingGeneratorTest.kt @@ -26,7 +26,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape class ResponseBindingGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/RustTypesTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/RustTypesTest.kt deleted file mode 100644 index d627e275f5..0000000000 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/RustTypesTest.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */ - -package software.amazon.smithy.rust.codegen.client.lang - -import io.kotest.matchers.shouldBe -import org.junit.jupiter.api.Test -import software.amazon.smithy.rust.codegen.client.rustlang.RustType -import software.amazon.smithy.rust.codegen.client.rustlang.render - -class RustTypesTest { - @Test - fun `types render properly`() { - val type = RustType.Box(RustType.Option(RustType.Reference("a", RustType.Vec(RustType.String)))) - type.render(false) shouldBe "Box>>" - type.render(true) shouldBe "std::boxed::Box>>" - } -} diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWordSymbolProviderTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWordSymbolProviderTest.kt index 8b9cd07059..ba0849d1c1 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWordSymbolProviderTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustReservedWordSymbolProviderTest.kt @@ -15,9 +15,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.MaybeRenamed import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.PANIC -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.PANIC +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.toPascalCase internal class RustReservedWordSymbolProviderTest { class Stub : RustSymbolProvider { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypesTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypesTest.kt index cfec6003fc..9f9dafc0c3 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypesTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustTypesTest.kt @@ -5,6 +5,7 @@ package software.amazon.smithy.rust.codegen.client.rustlang +import io.kotest.matchers.shouldBe import io.kotest.matchers.string.shouldContain import org.junit.jupiter.api.Test @@ -132,4 +133,11 @@ internal class RustTypesTest { "'dyn foo::Foo'", ) } + + @Test + fun `types render properly`() { + val type = RustType.Box(RustType.Option(RustType.Reference("a", RustType.Vec(RustType.String)))) + type.render(false) shouldBe "Box>>" + type.render(true) shouldBe "std::boxed::Box>>" + } } diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/RustWriterTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriterTest.kt similarity index 87% rename from codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/RustWriterTest.kt rename to codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriterTest.kt index 1a7f7ccca7..aa88fca2f3 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/RustWriterTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/RustWriterTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.lang +package software.amazon.smithy.rust.codegen.client.rustlang import io.kotest.matchers.collections.shouldContain import io.kotest.matchers.shouldBe @@ -15,24 +15,13 @@ import software.amazon.smithy.model.Model import software.amazon.smithy.model.shapes.SetShape import software.amazon.smithy.model.shapes.StringShape import software.amazon.smithy.model.shapes.StructureShape -import software.amazon.smithy.rust.codegen.client.rustlang.Attribute -import software.amazon.smithy.rust.codegen.client.rustlang.CargoDependency -import software.amazon.smithy.rust.codegen.client.rustlang.RustType -import software.amazon.smithy.rust.codegen.client.rustlang.RustWriter -import software.amazon.smithy.rust.codegen.client.rustlang.asType -import software.amazon.smithy.rust.codegen.client.rustlang.docs -import software.amazon.smithy.rust.codegen.client.rustlang.isEmpty -import software.amazon.smithy.rust.codegen.client.rustlang.rust -import software.amazon.smithy.rust.codegen.client.rustlang.rustBlock -import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate -import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndRun import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.shouldCompile import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup class RustWriterTest { @Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/UseDeclarationsTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/UseDeclarationsTest.kt similarity index 91% rename from codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/UseDeclarationsTest.kt rename to codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/UseDeclarationsTest.kt index 3b46f1f03c..da53e8a05f 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/lang/UseDeclarationsTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/rustlang/UseDeclarationsTest.kt @@ -3,11 +3,10 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.lang +package software.amazon.smithy.rust.codegen.client.rustlang import io.kotest.matchers.shouldBe import org.junit.jupiter.api.Test -import software.amazon.smithy.rust.codegen.client.rustlang.UseDeclarations import software.amazon.smithy.rust.codegen.client.testutil.shouldCompile class UseDeclarationsTest { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingShapeSymbolProviderTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingShapeSymbolProviderTest.kt index 54e0af3fcb..2af307a943 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingShapeSymbolProviderTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/StreamingShapeSymbolProviderTest.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.model.shapes.MemberShape import software.amazon.smithy.rust.codegen.client.smithy.transformers.OperationNormalizer import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup internal class StreamingShapeSymbolProviderTest { val model = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CombinedErrorGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CombinedErrorGeneratorTest.kt index 311ae8de22..099b8a452c 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CombinedErrorGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/CombinedErrorGeneratorTest.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilder import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup class CombinedErrorGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingsTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingsTest.kt index 633c4d3fb9..6a9e859e5d 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingsTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/EndpointTraitBindingsTest.kt @@ -28,8 +28,8 @@ import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.runCommand import kotlin.io.path.ExperimentalPathApi internal class EndpointTraitBindingsTest { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/InstantiatorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/InstantiatorTest.kt index 5c1c009c4d..b164a32a6a 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/InstantiatorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/InstantiatorTest.kt @@ -23,8 +23,8 @@ import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilder import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.lookup class InstantiatorTest { private val model = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGeneratorTest.kt index 0a55737fcd..6b4366b498 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/PaginatorGeneratorTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.smithy.RustCodegenPlugin import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand internal class PaginatorGeneratorTest { private val model = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGeneratorTest.kt index c5d336a6a3..2f7fbf656d 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/config/ServiceConfigGeneratorTest.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup internal class ServiceConfigGeneratorTest { @Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/TopLevelErrorGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/TopLevelErrorGeneratorTest.kt index 27aede14dc..1cf32633b3 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/TopLevelErrorGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/error/TopLevelErrorGeneratorTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.smithy.RustCodegenPlugin import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand import kotlin.io.path.ExperimentalPathApi import kotlin.io.path.createDirectory import kotlin.io.path.writeText diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGeneratorTest.kt index e18326726f..03d2715307 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/generators/protocol/ProtocolTestGeneratorTest.kt @@ -28,10 +28,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.ProtocolMap import software.amazon.smithy.rust.codegen.client.smithy.protocols.RestJson import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.CommandFailed -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.CommandFailed +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.runCommand import java.nio.file.Path private class TestProtocolPayloadGenerator(private val body: String) : ProtocolPayloadGenerator { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQueryTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQueryTest.kt index 59889d1bc3..09b103df23 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQueryTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/AwsQueryTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.smithy.RustCodegenPlugin import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand class AwsQueryTest { private val model = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/Ec2QueryTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/Ec2QueryTest.kt index 7ffbf7448c..d7efcefa14 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/Ec2QueryTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/Ec2QueryTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.smithy.RustCodegenPlugin import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand class Ec2QueryTest { private val model = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamerTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamerTest.kt index 3152694632..996d445340 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamerTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/InlineFunctionNamerTest.kt @@ -10,7 +10,7 @@ import io.kotest.matchers.shouldBe import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup class InlineFunctionNamerTest { private val testModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJsonTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJsonTest.kt index 0042720103..9790ecb71f 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJsonTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestJsonTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.smithy.RustCodegenPlugin import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand internal class RestJsonTest { val model = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXmlTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXmlTest.kt index 58b640c95d..4bf4f747aa 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXmlTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/RestXmlTest.kt @@ -9,7 +9,7 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.rust.codegen.client.smithy.RustCodegenPlugin import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.generatePluginContext -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.runCommand internal class RestXmlTest { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/AwsQueryParserGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/AwsQueryParserGeneratorTest.kt index e3fe0df8e6..9e3258e8e2 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/AwsQueryParserGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/AwsQueryParserGeneratorTest.kt @@ -20,8 +20,8 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.outputShape class AwsQueryParserGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/Ec2QueryParserGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/Ec2QueryParserGeneratorTest.kt index 37852525db..8ad6273857 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/Ec2QueryParserGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/Ec2QueryParserGeneratorTest.kt @@ -20,8 +20,8 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.outputShape class Ec2QueryParserGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGeneratorTest.kt index 1b50162dd9..dd757fefaa 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/JsonParserGeneratorTest.kt @@ -24,9 +24,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.outputShape class JsonParserGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGeneratorTest.kt index 4b584ba933..6cb3b5aba9 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/parse/XmlBindingTraitParserGeneratorTest.kt @@ -23,9 +23,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.outputShape internal class XmlBindingTraitParserGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt index cce3078087..e31e0ea272 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/AwsQuerySerializerGeneratorTest.kt @@ -23,9 +23,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.lookup class AwsQuerySerializerGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGeneratorTest.kt index c12f1ecef2..ca9bb6fd6a 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/Ec2QuerySerializerGeneratorTest.kt @@ -21,9 +21,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.lookup class Ec2QuerySerializerGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGeneratorTest.kt index 9fb394e813..56bc924f7a 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/JsonSerializerGeneratorTest.kt @@ -24,9 +24,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.lookup class JsonSerializerGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGeneratorTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGeneratorTest.kt index dbab25d7db..d4ad16fb3b 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGeneratorTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/protocols/serialize/XmlBindingTraitSerializerGeneratorTest.kt @@ -23,9 +23,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilde import software.amazon.smithy.rust.codegen.client.testutil.testCodegenContext import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.lookup internal class XmlBindingTraitSerializerGeneratorTest { private val baseModel = """ diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizerTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizerTest.kt index 0337266eed..a24c579453 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizerTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/EventStreamNormalizerTest.kt @@ -9,10 +9,10 @@ import io.kotest.matchers.shouldBe import org.junit.jupiter.api.Test import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.UnionShape -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticEventStreamUnionTrait import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticEventStreamUnionTrait +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait class EventStreamNormalizerTest { @Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizerTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizerTest.kt index c774b68c6a..e211077926 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizerTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/OperationNormalizerTest.kt @@ -11,11 +11,11 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.orNull +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.orNull internal class OperationNormalizerTest { @Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxerTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxerTest.kt index 9729f6c0d7..4ec569e8a2 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxerTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapeBoxerTest.kt @@ -10,9 +10,9 @@ import org.junit.jupiter.api.Test import software.amazon.smithy.model.shapes.MemberShape import software.amazon.smithy.rust.codegen.client.smithy.RustBoxTrait import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.lookup import kotlin.streams.toList internal class RecursiveShapeBoxerTest { diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapesIntegrationTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapesIntegrationTest.kt index 25f0b7e18f..00574e930f 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapesIntegrationTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/smithy/transformers/RecursiveShapesIntegrationTest.kt @@ -16,8 +16,8 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.UnionGenerat import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.CommandFailed -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.CommandFailed +import software.amazon.smithy.rust.codegen.core.util.lookup class RecursiveShapesIntegrationTest { @Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/SyntheticsTest.kt b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/SyntheticsTest.kt index f2751374b1..a2058bc83c 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/SyntheticsTest.kt +++ b/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/SyntheticsTest.kt @@ -11,6 +11,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ShapeId import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel +import software.amazon.smithy.rust.codegen.core.util.orNull class SyntheticsTest { @Test diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticEventStreamUnionTrait.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticEventStreamUnionTrait.kt similarity index 89% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticEventStreamUnionTrait.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticEventStreamUnionTrait.kt index 53b89b0d41..a609a59fdf 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticEventStreamUnionTrait.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticEventStreamUnionTrait.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.smithy.traits +package software.amazon.smithy.rust.codegen.core.smithy.traits import software.amazon.smithy.model.node.Node import software.amazon.smithy.model.shapes.MemberShape diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticInputTrait.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticInputTrait.kt similarity index 92% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticInputTrait.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticInputTrait.kt index 18ef0ec6e9..e4b95f5cde 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticInputTrait.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticInputTrait.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.smithy.traits +package software.amazon.smithy.rust.codegen.core.smithy.traits import software.amazon.smithy.model.node.Node import software.amazon.smithy.model.shapes.ShapeId diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticOutputTrait.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticOutputTrait.kt similarity index 92% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticOutputTrait.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticOutputTrait.kt index 955e3bb941..ba086f9cb6 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/traits/SyntheticOutputTrait.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/smithy/traits/SyntheticOutputTrait.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.smithy.traits +package software.amazon.smithy.rust.codegen.core.smithy.traits import software.amazon.smithy.model.node.Node import software.amazon.smithy.model.shapes.ShapeId diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Exec.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Exec.kt similarity index 92% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Exec.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Exec.kt index 3090407fc2..7609e950a2 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Exec.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Exec.kt @@ -3,9 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util -import software.amazon.smithy.rust.codegen.client.smithy.letIf import java.io.IOException import java.nio.file.Path import java.util.concurrent.TimeUnit diff --git a/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/LetIf.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/LetIf.kt new file mode 100644 index 0000000000..d02f925c68 --- /dev/null +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/LetIf.kt @@ -0,0 +1,14 @@ +/* + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +package software.amazon.smithy.rust.codegen.core.util + +/** + * Utility function similar to `let` that conditionally applies [f] only if [cond] is true. + */ +fun T.letIf(cond: Boolean, f: (T) -> T): T { + return if (cond) { + f(this) + } else this +} diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Map.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Map.kt similarity index 95% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Map.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Map.kt index 7016551d91..a326ee67ff 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Map.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Map.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import kotlin.collections.Map diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Option.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Option.kt similarity index 77% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Option.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Option.kt index 517518b0c9..311fe11981 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Option.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Option.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import java.util.Optional diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Panic.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Panic.kt similarity index 88% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Panic.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Panic.kt index 96c00f706e..b7dc3e681c 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Panic.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Panic.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util /** Something has gone horribly wrong due to a coding error */ fun PANIC(reason: String): Nothing = throw RuntimeException(reason) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Smithy.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Smithy.kt similarity index 95% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Smithy.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Smithy.kt index 822c5b2cd5..e7b7894478 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Smithy.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Smithy.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import software.amazon.smithy.codegen.core.CodegenException import software.amazon.smithy.model.Model @@ -18,8 +18,8 @@ import software.amazon.smithy.model.shapes.StructureShape import software.amazon.smithy.model.shapes.UnionShape import software.amazon.smithy.model.traits.StreamingTrait import software.amazon.smithy.model.traits.Trait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait inline fun Model.lookup(shapeId: String): T { return this.expectShape(ShapeId.from(shapeId), T::class.java) diff --git a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Strings.kt b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Strings.kt similarity index 91% rename from codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Strings.kt rename to codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Strings.kt index e5788f5499..1fcf080884 100644 --- a/codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/util/Strings.kt +++ b/codegen-core/src/main/kotlin/software/amazon/smithy/rust/codegen/core/util/Strings.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import software.amazon.smithy.utils.CaseUtils import software.amazon.smithy.utils.StringUtils diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/ExecKtTest.kt b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/ExecKtTest.kt similarity index 87% rename from codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/ExecKtTest.kt rename to codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/ExecKtTest.kt index 0629351f2a..aab2b70613 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/ExecKtTest.kt +++ b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/ExecKtTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import io.kotest.assertions.throwables.shouldThrow import org.junit.jupiter.api.Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/MapTest.kt b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/MapTest.kt similarity index 97% rename from codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/MapTest.kt rename to codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/MapTest.kt index 715f46ae10..a38499de36 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/MapTest.kt +++ b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/MapTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import io.kotest.matchers.shouldBe import org.junit.jupiter.api.Test diff --git a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/StringsTest.kt b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/StringsTest.kt similarity index 90% rename from codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/StringsTest.kt rename to codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/StringsTest.kt index cd98ca8214..ff029c0e18 100644 --- a/codegen-client/src/test/kotlin/software/amazon/smithy/rust/codegen/client/util/StringsTest.kt +++ b/codegen-core/src/test/kotlin/software/amazon/smithy/rust/codegen/core/util/StringsTest.kt @@ -3,7 +3,7 @@ * SPDX-License-Identifier: Apache-2.0 */ -package software.amazon.smithy.rust.codegen.client.util +package software.amazon.smithy.rust.codegen.core.util import io.kotest.matchers.shouldBe import org.junit.jupiter.api.Test diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt index 1f894ea4ad..3c37204bd8 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerCodegenVisitor.kt @@ -21,7 +21,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDe import software.amazon.smithy.rust.codegen.client.smithy.generators.BuilderGenerator import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.generators.implBlock -import software.amazon.smithy.rust.codegen.client.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.getTrait import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerEnumGenerator import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerServiceGenerator import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerStructureGenerator diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt index d7f400312f..ba298b536e 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/PythonServerSymbolProvider.kt @@ -22,12 +22,11 @@ import software.amazon.smithy.rust.codegen.client.smithy.SymbolMetadataProvider import software.amazon.smithy.rust.codegen.client.smithy.SymbolVisitor import software.amazon.smithy.rust.codegen.client.smithy.SymbolVisitorConfig import software.amazon.smithy.rust.codegen.client.smithy.expectRustMetadata -import software.amazon.smithy.rust.codegen.client.smithy.shape -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticOutputTrait -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.isStreaming +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticOutputTrait +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.isStreaming import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerRuntimeType /** diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt index f6f8e0bb58..9ab914f01b 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/customizations/PythonServerCodegenDecorator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.customize.RustCodegenDe import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsCustomization import software.amazon.smithy.rust.codegen.client.smithy.generators.LibRsSection import software.amazon.smithy.rust.codegen.client.smithy.generators.ManifestCustomizations -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerRuntimeType import software.amazon.smithy.rust.codegen.server.python.smithy.generators.PythonServerModuleGenerator import software.amazon.smithy.rust.codegen.server.smithy.customizations.AddInternalServerErrorToAllOperationsDecorator diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt index 515bfe764d..a55cb4f23d 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonApplicationGenerator.kt @@ -17,10 +17,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext import software.amazon.smithy.rust.codegen.client.smithy.Errors import software.amazon.smithy.rust.codegen.client.smithy.Inputs import software.amazon.smithy.rust.codegen.client.smithy.Outputs -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt index 970e40745b..68aa315390 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerEnumGenerator.kt @@ -18,7 +18,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerEnumGenerator diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerModuleGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerModuleGenerator.kt index 5e9eca83ff..cf9631047d 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerModuleGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerModuleGenerator.kt @@ -17,7 +17,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.smithy.RustCrate import software.amazon.smithy.rust.codegen.client.smithy.ServerCodegenContext -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency class PythonServerModuleGenerator( diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt index 16a3eed716..c624cb1385 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerOperationHandlerGenerator.kt @@ -12,7 +12,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.asType import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerOperationHandlerGenerator diff --git a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt index a336e4efa4..03e512d12a 100644 --- a/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt +++ b/codegen-server/python/src/main/kotlin/software/amazon/smithy/rust/codegen/server/python/smithy/generators/PythonServerStructureGenerator.kt @@ -21,7 +21,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.generators.StructureGenerator import software.amazon.smithy.rust.codegen.client.smithy.rustType -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait import software.amazon.smithy.rust.codegen.server.python.smithy.PythonServerCargoDependency /** diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt index 921ce79aae..d4cc316244 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/ServerCodegenVisitor.kt @@ -35,9 +35,9 @@ import software.amazon.smithy.rust.codegen.client.smithy.transformers.EventStrea import software.amazon.smithy.rust.codegen.client.smithy.transformers.OperationNormalizer import software.amazon.smithy.rust.codegen.client.smithy.transformers.RecursiveShapeBoxer import software.amazon.smithy.rust.codegen.client.smithy.transformers.RemoveEventStreamOperations -import software.amazon.smithy.rust.codegen.client.util.CommandFailed -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.runCommand +import software.amazon.smithy.rust.codegen.core.util.CommandFailed +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.runCommand import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerEnumGenerator import software.amazon.smithy.rust.codegen.server.smithy.generators.ServerServiceGenerator import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocol diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt index e4fd95a3e6..6ace15f028 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGenerator.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.RustSymbolProvider import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.generators.EnumGenerator -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType open class ServerEnumGenerator( diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGenerator.kt index 625988fd0e..4135ce384a 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGenerator.kt @@ -31,9 +31,9 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rustBlockTemplate import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.rustlang.withBlock import software.amazon.smithy.rust.codegen.client.smithy.RuntimeConfig -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import java.util.* diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationGenerator.kt index 786f611798..d638a3976f 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationGenerator.kt @@ -14,7 +14,7 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rust import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.toPascalCase import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency class ServerOperationGenerator( diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt index 69c7dd1eb2..9e07d4bc48 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationHandlerGenerator.kt @@ -16,10 +16,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.generators.error.errorSymbol import software.amazon.smithy.rust.codegen.client.smithy.transformers.operationErrors -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toPascalCase import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerHttpBoundProtocolGenerator diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt index aa5f25e3c9..e755695377 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGenerator.kt @@ -28,10 +28,10 @@ import software.amazon.smithy.rust.codegen.client.smithy.Outputs import software.amazon.smithy.rust.codegen.client.smithy.RuntimeType import software.amazon.smithy.rust.codegen.client.smithy.generators.CodegenTarget import software.amazon.smithy.rust.codegen.client.smithy.generators.error.errorSymbol -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocol diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt index 7e93e79caa..05bcc1937e 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerServiceGeneratorV2.kt @@ -17,8 +17,8 @@ import software.amazon.smithy.rust.codegen.client.rustlang.rust import software.amazon.smithy.rust.codegen.client.rustlang.rustTemplate import software.amazon.smithy.rust.codegen.client.rustlang.writable import software.amazon.smithy.rust.codegen.client.smithy.CoreCodegenContext -import software.amazon.smithy.rust.codegen.client.util.toPascalCase -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocol diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt index 830f0e0771..237b38aa44 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/protocol/ServerProtocolTestGenerator.kt @@ -44,16 +44,16 @@ import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.Pro import software.amazon.smithy.rust.codegen.client.smithy.generators.protocol.ProtocolSupport import software.amazon.smithy.rust.codegen.client.smithy.transformers.allErrors import software.amazon.smithy.rust.codegen.client.testutil.TokioTest -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.isStreaming -import software.amazon.smithy.rust.codegen.client.util.orNull -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toPascalCase -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.orNull +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerHttpBoundProtocolGenerator diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt index b1b4d86f0d..c93caca67f 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerAwsJson.kt @@ -21,7 +21,7 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.Jso import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.JsonSection import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.JsonSerializerGenerator import software.amazon.smithy.rust.codegen.client.smithy.protocols.serialize.StructuredDataSerializerGenerator -import software.amazon.smithy.rust.codegen.client.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.hasTrait import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerAwsJsonProtocol import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocol diff --git a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt index 391441d791..ce26142120 100644 --- a/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt +++ b/codegen-server/src/main/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/ServerHttpBoundProtocolGenerator.kt @@ -60,20 +60,20 @@ import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpBoundProt import software.amazon.smithy.rust.codegen.client.smithy.protocols.HttpLocation import software.amazon.smithy.rust.codegen.client.smithy.protocols.parse.StructuredDataParserGenerator import software.amazon.smithy.rust.codegen.client.smithy.toOptional -import software.amazon.smithy.rust.codegen.client.smithy.traits.SyntheticInputTrait import software.amazon.smithy.rust.codegen.client.smithy.transformers.operationErrors import software.amazon.smithy.rust.codegen.client.smithy.wrapOptional -import software.amazon.smithy.rust.codegen.client.util.dq -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.findStreamingMember -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.hasStreamingMember -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape -import software.amazon.smithy.rust.codegen.client.util.isStreaming -import software.amazon.smithy.rust.codegen.client.util.outputShape -import software.amazon.smithy.rust.codegen.client.util.toPascalCase -import software.amazon.smithy.rust.codegen.client.util.toSnakeCase +import software.amazon.smithy.rust.codegen.core.smithy.traits.SyntheticInputTrait +import software.amazon.smithy.rust.codegen.core.util.dq +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.findStreamingMember +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.hasStreamingMember +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.isStreaming +import software.amazon.smithy.rust.codegen.core.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.toPascalCase +import software.amazon.smithy.rust.codegen.core.util.toSnakeCase import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.ServerRuntimeType import software.amazon.smithy.rust.codegen.server.smithy.generators.http.ServerRequestBindingGenerator diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt index d419c2b318..a1d1a7d7a8 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/customizations/AdditionalErrorsDecoratorTest.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.model.shapes.OperationShape import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.rust.codegen.client.smithy.transformers.OperationNormalizer import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup class AdditionalErrorsDecoratorTest { private val baseModel = """ diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGeneratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGeneratorTest.kt index e67fa2e1ee..bbd64783cb 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGeneratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerCombinedErrorGeneratorTest.kt @@ -16,7 +16,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilder import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestSymbolProvider class ServerCombinedErrorGeneratorTest { diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGeneratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGeneratorTest.kt index 7e46930827..1f972cb316 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGeneratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerEnumGeneratorTest.kt @@ -12,8 +12,8 @@ import software.amazon.smithy.rust.codegen.client.rustlang.RustWriter import software.amazon.smithy.rust.codegen.client.testutil.TestRuntimeConfig import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest -import software.amazon.smithy.rust.codegen.client.util.expectTrait -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.expectTrait +import software.amazon.smithy.rust.codegen.core.util.lookup import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestSymbolProvider class ServerEnumGeneratorTest { diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGeneratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGeneratorTest.kt index 319b302439..7d3db149da 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGeneratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerHttpSensitivityGeneratorTest.kt @@ -21,8 +21,8 @@ import software.amazon.smithy.rust.codegen.client.testutil.TestWorkspace import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.getTrait -import software.amazon.smithy.rust.codegen.client.util.inputShape +import software.amazon.smithy.rust.codegen.core.util.getTrait +import software.amazon.smithy.rust.codegen.core.util.inputShape import software.amazon.smithy.rust.codegen.server.smithy.ServerCargoDependency import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestSymbolProvider diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGeneratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGeneratorTest.kt index d0b08053aa..ebf9b67ab6 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGeneratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/generators/ServerOperationRegistryGeneratorTest.kt @@ -11,7 +11,7 @@ import software.amazon.smithy.model.knowledge.TopDownIndex import software.amazon.smithy.model.shapes.ServiceShape import software.amazon.smithy.rust.codegen.client.rustlang.RustWriter import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel -import software.amazon.smithy.rust.codegen.client.util.lookup +import software.amazon.smithy.rust.codegen.core.util.lookup import software.amazon.smithy.rust.codegen.server.smithy.generators.protocol.ServerProtocol import software.amazon.smithy.rust.codegen.server.smithy.protocols.ServerProtocolLoader import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestCodegenContext diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/EventStreamTestTools.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/EventStreamTestTools.kt index a441a0886e..868a2898e4 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/EventStreamTestTools.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/EventStreamTestTools.kt @@ -42,9 +42,9 @@ import software.amazon.smithy.rust.codegen.client.testutil.TestWriterDelegator import software.amazon.smithy.rust.codegen.client.testutil.asSmithyModel import software.amazon.smithy.rust.codegen.client.testutil.renderWithModelBuilder import software.amazon.smithy.rust.codegen.client.testutil.testSymbolProvider -import software.amazon.smithy.rust.codegen.client.util.hasTrait -import software.amazon.smithy.rust.codegen.client.util.lookup -import software.amazon.smithy.rust.codegen.client.util.outputShape +import software.amazon.smithy.rust.codegen.core.util.hasTrait +import software.amazon.smithy.rust.codegen.core.util.lookup +import software.amazon.smithy.rust.codegen.core.util.outputShape import software.amazon.smithy.rust.codegen.server.smithy.testutil.serverTestSymbolProvider import java.util.stream.Stream import kotlin.streams.toList diff --git a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt index cd0c5cbae1..97c57d4615 100644 --- a/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt +++ b/codegen-server/src/test/kotlin/software/amazon/smithy/rust/codegen/server/smithy/protocols/serialize/EventStreamMarshallerGeneratorTest.kt @@ -17,7 +17,7 @@ import software.amazon.smithy.rust.codegen.client.testutil.TestRuntimeConfig import software.amazon.smithy.rust.codegen.client.testutil.compileAndTest import software.amazon.smithy.rust.codegen.client.testutil.testRustSettings import software.amazon.smithy.rust.codegen.client.testutil.unitTest -import software.amazon.smithy.rust.codegen.client.util.dq +import software.amazon.smithy.rust.codegen.core.util.dq import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestModels import software.amazon.smithy.rust.codegen.smithy.protocols.EventStreamTestTools