diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt index 14231a0ac2bfcb4c0cc13db9420abbd8fcd4abe3..961cdf205693e9cba1b94a3b00d327b84dae4155 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/SymbolVisitor.kt @@ -110,7 +110,7 @@ class SymbolVisitor( private val config: SymbolVisitorConfig = DefaultConfig ) : SymbolProvider, ShapeVisitor { - private val nullableIndex = NullableIndex(model) + private val nullableIndex = NullableIndex.of(model) override fun toSymbol(shape: Shape): Symbol { return shape.accept(this) } diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpTraitBindingGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpTraitBindingGenerator.kt index f2df1281db453727ba40fd8e059a9f685cffc07b..e87a6b8f07aebbc469c37e02811d01bc5cc77b1a 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpTraitBindingGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/HttpTraitBindingGenerator.kt @@ -66,7 +66,7 @@ class HttpTraitBindingGenerator( ) { // TODO: make defaultTimestampFormat configurable private val defaultTimestampFormat = TimestampFormatTrait.Format.EPOCH_SECONDS - private val index = HttpBindingIndex(model) + private val index = HttpBindingIndex.of(model) /** * Generates `update_http_builder` and all necessary dependency functions into the impl block provided by diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt index c835e433310adf9a2d2cc9dc88d40a558e850a95..f40dbfc9c25679f0916e611e0ecc29ff0e9dbb68 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/generators/ServiceGenerator.kt @@ -16,7 +16,7 @@ class ServiceGenerator( private val protocolGenerator: HttpProtocolGenerator, private val config: ProtocolConfig ) { - private val index = TopDownIndex(config.model) + private val index = TopDownIndex.of(config.model) fun render() { val operations = index.getContainedOperations(config.serviceShape) diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt index 7bad44ab4fc1a9a31cc537dca7e4b47001176992..4b2ce7416a04c0235e5a936cff0ab4f518120376 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/AwsRestJson.kt @@ -38,7 +38,7 @@ class AwsRestJsonGenerator( private val model = protocolConfig.model private val symbolProvider = protocolConfig.symbolProvider private val runtimeConfig = protocolConfig.runtimeConfig - private val httpIndex = HttpBindingIndex(model) + private val httpIndex = HttpBindingIndex.of(model) private val requestBuilder = RuntimeType.Http("request::Builder") override fun toHttpRequestImpl( diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt index 73db7e5c38f2d4caf66371f8b78e0001c6d8e749..0294a4f294fcba4caf135e3e046c82a8bbf6ce89 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/protocols/ProtocolLoader.kt @@ -18,7 +18,7 @@ class ProtocolLoader(private val supportedProtocols: Map> { - val protocols: MutableMap = ServiceIndex(model).getProtocols(serviceShape) + val protocols: MutableMap = ServiceIndex.of(model).getProtocols(serviceShape) val matchingProtocols = protocols.keys.mapNotNull { protocolId -> supportedProtocols[protocolId]?.let { protocolId to it } } if (matchingProtocols.isEmpty()) { diff --git a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RecursiveShapeBoxer.kt b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RecursiveShapeBoxer.kt index 50bc6eb4f9d7279d3eaca63940383d92cc30b0ca..361f301fff722c711bca5cbe9a93b237cc6b390a 100644 --- a/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RecursiveShapeBoxer.kt +++ b/codegen/src/main/kotlin/software/amazon/smithy/rust/codegen/smithy/transformers/RecursiveShapeBoxer.kt @@ -43,7 +43,7 @@ object RecursiveShapeBoxer { // 4. Select the member shape in that loop with the earliest shape id // 5. Box it. // (External to this function) Go back to 1. - val index = TopologicalIndex(model) + val index = TopologicalIndex.of(model) val recursiveShapes = index.recursiveShapes val loops = recursiveShapes.map { // Get all the shapes in the closure (represented as Paths