diff --git a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/EndpointBuiltInsDecorator.kt b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/EndpointBuiltInsDecorator.kt index b177b6be73..efcb19f15a 100644 --- a/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/EndpointBuiltInsDecorator.kt +++ b/aws/sdk-codegen/src/main/kotlin/software/amazon/smithy/rustsdk/EndpointBuiltInsDecorator.kt @@ -109,10 +109,12 @@ fun Model.sdkConfigSetter( val builtIn = loadBuiltIn(serviceId, builtInSrc) ?: return null val fieldName = configParameterNameOverride ?: builtIn.name.rustName() + val builtinType = builtIn.type!! val map = - when (builtIn.type!!) { + when (builtinType) { ParameterType.STRING -> writable { rust("|s|s.to_string()") } ParameterType.BOOLEAN -> null + else -> PANIC("needs to handle unimplemented endpoint parameter builtin type: $builtinType") } return if (fieldName == "endpoint_url") {