Loading codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/ClientRustSettings.kt +5 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,8 @@ data class ClientCodegenConfig( val addMessageToErrors: Boolean = defaultAddMessageToErrors, // TODO(EventStream): [CLEANUP] Remove this property when turning on Event Stream for all services val eventStreamAllowList: Set<String> = defaultEventStreamAllowList, // TODO(CrateReorganization): Remove this once we commit to the breaking change val enableNewCrateOrganizationScheme: Boolean = defaultEnableNewCrateOrganizationScheme, ) : CoreCodegenConfig( formatTimeoutSeconds, debugMode, ) { Loading @@ -94,6 +96,7 @@ data class ClientCodegenConfig( private const val defaultIncludeFluentClient = true private const val defaultAddMessageToErrors = true private val defaultEventStreamAllowList: Set<String> = emptySet() private const val defaultEnableNewCrateOrganizationScheme = false fun fromCodegenConfigAndNode(coreCodegenConfig: CoreCodegenConfig, node: Optional<ObjectNode>) = if (node.isPresent) { Loading @@ -106,12 +109,14 @@ data class ClientCodegenConfig( renameExceptions = node.get().getBooleanMemberOrDefault("renameErrors", defaultRenameExceptions), includeFluentClient = node.get().getBooleanMemberOrDefault("includeFluentClient", defaultIncludeFluentClient), addMessageToErrors = node.get().getBooleanMemberOrDefault("addMessageToErrors", defaultAddMessageToErrors), enableNewCrateOrganizationScheme = node.get().getBooleanMemberOrDefault("enableNewCrateOrganizationScheme", false), ) } else { ClientCodegenConfig( formatTimeoutSeconds = coreCodegenConfig.formatTimeoutSeconds, debugMode = coreCodegenConfig.debugMode, eventStreamAllowList = defaultEventStreamAllowList, enableNewCrateOrganizationScheme = defaultEnableNewCrateOrganizationScheme, ) } } Loading Loading
codegen-client/src/main/kotlin/software/amazon/smithy/rust/codegen/client/smithy/ClientRustSettings.kt +5 −0 Original line number Diff line number Diff line Loading @@ -86,6 +86,8 @@ data class ClientCodegenConfig( val addMessageToErrors: Boolean = defaultAddMessageToErrors, // TODO(EventStream): [CLEANUP] Remove this property when turning on Event Stream for all services val eventStreamAllowList: Set<String> = defaultEventStreamAllowList, // TODO(CrateReorganization): Remove this once we commit to the breaking change val enableNewCrateOrganizationScheme: Boolean = defaultEnableNewCrateOrganizationScheme, ) : CoreCodegenConfig( formatTimeoutSeconds, debugMode, ) { Loading @@ -94,6 +96,7 @@ data class ClientCodegenConfig( private const val defaultIncludeFluentClient = true private const val defaultAddMessageToErrors = true private val defaultEventStreamAllowList: Set<String> = emptySet() private const val defaultEnableNewCrateOrganizationScheme = false fun fromCodegenConfigAndNode(coreCodegenConfig: CoreCodegenConfig, node: Optional<ObjectNode>) = if (node.isPresent) { Loading @@ -106,12 +109,14 @@ data class ClientCodegenConfig( renameExceptions = node.get().getBooleanMemberOrDefault("renameErrors", defaultRenameExceptions), includeFluentClient = node.get().getBooleanMemberOrDefault("includeFluentClient", defaultIncludeFluentClient), addMessageToErrors = node.get().getBooleanMemberOrDefault("addMessageToErrors", defaultAddMessageToErrors), enableNewCrateOrganizationScheme = node.get().getBooleanMemberOrDefault("enableNewCrateOrganizationScheme", false), ) } else { ClientCodegenConfig( formatTimeoutSeconds = coreCodegenConfig.formatTimeoutSeconds, debugMode = coreCodegenConfig.debugMode, eventStreamAllowList = defaultEventStreamAllowList, enableNewCrateOrganizationScheme = defaultEnableNewCrateOrganizationScheme, ) } } Loading