From f832ad106cea3a86c536197dae15a335b4676d42 Mon Sep 17 00:00:00 2001 From: Tony Knapp <5892063+texastony@users.noreply.github.com> Date: Wed, 3 Jul 2024 16:39:50 -0700 Subject: [PATCH] fix(SDK-Java): Generic SDK Error to Opaque & Back (#466) --- .../Model/cmms.smithy | 3 - .../cryptographic-materials-cache.smithy | 1 - .../Model/ddb.smithy | 2 - .../Model/identifiers.smithy | 3 - .../Model/keyrings.smithy | 3 - .../Model/kms.smithy | 3 - .../Model/material-provider.smithy | 2 - .../Model/structures.smithy | 1 - .../Model/suites.smithy | 1 - .../Model/KeyStore.smithy | 1 - .../project.properties | 1 + .../Model/primitives.smithy | 1 - AwsCryptographyPrimitives/project.properties | 1 + .../codegen-patches/java/dafny-4.1.0.patch | 193 - .../codegen-patches/java/dafny-4.2.0.patch | 92 +- .../codegen-patches/java/dafny-4.3.0.patch | 196 - .../codegen-patches/java/dafny-4.4.0.patch | 11113 ++++++++++++++++ ComAmazonawsDynamodb/project.properties | 1 + .../services/dynamodb/internaldafny/Shim.java | 106 +- .../dynamodb/internaldafny/ToDafny.java | 20 +- .../dynamodb/internaldafny/ToNative.java | 45 +- .../codegen-patches/java/dafny-4.1.0.patch | 202 - .../codegen-patches/java/dafny-4.2.0.patch | 85 +- .../codegen-patches/java/dafny-4.3.0.patch | 205 - .../codegen-patches/java/dafny-4.4.0.patch | 8859 ++++++++++++ ComAmazonawsKms/project.properties | 1 + .../runtimes/java/build.gradle.kts | 42 +- .../services/kms/internaldafny/Shim.java | 104 +- .../services/kms/internaldafny/ToDafny.java | 27 +- .../services/kms/internaldafny/ToNative.java | 48 +- .../src/test/java/UnwrapGenericKmsTests.java | 42 + ComAmazonawsKms/test/TestComAmazonawsKms.dfy | 79 +- .../dafny/KeyVectors/Model/key-vectors.smithy | 1 - .../project.properties | 1 + .../runtimes/java/build.gradle.kts | 2 +- smithy-dafny | 2 +- 36 files changed, 20386 insertions(+), 1103 deletions(-) delete mode 100644 ComAmazonawsDynamodb/codegen-patches/java/dafny-4.1.0.patch delete mode 100644 ComAmazonawsDynamodb/codegen-patches/java/dafny-4.3.0.patch create mode 100644 ComAmazonawsDynamodb/codegen-patches/java/dafny-4.4.0.patch delete mode 100644 ComAmazonawsKms/codegen-patches/java/dafny-4.1.0.patch delete mode 100644 ComAmazonawsKms/codegen-patches/java/dafny-4.3.0.patch create mode 100644 ComAmazonawsKms/codegen-patches/java/dafny-4.4.0.patch create mode 100644 ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cmms.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cmms.smithy index a56c5f6c3..f9c12098c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cmms.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cmms.smithy @@ -19,13 +19,11 @@ resource CryptographicMaterialsManager { operations: [GetEncryptionMaterials, DecryptMaterials] } -///////////////// // CMM Structures @reference(resource: CryptographicMaterialsManager) structure CryptographicMaterialsManagerReference {} -///////////////// // CMM Operations operation GetEncryptionMaterials { @@ -113,7 +111,6 @@ structure DecryptMaterialsOutput { decryptionMaterials: DecryptionMaterials } -/////////////////// // CMM Constructors @positional diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy index 37957c803..244411a49 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/cryptographic-materials-cache.smithy @@ -125,7 +125,6 @@ structure EntryAlreadyExists { message: String, } -/////////////////// // Materials Cache Constructors @positional diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/ddb.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/ddb.smithy index 1572a1612..c000b89d5 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/ddb.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/ddb.smithy @@ -4,12 +4,10 @@ use aws.polymorph#reference use com.amazonaws.dynamodb#DynamoDB_20120810 -/////////////////// // Basic structures string DdbTableArn -/////////// // Clients @reference(service: DynamoDB_20120810) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy index 05291f960..25f3ed360 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/identifiers.smithy @@ -1,6 +1,5 @@ namespace aws.cryptography.materialProviders -///////////// // Commitment //= aws-encryption-sdk-specification/framework/commitment-policy.md#supported-format-commitment-policy-enum @@ -53,7 +52,6 @@ union CommitmentPolicy { DBE: DBECommitmentPolicy } -////////// // Padding // Values come from: https://github.com/awslabs/aws-encryption-sdk-specification/blob/master/framework/raw-rsa-keyring.md#supported-padding-schemes @@ -81,7 +79,6 @@ union CommitmentPolicy { ]) string PaddingScheme -////////////////////////// // AES wrapping algorithms @enum([ { diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/keyrings.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/keyrings.smithy index d9903fa70..1bec34677 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/keyrings.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/keyrings.smithy @@ -13,7 +13,6 @@ resource Keyring { operations: [OnEncrypt, OnDecrypt] } -///////////////////// // Keyring Structures @reference(resource: Keyring) @@ -45,7 +44,6 @@ list GrantTokenList { } -///////////////////// // Keyring Operations //= aws-encryption-sdk-specification/framework/keyring-interface.md#onencrypt @@ -89,7 +87,6 @@ structure OnDecryptOutput { } -/////////////////////// // Keyring Constructors @positional diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/kms.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/kms.smithy index f510e3c76..4948fe3b3 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/kms.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/kms.smithy @@ -7,7 +7,6 @@ use aws.polymorph#javadoc use com.amazonaws.kms#TrentService -/////////////////// // Basic structures string KmsKeyId @@ -28,13 +27,11 @@ list AccountIdList { member: AccountId } -////////// // Clients @reference(service: TrentService) structure KmsClientReference {} -/////////////////// // Client Suppliers @extendable diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/material-provider.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/material-provider.smithy index 844753c2e..8548440a4 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/material-provider.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/material-provider.smithy @@ -11,7 +11,6 @@ integer PositiveInteger @range(min: 0) long PositiveLong -///////////// // AwsCryptographicMaterialProviders Creation @aws.polymorph#localService( sdkId: "MaterialProviders", @@ -79,7 +78,6 @@ service AwsCryptographicMaterialProviders { structure MaterialProvidersConfig {} -/////////////////// // Errors @error("client") diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/structures.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/structures.smithy index 8b74f2444..82e5db686 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/structures.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/structures.smithy @@ -10,7 +10,6 @@ string Utf8Bytes //# While these structures will usually be represented as objects, lower level languages MAY represent //# these fields in a less strictly defined way as long as all field properties are still upheld. -/////////////////////////////////// // Encryption Materials // In the future, we have several improvements we can consider here: diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy index 6153c814a..6177d2484 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/suites.smithy @@ -1,6 +1,5 @@ namespace aws.cryptography.materialProviders -/////////////////////////////////// // Algorithm Suites // For now, the actual properties of algorithm suites are only used by internal diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/KeyStore.smithy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/KeyStore.smithy index 60767e0c0..62f06c3cc 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/KeyStore.smithy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/KeyStore.smithy @@ -372,7 +372,6 @@ map EncryptionContext { value: Utf8Bytes, } -/////////////////// // Errors @error("client") diff --git a/AwsCryptographicMaterialProviders/project.properties b/AwsCryptographicMaterialProviders/project.properties index dd7eb37b9..b35126df6 100644 --- a/AwsCryptographicMaterialProviders/project.properties +++ b/AwsCryptographicMaterialProviders/project.properties @@ -1,3 +1,4 @@ # This file stores the top level dafny version information. # All elements of the project need to agree on this version. dafnyVersion=4.2.0 +dafnyRuntimeJavaVersion=4.2.0 diff --git a/AwsCryptographyPrimitives/Model/primitives.smithy b/AwsCryptographyPrimitives/Model/primitives.smithy index f433da9e9..01907ae02 100644 --- a/AwsCryptographyPrimitives/Model/primitives.smithy +++ b/AwsCryptographyPrimitives/Model/primitives.smithy @@ -40,7 +40,6 @@ service AwsCryptographicPrimitives { structure CryptoConfig {} -/////////////////// // Errors @error("client") diff --git a/AwsCryptographyPrimitives/project.properties b/AwsCryptographyPrimitives/project.properties index dd7eb37b9..b35126df6 100644 --- a/AwsCryptographyPrimitives/project.properties +++ b/AwsCryptographyPrimitives/project.properties @@ -1,3 +1,4 @@ # This file stores the top level dafny version information. # All elements of the project need to agree on this version. dafnyVersion=4.2.0 +dafnyRuntimeJavaVersion=4.2.0 diff --git a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.1.0.patch b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.1.0.patch deleted file mode 100644 index e28782cea..000000000 --- a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.1.0.patch +++ /dev/null @@ -1,193 +0,0 @@ -diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -index 04e0401a..c2f87875 100644 ---- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -+++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -@@ -10489,16 +10489,9 @@ public class ToDafny { - } - - public static Error Error(DynamoDbException nativeValue) { -- Option> message; -- message = -- Objects.nonNull(nativeValue.getMessage()) -- ? Option.create_Some( -- software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( -- nativeValue.getMessage() -- ) -- ) -- : Option.create_None(); -- return new Error_Opaque(message); -+ // BEGIN MANUAL EDIT -+ return new Error_Opaque(nativeValue); -+ // END MANUAL EDIT - } - - public static IDynamoDBClient DynamoDB_20120810(DynamoDbClient nativeValue) { -diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -index e3fa41d0..80bf84d1 100644 ---- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -+++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -@@ -109,6 +109,9 @@ import software.amazon.awssdk.services.dynamodb.model.DestinationStatus; - import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationRequest; - import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationResponse; - import software.amazon.awssdk.services.dynamodb.model.DuplicateItemException; -+// BEGIN MANUAL EDIT -+import software.amazon.awssdk.services.dynamodb.model.DynamoDbException; -+// END MANUAL EDIT - import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationRequest; - import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationResponse; - import software.amazon.awssdk.services.dynamodb.model.Endpoint; -@@ -349,6 +352,9 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; -+// BEGIN MANUAL EDIT -+import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_Opaque; -+// END MANUAL EDIT - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; -@@ -422,6 +428,19 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Update - - public class ToNative { - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error(Error_Opaque dafnyValue) { -+ if (dafnyValue.dtor_obj() instanceof DynamoDbException) { -+ return (DynamoDbException) dafnyValue.dtor_obj(); -+ } -+ // Because we only ever put `DynamoDbException` into `Error_Opaque`, -+ // recieving any other type here indicates a bug with the codegen. -+ // Bubble up some error to indicate this failure state. -+ return new IllegalStateException("Unknown error recieved from DynamoDb."); -+ } -+ -+ // END MANUAL EDIT -+ - public static ArchivalSummary ArchivalSummary( - software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary dafnyValue - ) { -@@ -8035,6 +8054,124 @@ public class ToNative { - return builder.build(); - } - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error( -+ software.amazon.cryptography.services.dynamodb.internaldafny.types.Error dafnyValue -+ ) { -+ if (dafnyValue.is_BackupInUseException()) { -+ return ToNative.Error((Error_BackupInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_BackupNotFoundException()) { -+ return ToNative.Error((Error_BackupNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_ConditionalCheckFailedException()) { -+ return ToNative.Error((Error_ConditionalCheckFailedException) dafnyValue); -+ } -+ if (dafnyValue.is_ContinuousBackupsUnavailableException()) { -+ return ToNative.Error( -+ (Error_ContinuousBackupsUnavailableException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_DuplicateItemException()) { -+ return ToNative.Error((Error_DuplicateItemException) dafnyValue); -+ } -+ if (dafnyValue.is_ExportConflictException()) { -+ return ToNative.Error((Error_ExportConflictException) dafnyValue); -+ } -+ if (dafnyValue.is_ExportNotFoundException()) { -+ return ToNative.Error((Error_ExportNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_GlobalTableAlreadyExistsException()) { -+ return ToNative.Error( -+ (Error_GlobalTableAlreadyExistsException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_GlobalTableNotFoundException()) { -+ return ToNative.Error((Error_GlobalTableNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_IdempotentParameterMismatchException()) { -+ return ToNative.Error( -+ (Error_IdempotentParameterMismatchException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_ImportConflictException()) { -+ return ToNative.Error((Error_ImportConflictException) dafnyValue); -+ } -+ if (dafnyValue.is_ImportNotFoundException()) { -+ return ToNative.Error((Error_ImportNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_IndexNotFoundException()) { -+ return ToNative.Error((Error_IndexNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_InternalServerError()) { -+ return ToNative.Error((Error_InternalServerError) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidExportTimeException()) { -+ return ToNative.Error((Error_InvalidExportTimeException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidRestoreTimeException()) { -+ return ToNative.Error((Error_InvalidRestoreTimeException) dafnyValue); -+ } -+ if (dafnyValue.is_ItemCollectionSizeLimitExceededException()) { -+ return ToNative.Error( -+ (Error_ItemCollectionSizeLimitExceededException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_LimitExceededException()) { -+ return ToNative.Error((Error_LimitExceededException) dafnyValue); -+ } -+ if (dafnyValue.is_PointInTimeRecoveryUnavailableException()) { -+ return ToNative.Error( -+ (Error_PointInTimeRecoveryUnavailableException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_ProvisionedThroughputExceededException()) { -+ return ToNative.Error( -+ (Error_ProvisionedThroughputExceededException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_ReplicaAlreadyExistsException()) { -+ return ToNative.Error((Error_ReplicaAlreadyExistsException) dafnyValue); -+ } -+ if (dafnyValue.is_ReplicaNotFoundException()) { -+ return ToNative.Error((Error_ReplicaNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_RequestLimitExceeded()) { -+ return ToNative.Error((Error_RequestLimitExceeded) dafnyValue); -+ } -+ if (dafnyValue.is_ResourceInUseException()) { -+ return ToNative.Error((Error_ResourceInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_ResourceNotFoundException()) { -+ return ToNative.Error((Error_ResourceNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_TableAlreadyExistsException()) { -+ return ToNative.Error((Error_TableAlreadyExistsException) dafnyValue); -+ } -+ if (dafnyValue.is_TableInUseException()) { -+ return ToNative.Error((Error_TableInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_TableNotFoundException()) { -+ return ToNative.Error((Error_TableNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_TransactionCanceledException()) { -+ return ToNative.Error((Error_TransactionCanceledException) dafnyValue); -+ } -+ if (dafnyValue.is_TransactionConflictException()) { -+ return ToNative.Error((Error_TransactionConflictException) dafnyValue); -+ } -+ if (dafnyValue.is_TransactionInProgressException()) { -+ return ToNative.Error((Error_TransactionInProgressException) dafnyValue); -+ } -+ if (dafnyValue.is_Opaque()) { -+ return ToNative.Error((Error_Opaque) dafnyValue); -+ } -+ // TODO This should indicate a codegen bug -+ return new IllegalStateException("Unknown error recieved from DynamoDb."); -+ } -+ -+ // END MANUAL EDIT -+ - public static DynamoDbClient DynamoDB_20120810(IDynamoDBClient dafnyValue) { - return ((Shim) dafnyValue).impl(); - } diff --git a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch index e28782cea..b5db0712e 100644 --- a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch +++ b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch @@ -1,72 +1,8 @@ -diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -index 04e0401a..c2f87875 100644 ---- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -+++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -@@ -10489,16 +10489,9 @@ public class ToDafny { - } - - public static Error Error(DynamoDbException nativeValue) { -- Option> message; -- message = -- Objects.nonNull(nativeValue.getMessage()) -- ? Option.create_Some( -- software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( -- nativeValue.getMessage() -- ) -- ) -- : Option.create_None(); -- return new Error_Opaque(message); -+ // BEGIN MANUAL EDIT -+ return new Error_Opaque(nativeValue); -+ // END MANUAL EDIT - } - - public static IDynamoDBClient DynamoDB_20120810(DynamoDbClient nativeValue) { diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -index e3fa41d0..80bf84d1 100644 +index 171a36d3..3964b7cb 100644 --- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java +++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -@@ -109,6 +109,9 @@ import software.amazon.awssdk.services.dynamodb.model.DestinationStatus; - import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationRequest; - import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationResponse; - import software.amazon.awssdk.services.dynamodb.model.DuplicateItemException; -+// BEGIN MANUAL EDIT -+import software.amazon.awssdk.services.dynamodb.model.DynamoDbException; -+// END MANUAL EDIT - import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationRequest; - import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationResponse; - import software.amazon.awssdk.services.dynamodb.model.Endpoint; -@@ -349,6 +352,9 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; -+// BEGIN MANUAL EDIT -+import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_Opaque; -+// END MANUAL EDIT - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; -@@ -422,6 +428,19 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Update - - public class ToNative { - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error(Error_Opaque dafnyValue) { -+ if (dafnyValue.dtor_obj() instanceof DynamoDbException) { -+ return (DynamoDbException) dafnyValue.dtor_obj(); -+ } -+ // Because we only ever put `DynamoDbException` into `Error_Opaque`, -+ // recieving any other type here indicates a bug with the codegen. -+ // Bubble up some error to indicate this failure state. -+ return new IllegalStateException("Unknown error recieved from DynamoDb."); -+ } -+ -+ // END MANUAL EDIT -+ - public static ArchivalSummary ArchivalSummary( - software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary dafnyValue - ) { -@@ -8035,6 +8054,124 @@ public class ToNative { +@@ -8040,6 +8040,126 @@ public class ToNative { return builder.build(); } @@ -183,7 +119,9 @@ index e3fa41d0..80bf84d1 100644 + return ToNative.Error((Error_Opaque) dafnyValue); + } + // TODO This should indicate a codegen bug -+ return new IllegalStateException("Unknown error recieved from DynamoDb."); ++ return new IllegalStateException( ++ String.format("Unknown error thrown while calling DDB. %s", dafnyValue) ++ ); + } + + // END MANUAL EDIT @@ -191,3 +129,23 @@ index e3fa41d0..80bf84d1 100644 public static DynamoDbClient DynamoDB_20120810(IDynamoDBClient dafnyValue) { return ((Shim) dafnyValue).impl(); } +@@ -8054,17 +8174,9 @@ public class ToNative { + return (DynamoDbException) dafnyValue.dtor_obj(); + } else if (dafnyValue.dtor_obj() instanceof Exception) { + return (RuntimeException) dafnyValue.dtor_obj(); +- } else if (dafnyValue.dtor_message().is_Some()) { +- final String suffix = dafnyValue.dtor_obj() != null +- ? String.format(" Unknown Object: %s", dafnyValue.dtor_obj()) +- : ""; +- final String message = +- software.amazon.smithy.dafny.conversion.ToNative.Simple.String( +- dafnyValue.dtor_message().dtor_value() +- ) + +- suffix; +- return new RuntimeException(message); + } ++ // BEGIN MANUAL EDIT ++ // END MANUAL EDIT + return new IllegalStateException( + String.format( + "Unknown error thrown while calling Amazon DynamoDB. %s", diff --git a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.3.0.patch b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.3.0.patch deleted file mode 100644 index a4a8b9249..000000000 --- a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.3.0.patch +++ /dev/null @@ -1,196 +0,0 @@ -diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -index 04e0401..c2f8787 100644 ---- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -+++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java -@@ -10489,19 +10489,9 @@ public class ToDafny { - } - - public static Error Error(DynamoDbException nativeValue) { -- Option> message; -- message = -- Objects.nonNull(nativeValue.getMessage()) -- ? Option.create_Some( -- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), -- software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( -- nativeValue.getMessage() -- ) -- ) -- : Option.create_None( -- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) -- ); -- return new Error_Opaque(message); -+ // BEGIN MANUAL EDIT -+ return new Error_Opaque(nativeValue); -+ // END MANUAL EDIT - } - - public static IDynamoDBClient DynamoDB_20120810(DynamoDbClient nativeValue) { -diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -index e3fa41d..80bf84d 100644 ---- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -+++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java -@@ -109,6 +109,9 @@ import software.amazon.awssdk.services.dynamodb.model.DestinationStatus; - import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationRequest; - import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationResponse; - import software.amazon.awssdk.services.dynamodb.model.DuplicateItemException; -+// BEGIN MANUAL EDIT -+import software.amazon.awssdk.services.dynamodb.model.DynamoDbException; -+// END MANUAL EDIT - import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationRequest; - import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationResponse; - import software.amazon.awssdk.services.dynamodb.model.Endpoint; -@@ -349,6 +352,9 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; -+// BEGIN MANUAL EDIT -+import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_Opaque; -+// END MANUAL EDIT - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; - import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; -@@ -422,6 +428,19 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Update - - public class ToNative { - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error(Error_Opaque dafnyValue) { -+ if (dafnyValue.dtor_obj() instanceof DynamoDbException) { -+ return (DynamoDbException) dafnyValue.dtor_obj(); -+ } -+ // Because we only ever put `DynamoDbException` into `Error_Opaque`, -+ // recieving any other type here indicates a bug with the codegen. -+ // Bubble up some error to indicate this failure state. -+ return new IllegalStateException("Unknown error recieved from DynamoDb."); -+ } -+ -+ // END MANUAL EDIT -+ - public static ArchivalSummary ArchivalSummary( - software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary dafnyValue - ) { -@@ -8035,6 +8054,124 @@ public class ToNative { - return builder.build(); - } - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error( -+ software.amazon.cryptography.services.dynamodb.internaldafny.types.Error dafnyValue -+ ) { -+ if (dafnyValue.is_BackupInUseException()) { -+ return ToNative.Error((Error_BackupInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_BackupNotFoundException()) { -+ return ToNative.Error((Error_BackupNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_ConditionalCheckFailedException()) { -+ return ToNative.Error((Error_ConditionalCheckFailedException) dafnyValue); -+ } -+ if (dafnyValue.is_ContinuousBackupsUnavailableException()) { -+ return ToNative.Error( -+ (Error_ContinuousBackupsUnavailableException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_DuplicateItemException()) { -+ return ToNative.Error((Error_DuplicateItemException) dafnyValue); -+ } -+ if (dafnyValue.is_ExportConflictException()) { -+ return ToNative.Error((Error_ExportConflictException) dafnyValue); -+ } -+ if (dafnyValue.is_ExportNotFoundException()) { -+ return ToNative.Error((Error_ExportNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_GlobalTableAlreadyExistsException()) { -+ return ToNative.Error( -+ (Error_GlobalTableAlreadyExistsException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_GlobalTableNotFoundException()) { -+ return ToNative.Error((Error_GlobalTableNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_IdempotentParameterMismatchException()) { -+ return ToNative.Error( -+ (Error_IdempotentParameterMismatchException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_ImportConflictException()) { -+ return ToNative.Error((Error_ImportConflictException) dafnyValue); -+ } -+ if (dafnyValue.is_ImportNotFoundException()) { -+ return ToNative.Error((Error_ImportNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_IndexNotFoundException()) { -+ return ToNative.Error((Error_IndexNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_InternalServerError()) { -+ return ToNative.Error((Error_InternalServerError) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidExportTimeException()) { -+ return ToNative.Error((Error_InvalidExportTimeException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidRestoreTimeException()) { -+ return ToNative.Error((Error_InvalidRestoreTimeException) dafnyValue); -+ } -+ if (dafnyValue.is_ItemCollectionSizeLimitExceededException()) { -+ return ToNative.Error( -+ (Error_ItemCollectionSizeLimitExceededException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_LimitExceededException()) { -+ return ToNative.Error((Error_LimitExceededException) dafnyValue); -+ } -+ if (dafnyValue.is_PointInTimeRecoveryUnavailableException()) { -+ return ToNative.Error( -+ (Error_PointInTimeRecoveryUnavailableException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_ProvisionedThroughputExceededException()) { -+ return ToNative.Error( -+ (Error_ProvisionedThroughputExceededException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_ReplicaAlreadyExistsException()) { -+ return ToNative.Error((Error_ReplicaAlreadyExistsException) dafnyValue); -+ } -+ if (dafnyValue.is_ReplicaNotFoundException()) { -+ return ToNative.Error((Error_ReplicaNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_RequestLimitExceeded()) { -+ return ToNative.Error((Error_RequestLimitExceeded) dafnyValue); -+ } -+ if (dafnyValue.is_ResourceInUseException()) { -+ return ToNative.Error((Error_ResourceInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_ResourceNotFoundException()) { -+ return ToNative.Error((Error_ResourceNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_TableAlreadyExistsException()) { -+ return ToNative.Error((Error_TableAlreadyExistsException) dafnyValue); -+ } -+ if (dafnyValue.is_TableInUseException()) { -+ return ToNative.Error((Error_TableInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_TableNotFoundException()) { -+ return ToNative.Error((Error_TableNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_TransactionCanceledException()) { -+ return ToNative.Error((Error_TransactionCanceledException) dafnyValue); -+ } -+ if (dafnyValue.is_TransactionConflictException()) { -+ return ToNative.Error((Error_TransactionConflictException) dafnyValue); -+ } -+ if (dafnyValue.is_TransactionInProgressException()) { -+ return ToNative.Error((Error_TransactionInProgressException) dafnyValue); -+ } -+ if (dafnyValue.is_Opaque()) { -+ return ToNative.Error((Error_Opaque) dafnyValue); -+ } -+ // TODO This should indicate a codegen bug -+ return new IllegalStateException("Unknown error recieved from DynamoDb."); -+ } -+ -+ // END MANUAL EDIT -+ - public static DynamoDbClient DynamoDB_20120810(IDynamoDBClient dafnyValue) { - return ((Shim) dafnyValue).impl(); - } diff --git a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.4.0.patch b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.4.0.patch new file mode 100644 index 000000000..292832263 --- /dev/null +++ b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.4.0.patch @@ -0,0 +1,11113 @@ +diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java +index 635c8cfa..69b00db9 100644 +--- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java ++++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java +@@ -280,35 +280,15 @@ public class Shim implements IDynamoDBClient { + ); + BatchExecuteStatementOutput dafnyResponse = + ToDafny.BatchExecuteStatementOutput(result); +- return Result.create_Success( +- BatchExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- BatchExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- BatchExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- BatchExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- BatchExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -320,47 +300,19 @@ public class Shim implements IDynamoDBClient { + try { + BatchGetItemResponse result = _impl.batchGetItem(converted); + BatchGetItemOutput dafnyResponse = ToDafny.BatchGetItemOutput(result); +- return Result.create_Success( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- BatchGetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -372,53 +324,21 @@ public class Shim implements IDynamoDBClient { + try { + BatchWriteItemResponse result = _impl.batchWriteItem(converted); + BatchWriteItemOutput dafnyResponse = ToDafny.BatchWriteItemOutput(result); +- return Result.create_Success( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ItemCollectionSizeLimitExceededException ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- BatchWriteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -430,59 +350,23 @@ public class Shim implements IDynamoDBClient { + try { + CreateBackupResponse result = _impl.createBackup(converted); + CreateBackupOutput dafnyResponse = ToDafny.CreateBackupOutput(result); +- return Result.create_Success( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (BackupInUseException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ContinuousBackupsUnavailableException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableInUseException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CreateBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -496,47 +380,19 @@ public class Shim implements IDynamoDBClient { + CreateGlobalTableOutput dafnyResponse = ToDafny.CreateGlobalTableOutput( + result + ); +- return Result.create_Success( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (GlobalTableAlreadyExistsException ex) { +- return Result.create_Failure( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CreateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -546,41 +402,17 @@ public class Shim implements IDynamoDBClient { + try { + CreateTableResponse result = _impl.createTable(converted); + CreateTableOutput dafnyResponse = ToDafny.CreateTableOutput(result); +- return Result.create_Success( +- CreateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- CreateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- CreateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- CreateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- CreateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CreateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -592,47 +424,19 @@ public class Shim implements IDynamoDBClient { + try { + DeleteBackupResponse result = _impl.deleteBackup(converted); + DeleteBackupOutput dafnyResponse = ToDafny.DeleteBackupOutput(result); +- return Result.create_Success( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (BackupInUseException ex) { +- return Result.create_Failure( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (BackupNotFoundException ex) { +- return Result.create_Failure( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DeleteBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -642,65 +446,25 @@ public class Shim implements IDynamoDBClient { + try { + DeleteItemResponse result = _impl.deleteItem(converted); + DeleteItemOutput dafnyResponse = ToDafny.DeleteItemOutput(result); +- return Result.create_Success( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ConditionalCheckFailedException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ItemCollectionSizeLimitExceededException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionConflictException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DeleteItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -710,47 +474,19 @@ public class Shim implements IDynamoDBClient { + try { + DeleteTableResponse result = _impl.deleteTable(converted); + DeleteTableOutput dafnyResponse = ToDafny.DeleteTableOutput(result); +- return Result.create_Success( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DeleteTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -762,35 +498,15 @@ public class Shim implements IDynamoDBClient { + try { + DescribeBackupResponse result = _impl.describeBackup(converted); + DescribeBackupOutput dafnyResponse = ToDafny.DescribeBackupOutput(result); +- return Result.create_Success( +- DescribeBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (BackupNotFoundException ex) { +- return Result.create_Failure( +- DescribeBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -806,35 +522,15 @@ public class Shim implements IDynamoDBClient { + _impl.describeContinuousBackups(converted); + DescribeContinuousBackupsOutput dafnyResponse = + ToDafny.DescribeContinuousBackupsOutput(result); +- return Result.create_Success( +- DescribeContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- DescribeContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -850,35 +546,15 @@ public class Shim implements IDynamoDBClient { + _impl.describeContributorInsights(converted); + DescribeContributorInsightsOutput dafnyResponse = + ToDafny.DescribeContributorInsightsOutput(result); +- return Result.create_Success( +- DescribeContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DescribeContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -893,23 +569,11 @@ public class Shim implements IDynamoDBClient { + _impl.describeEndpoints(converted); + DescribeEndpointsResponse dafnyResponse = + ToDafny.DescribeEndpointsResponse(result); +- return Result.create_Success( +- DescribeEndpointsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeEndpointsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeEndpointsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -921,41 +585,17 @@ public class Shim implements IDynamoDBClient { + try { + DescribeExportResponse result = _impl.describeExport(converted); + DescribeExportOutput dafnyResponse = ToDafny.DescribeExportOutput(result); +- return Result.create_Success( +- DescribeExportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ExportNotFoundException ex) { +- return Result.create_Failure( +- DescribeExportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeExportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- DescribeExportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeExportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeExportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -970,35 +610,15 @@ public class Shim implements IDynamoDBClient { + DescribeGlobalTableResponse result = _impl.describeGlobalTable(converted); + DescribeGlobalTableOutput dafnyResponse = + ToDafny.DescribeGlobalTableOutput(result); +- return Result.create_Success( +- DescribeGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (GlobalTableNotFoundException ex) { +- return Result.create_Failure( +- DescribeGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1014,35 +634,15 @@ public class Shim implements IDynamoDBClient { + _impl.describeGlobalTableSettings(converted); + DescribeGlobalTableSettingsOutput dafnyResponse = + ToDafny.DescribeGlobalTableSettingsOutput(result); +- return Result.create_Success( +- DescribeGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (GlobalTableNotFoundException ex) { +- return Result.create_Failure( +- DescribeGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1054,29 +654,13 @@ public class Shim implements IDynamoDBClient { + try { + DescribeImportResponse result = _impl.describeImport(converted); + DescribeImportOutput dafnyResponse = ToDafny.DescribeImportOutput(result); +- return Result.create_Success( +- DescribeImportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ImportNotFoundException ex) { +- return Result.create_Failure( +- DescribeImportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeImportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeImportOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1094,35 +678,15 @@ public class Shim implements IDynamoDBClient { + _impl.describeKinesisStreamingDestination(converted); + DescribeKinesisStreamingDestinationOutput dafnyResponse = + ToDafny.DescribeKinesisStreamingDestinationOutput(result); +- return Result.create_Success( +- DescribeKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DescribeKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1134,29 +698,13 @@ public class Shim implements IDynamoDBClient { + try { + DescribeLimitsResponse result = _impl.describeLimits(converted); + DescribeLimitsOutput dafnyResponse = ToDafny.DescribeLimitsOutput(result); +- return Result.create_Success( +- DescribeLimitsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeLimitsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeLimitsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeLimitsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1168,35 +716,15 @@ public class Shim implements IDynamoDBClient { + try { + DescribeTableResponse result = _impl.describeTable(converted); + DescribeTableOutput dafnyResponse = ToDafny.DescribeTableOutput(result); +- return Result.create_Success( +- DescribeTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DescribeTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1214,35 +742,15 @@ public class Shim implements IDynamoDBClient { + _impl.describeTableReplicaAutoScaling(converted); + DescribeTableReplicaAutoScalingOutput dafnyResponse = + ToDafny.DescribeTableReplicaAutoScalingOutput(result); +- return Result.create_Success( +- DescribeTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DescribeTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1258,35 +766,15 @@ public class Shim implements IDynamoDBClient { + DescribeTimeToLiveOutput dafnyResponse = ToDafny.DescribeTimeToLiveOutput( + result + ); +- return Result.create_Success( +- DescribeTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DescribeTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DescribeTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DescribeTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1304,47 +792,19 @@ public class Shim implements IDynamoDBClient { + _impl.disableKinesisStreamingDestination(converted); + DisableKinesisStreamingDestinationOutput dafnyResponse = + ToDafny.DisableKinesisStreamingDestinationOutput(result); +- return Result.create_Success( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DisableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1362,47 +822,19 @@ public class Shim implements IDynamoDBClient { + _impl.enableKinesisStreamingDestination(converted); + EnableKinesisStreamingDestinationOutput dafnyResponse = + ToDafny.EnableKinesisStreamingDestinationOutput(result); +- return Result.create_Success( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- EnableKinesisStreamingDestinationOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1416,71 +848,27 @@ public class Shim implements IDynamoDBClient { + ExecuteStatementOutput dafnyResponse = ToDafny.ExecuteStatementOutput( + result + ); +- return Result.create_Success( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ConditionalCheckFailedException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DuplicateItemException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ItemCollectionSizeLimitExceededException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionConflictException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ExecuteStatementOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1496,65 +884,25 @@ public class Shim implements IDynamoDBClient { + ExecuteTransactionOutput dafnyResponse = ToDafny.ExecuteTransactionOutput( + result + ); +- return Result.create_Success( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (IdempotentParameterMismatchException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionCanceledException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionInProgressException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ExecuteTransactionOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1570,59 +918,23 @@ public class Shim implements IDynamoDBClient { + ); + ExportTableToPointInTimeOutput dafnyResponse = + ToDafny.ExportTableToPointInTimeOutput(result); +- return Result.create_Success( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ExportConflictException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidExportTimeException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (PointInTimeRecoveryUnavailableException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ExportTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1632,47 +944,19 @@ public class Shim implements IDynamoDBClient { + try { + GetItemResponse result = _impl.getItem(converted); + GetItemOutput dafnyResponse = ToDafny.GetItemOutput(result); +- return Result.create_Success( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GetItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1682,41 +966,17 @@ public class Shim implements IDynamoDBClient { + try { + ImportTableResponse result = _impl.importTable(converted); + ImportTableOutput dafnyResponse = ToDafny.ImportTableOutput(result); +- return Result.create_Success( +- ImportTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ImportConflictException ex) { +- return Result.create_Failure( +- ImportTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- ImportTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- ImportTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ImportTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ImportTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1726,29 +986,13 @@ public class Shim implements IDynamoDBClient { + try { + ListBackupsResponse result = _impl.listBackups(converted); + ListBackupsOutput dafnyResponse = ToDafny.ListBackupsOutput(result); +- return Result.create_Success( +- ListBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ListBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1764,35 +1008,15 @@ public class Shim implements IDynamoDBClient { + ); + ListContributorInsightsOutput dafnyResponse = + ToDafny.ListContributorInsightsOutput(result); +- return Result.create_Success( +- ListContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ListContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- ListContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1802,35 +1026,15 @@ public class Shim implements IDynamoDBClient { + try { + ListExportsResponse result = _impl.listExports(converted); + ListExportsOutput dafnyResponse = ToDafny.ListExportsOutput(result); +- return Result.create_Success( +- ListExportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ListExportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- ListExportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListExportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListExportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1844,29 +1048,13 @@ public class Shim implements IDynamoDBClient { + ListGlobalTablesOutput dafnyResponse = ToDafny.ListGlobalTablesOutput( + result + ); +- return Result.create_Success( +- ListGlobalTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ListGlobalTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListGlobalTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListGlobalTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1876,29 +1064,13 @@ public class Shim implements IDynamoDBClient { + try { + ListImportsResponse result = _impl.listImports(converted); + ListImportsOutput dafnyResponse = ToDafny.ListImportsOutput(result); +- return Result.create_Success( +- ListImportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- ListImportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListImportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListImportsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1908,29 +1080,13 @@ public class Shim implements IDynamoDBClient { + try { + ListTablesResponse result = _impl.listTables(converted); + ListTablesOutput dafnyResponse = ToDafny.ListTablesOutput(result); +- return Result.create_Success( +- ListTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ListTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListTablesOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1946,35 +1102,15 @@ public class Shim implements IDynamoDBClient { + ListTagsOfResourceOutput dafnyResponse = ToDafny.ListTagsOfResourceOutput( + result + ); +- return Result.create_Success( +- ListTagsOfResourceOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ListTagsOfResourceOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- ListTagsOfResourceOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ListTagsOfResourceOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListTagsOfResourceOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1984,65 +1120,25 @@ public class Shim implements IDynamoDBClient { + try { + PutItemResponse result = _impl.putItem(converted); + PutItemOutput dafnyResponse = ToDafny.PutItemOutput(result); +- return Result.create_Success( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ConditionalCheckFailedException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ItemCollectionSizeLimitExceededException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionConflictException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- PutItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2052,47 +1148,19 @@ public class Shim implements IDynamoDBClient { + try { + QueryResponse result = _impl.query(converted); + QueryOutput dafnyResponse = ToDafny.QueryOutput(result); +- return Result.create_Success( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- QueryOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2108,59 +1176,23 @@ public class Shim implements IDynamoDBClient { + ); + RestoreTableFromBackupOutput dafnyResponse = + ToDafny.RestoreTableFromBackupOutput(result); +- return Result.create_Success( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (BackupInUseException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (BackupNotFoundException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableAlreadyExistsException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableInUseException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- RestoreTableFromBackupOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2176,65 +1208,25 @@ public class Shim implements IDynamoDBClient { + _impl.restoreTableToPointInTime(converted); + RestoreTableToPointInTimeOutput dafnyResponse = + ToDafny.RestoreTableToPointInTimeOutput(result); +- return Result.create_Success( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidRestoreTimeException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (PointInTimeRecoveryUnavailableException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableAlreadyExistsException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableInUseException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- RestoreTableToPointInTimeOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2244,47 +1236,19 @@ public class Shim implements IDynamoDBClient { + try { + ScanResponse result = _impl.scan(converted); + ScanOutput dafnyResponse = ToDafny.ScanOutput(result); +- return Result.create_Success( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ScanOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2293,47 +1257,19 @@ public class Shim implements IDynamoDBClient { + TagResourceRequest converted = ToNative.TagResourceInput(input); + try { + _impl.tagResource(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2347,53 +1283,21 @@ public class Shim implements IDynamoDBClient { + TransactGetItemsOutput dafnyResponse = ToDafny.TransactGetItemsOutput( + result + ); +- return Result.create_Success( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionCanceledException ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- TransactGetItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2409,65 +1313,25 @@ public class Shim implements IDynamoDBClient { + TransactWriteItemsOutput dafnyResponse = ToDafny.TransactWriteItemsOutput( + result + ); +- return Result.create_Success( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (IdempotentParameterMismatchException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionCanceledException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionInProgressException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- TransactWriteItemsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2476,47 +1340,19 @@ public class Shim implements IDynamoDBClient { + UntagResourceRequest converted = ToNative.UntagResourceInput(input); + try { + _impl.untagResource(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2532,41 +1368,17 @@ public class Shim implements IDynamoDBClient { + ); + UpdateContinuousBackupsOutput dafnyResponse = + ToDafny.UpdateContinuousBackupsOutput(result); +- return Result.create_Success( +- UpdateContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ContinuousBackupsUnavailableException ex) { +- return Result.create_Failure( +- UpdateContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- UpdateContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateContinuousBackupsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2582,35 +1394,15 @@ public class Shim implements IDynamoDBClient { + _impl.updateContributorInsights(converted); + UpdateContributorInsightsOutput dafnyResponse = + ToDafny.UpdateContributorInsightsOutput(result); +- return Result.create_Success( +- UpdateContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- UpdateContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateContributorInsightsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2624,53 +1416,21 @@ public class Shim implements IDynamoDBClient { + UpdateGlobalTableOutput dafnyResponse = ToDafny.UpdateGlobalTableOutput( + result + ); +- return Result.create_Success( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (GlobalTableNotFoundException ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ReplicaAlreadyExistsException ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ReplicaNotFoundException ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TableNotFoundException ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateGlobalTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2686,59 +1446,23 @@ public class Shim implements IDynamoDBClient { + _impl.updateGlobalTableSettings(converted); + UpdateGlobalTableSettingsOutput dafnyResponse = + ToDafny.UpdateGlobalTableSettingsOutput(result); +- return Result.create_Success( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (GlobalTableNotFoundException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (IndexNotFoundException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ReplicaNotFoundException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateGlobalTableSettingsOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2748,65 +1472,25 @@ public class Shim implements IDynamoDBClient { + try { + UpdateItemResponse result = _impl.updateItem(converted); + UpdateItemOutput dafnyResponse = ToDafny.UpdateItemOutput(result); +- return Result.create_Success( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ConditionalCheckFailedException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ItemCollectionSizeLimitExceededException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ProvisionedThroughputExceededException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (RequestLimitExceededException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TransactionConflictException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateItemOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2816,47 +1500,19 @@ public class Shim implements IDynamoDBClient { + try { + UpdateTableResponse result = _impl.updateTable(converted); + UpdateTableOutput dafnyResponse = ToDafny.UpdateTableOutput(result); +- return Result.create_Success( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateTableOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2872,47 +1528,19 @@ public class Shim implements IDynamoDBClient { + _impl.updateTableReplicaAutoScaling(converted); + UpdateTableReplicaAutoScalingOutput dafnyResponse = + ToDafny.UpdateTableReplicaAutoScalingOutput(result); +- return Result.create_Success( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateTableReplicaAutoScalingOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2926,47 +1554,19 @@ public class Shim implements IDynamoDBClient { + UpdateTimeToLiveOutput dafnyResponse = ToDafny.UpdateTimeToLiveOutput( + result + ); +- return Result.create_Success( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InternalServerErrorException ex) { +- return Result.create_Failure( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceInUseException ex) { +- return Result.create_Failure( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ResourceNotFoundException ex) { +- return Result.create_Failure( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DynamoDbException ex) { +- return Result.create_Failure( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateTimeToLiveOutput._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + } +diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java +index 3a03325a..914b78be 100644 +--- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java ++++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java +@@ -193,7 +193,6 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Condit + import software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionCheck; + import software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionalOperator; + import software.amazon.cryptography.services.dynamodb.internaldafny.types.ConsumedCapacity; +-import software.amazon.cryptography.services.dynamodb.internaldafny.types.ConsumedCapacityUnits; + import software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsDescription; + import software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsStatus; + import software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsAction; +@@ -443,38 +442,29 @@ public class ToDafny { + archivalDateTime = + Objects.nonNull(nativeValue.archivalDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.archivalDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> archivalReason; + archivalReason = + Objects.nonNull(nativeValue.archivalReason()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.archivalReason() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> archivalBackupArn; + archivalBackupArn = + Objects.nonNull(nativeValue.archivalBackupArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.archivalBackupArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ArchivalSummary( + archivalDateTime, + archivalReason, +@@ -652,19 +642,13 @@ public class ToDafny { + Option value; + value = + Objects.nonNull(nativeValue.value()) +- ? Option.create_Some( +- AttributeValue._typeDescriptor(), +- ToDafny.AttributeValue(nativeValue.value()) +- ) +- : Option.create_None(AttributeValue._typeDescriptor()); ++ ? Option.create_Some(ToDafny.AttributeValue(nativeValue.value())) ++ : Option.create_None(); + Option action; + action = + Objects.nonNull(nativeValue.action()) +- ? Option.create_Some( +- AttributeAction._typeDescriptor(), +- ToDafny.AttributeAction(nativeValue.action()) +- ) +- : Option.create_None(AttributeAction._typeDescriptor()); ++ ? Option.create_Some(ToDafny.AttributeAction(nativeValue.action())) ++ : Option.create_None(); + return new AttributeValueUpdate(value, action); + } + +@@ -675,28 +659,22 @@ public class ToDafny { + policyName = + Objects.nonNull(nativeValue.policyName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policyName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + AutoScalingTargetTrackingScalingPolicyConfigurationDescription + > targetTrackingScalingPolicyConfiguration; + targetTrackingScalingPolicyConfiguration = + Objects.nonNull(nativeValue.targetTrackingScalingPolicyConfiguration()) + ? Option.create_Some( +- AutoScalingTargetTrackingScalingPolicyConfigurationDescription._typeDescriptor(), + ToDafny.AutoScalingTargetTrackingScalingPolicyConfigurationDescription( + nativeValue.targetTrackingScalingPolicyConfiguration() + ) + ) +- : Option.create_None( +- AutoScalingTargetTrackingScalingPolicyConfigurationDescription._typeDescriptor() +- ); ++ : Option.create_None(); + return new AutoScalingPolicyDescription( + policyName, + targetTrackingScalingPolicyConfiguration +@@ -724,14 +702,11 @@ public class ToDafny { + policyName = + Objects.nonNull(nativeValue.policyName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policyName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + AutoScalingTargetTrackingScalingPolicyConfigurationUpdate targetTrackingScalingPolicyConfiguration; + targetTrackingScalingPolicyConfiguration = + ToDafny.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( +@@ -749,33 +724,27 @@ public class ToDafny { + Option minimumUnits; + minimumUnits = + Objects.nonNull(nativeValue.minimumUnits()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.minimumUnits())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.minimumUnits())) ++ : Option.create_None(); + Option maximumUnits; + maximumUnits = + Objects.nonNull(nativeValue.maximumUnits()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.maximumUnits())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.maximumUnits())) ++ : Option.create_None(); + Option autoScalingDisabled; + autoScalingDisabled = + Objects.nonNull(nativeValue.autoScalingDisabled()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.autoScalingDisabled()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.autoScalingDisabled())) ++ : Option.create_None(); + Option> autoScalingRoleArn; + autoScalingRoleArn = + Objects.nonNull(nativeValue.autoScalingRoleArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.autoScalingRoleArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > scalingPolicies; +@@ -783,18 +752,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.scalingPolicies()) && + nativeValue.scalingPolicies().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- AutoScalingPolicyDescription._typeDescriptor() +- ), + ToDafny.AutoScalingPolicyDescriptionList( + nativeValue.scalingPolicies() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- AutoScalingPolicyDescription._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new AutoScalingSettingsDescription( + minimumUnits, + maximumUnits, +@@ -810,41 +772,34 @@ public class ToDafny { + Option minimumUnits; + minimumUnits = + Objects.nonNull(nativeValue.minimumUnits()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.minimumUnits())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.minimumUnits())) ++ : Option.create_None(); + Option maximumUnits; + maximumUnits = + Objects.nonNull(nativeValue.maximumUnits()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.maximumUnits())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.maximumUnits())) ++ : Option.create_None(); + Option autoScalingDisabled; + autoScalingDisabled = + Objects.nonNull(nativeValue.autoScalingDisabled()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.autoScalingDisabled()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.autoScalingDisabled())) ++ : Option.create_None(); + Option> autoScalingRoleArn; + autoScalingRoleArn = + Objects.nonNull(nativeValue.autoScalingRoleArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.autoScalingRoleArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option scalingPolicyUpdate; + scalingPolicyUpdate = + Objects.nonNull(nativeValue.scalingPolicyUpdate()) + ? Option.create_Some( +- AutoScalingPolicyUpdate._typeDescriptor(), + ToDafny.AutoScalingPolicyUpdate(nativeValue.scalingPolicyUpdate()) + ) +- : Option.create_None(AutoScalingPolicyUpdate._typeDescriptor()); ++ : Option.create_None(); + return new AutoScalingSettingsUpdate( + minimumUnits, + maximumUnits, +@@ -860,27 +815,18 @@ public class ToDafny { + Option disableScaleIn; + disableScaleIn = + Objects.nonNull(nativeValue.disableScaleIn()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.disableScaleIn()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.disableScaleIn())) ++ : Option.create_None(); + Option scaleInCooldown; + scaleInCooldown = + Objects.nonNull(nativeValue.scaleInCooldown()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.scaleInCooldown()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.scaleInCooldown())) ++ : Option.create_None(); + Option scaleOutCooldown; + scaleOutCooldown = + Objects.nonNull(nativeValue.scaleOutCooldown()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.scaleOutCooldown()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.scaleOutCooldown())) ++ : Option.create_None(); + DafnySequence targetValue; + targetValue = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( +@@ -900,27 +846,18 @@ public class ToDafny { + Option disableScaleIn; + disableScaleIn = + Objects.nonNull(nativeValue.disableScaleIn()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.disableScaleIn()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.disableScaleIn())) ++ : Option.create_None(); + Option scaleInCooldown; + scaleInCooldown = + Objects.nonNull(nativeValue.scaleInCooldown()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.scaleInCooldown()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.scaleInCooldown())) ++ : Option.create_None(); + Option scaleOutCooldown; + scaleOutCooldown = + Objects.nonNull(nativeValue.scaleOutCooldown()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.scaleOutCooldown()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.scaleOutCooldown())) ++ : Option.create_None(); + DafnySequence targetValue; + targetValue = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( +@@ -940,29 +877,24 @@ public class ToDafny { + Option backupDetails; + backupDetails = + Objects.nonNull(nativeValue.backupDetails()) +- ? Option.create_Some( +- BackupDetails._typeDescriptor(), +- ToDafny.BackupDetails(nativeValue.backupDetails()) +- ) +- : Option.create_None(BackupDetails._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BackupDetails(nativeValue.backupDetails())) ++ : Option.create_None(); + Option sourceTableDetails; + sourceTableDetails = + Objects.nonNull(nativeValue.sourceTableDetails()) + ? Option.create_Some( +- SourceTableDetails._typeDescriptor(), + ToDafny.SourceTableDetails(nativeValue.sourceTableDetails()) + ) +- : Option.create_None(SourceTableDetails._typeDescriptor()); ++ : Option.create_None(); + Option sourceTableFeatureDetails; + sourceTableFeatureDetails = + Objects.nonNull(nativeValue.sourceTableFeatureDetails()) + ? Option.create_Some( +- SourceTableFeatureDetails._typeDescriptor(), + ToDafny.SourceTableFeatureDetails( + nativeValue.sourceTableFeatureDetails() + ) + ) +- : Option.create_None(SourceTableFeatureDetails._typeDescriptor()); ++ : Option.create_None(); + return new BackupDescription( + backupDetails, + sourceTableDetails, +@@ -986,11 +918,8 @@ public class ToDafny { + Option backupSizeBytes; + backupSizeBytes = + Objects.nonNull(nativeValue.backupSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.backupSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.backupSizeBytes())) ++ : Option.create_None(); + BackupStatus backupStatus; + backupStatus = ToDafny.BackupStatus(nativeValue.backupStatus()); + BackupType backupType; +@@ -1004,14 +933,11 @@ public class ToDafny { + backupExpiryDateTime = + Objects.nonNull(nativeValue.backupExpiryDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.backupExpiryDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new BackupDetails( + backupArn, + backupName, +@@ -1042,110 +968,80 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tableId; + tableId = + Objects.nonNull(nativeValue.tableId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tableArn; + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> backupArn; + backupArn = + Objects.nonNull(nativeValue.backupArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.backupArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> backupName; + backupName = + Objects.nonNull(nativeValue.backupName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.backupName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> backupCreationDateTime; + backupCreationDateTime = + Objects.nonNull(nativeValue.backupCreationDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.backupCreationDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> backupExpiryDateTime; + backupExpiryDateTime = + Objects.nonNull(nativeValue.backupExpiryDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.backupExpiryDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option backupStatus; + backupStatus = + Objects.nonNull(nativeValue.backupStatus()) +- ? Option.create_Some( +- BackupStatus._typeDescriptor(), +- ToDafny.BackupStatus(nativeValue.backupStatus()) +- ) +- : Option.create_None(BackupStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BackupStatus(nativeValue.backupStatus())) ++ : Option.create_None(); + Option backupType; + backupType = + Objects.nonNull(nativeValue.backupType()) +- ? Option.create_Some( +- BackupType._typeDescriptor(), +- ToDafny.BackupType(nativeValue.backupType()) +- ) +- : Option.create_None(BackupType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BackupType(nativeValue.backupType())) ++ : Option.create_None(); + Option backupSizeBytes; + backupSizeBytes = + Objects.nonNull(nativeValue.backupSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.backupSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.backupSizeBytes())) ++ : Option.create_None(); + return new BackupSummary( + tableName, + tableId, +@@ -1169,10 +1065,9 @@ public class ToDafny { + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + return new BatchExecuteStatementInput(statements, returnConsumedCapacity); + } + +@@ -1184,27 +1079,17 @@ public class ToDafny { + (Objects.nonNull(nativeValue.responses()) && + nativeValue.responses().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- BatchStatementResponse._typeDescriptor() +- ), + ToDafny.PartiQLBatchResponse(nativeValue.responses()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- BatchStatementResponse._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option> consumedCapacity; + consumedCapacity = + (Objects.nonNull(nativeValue.consumedCapacity()) && + nativeValue.consumedCapacity().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), + ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) +- ); ++ : Option.create_None(); + return new BatchExecuteStatementOutput(responses, consumedCapacity); + } + +@@ -1220,10 +1105,9 @@ public class ToDafny { + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + return new BatchGetItemInput(requestItems, returnConsumedCapacity); + } + +@@ -1245,36 +1129,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.responses()) && + nativeValue.responses().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ) +- ), + ToDafny.BatchGetResponseMap(nativeValue.responses()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -1285,29 +1142,17 @@ public class ToDafny { + (Objects.nonNull(nativeValue.unprocessedKeys()) && + nativeValue.unprocessedKeys().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- KeysAndAttributes._typeDescriptor() +- ), + ToDafny.BatchGetRequestMap(nativeValue.unprocessedKeys()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- KeysAndAttributes._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option> consumedCapacity; + consumedCapacity = + (Objects.nonNull(nativeValue.consumedCapacity()) && + nativeValue.consumedCapacity().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), + ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) +- ); ++ : Option.create_None(); + return new BatchGetItemOutput(responses, unprocessedKeys, consumedCapacity); + } + +@@ -1360,22 +1205,18 @@ public class ToDafny { + code = + Objects.nonNull(nativeValue.code()) + ? Option.create_Some( +- BatchStatementErrorCodeEnum._typeDescriptor(), + ToDafny.BatchStatementErrorCodeEnum(nativeValue.code()) + ) +- : Option.create_None(BatchStatementErrorCodeEnum._typeDescriptor()); ++ : Option.create_None(); + Option> message; + message = + Objects.nonNull(nativeValue.message()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.message() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new BatchStatementError(code, message); + } + +@@ -1392,20 +1233,14 @@ public class ToDafny { + (Objects.nonNull(nativeValue.parameters()) && + nativeValue.parameters().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), + ToDafny.PreparedStatementParameters(nativeValue.parameters()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) +- ); ++ : Option.create_None(); + Option consistentRead; + consistentRead = + Objects.nonNull(nativeValue.consistentRead()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.consistentRead()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.consistentRead())) ++ : Option.create_None(); + return new BatchStatementRequest(statement, parameters, consistentRead); + } + +@@ -1415,23 +1250,17 @@ public class ToDafny { + Option error; + error = + Objects.nonNull(nativeValue.error()) +- ? Option.create_Some( +- BatchStatementError._typeDescriptor(), +- ToDafny.BatchStatementError(nativeValue.error()) +- ) +- : Option.create_None(BatchStatementError._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BatchStatementError(nativeValue.error())) ++ : Option.create_None(); + Option> tableName; + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -1440,27 +1269,8 @@ public class ToDafny { + > item; + item = + (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.item()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) ++ : Option.create_None(); + return new BatchStatementResponse(error, tableName, item); + } + +@@ -1476,20 +1286,18 @@ public class ToDafny { + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option returnItemCollectionMetrics; + returnItemCollectionMetrics = + Objects.nonNull(nativeValue.returnItemCollectionMetrics()) + ? Option.create_Some( +- ReturnItemCollectionMetrics._typeDescriptor(), + ToDafny.ReturnItemCollectionMetrics( + nativeValue.returnItemCollectionMetrics() + ) + ) +- : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + return new BatchWriteItemInput( + requestItems, + returnConsumedCapacity, +@@ -1510,18 +1318,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.unprocessedItems()) && + nativeValue.unprocessedItems().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(WriteRequest._typeDescriptor()) +- ), + ToDafny.BatchWriteItemRequestMap(nativeValue.unprocessedItems()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(WriteRequest._typeDescriptor()) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -1532,35 +1331,19 @@ public class ToDafny { + (Objects.nonNull(nativeValue.itemCollectionMetrics()) && + nativeValue.itemCollectionMetrics().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor( +- ItemCollectionMetrics._typeDescriptor() +- ) +- ), + ToDafny.ItemCollectionMetricsPerTable( + nativeValue.itemCollectionMetrics() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor( +- ItemCollectionMetrics._typeDescriptor() +- ) +- ) +- ); ++ : Option.create_None(); + Option> consumedCapacity; + consumedCapacity = + (Objects.nonNull(nativeValue.consumedCapacity()) && + nativeValue.consumedCapacity().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), + ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) +- ); ++ : Option.create_None(); + return new BatchWriteItemOutput( + unprocessedItems, + itemCollectionMetrics, +@@ -1590,25 +1373,19 @@ public class ToDafny { + Option billingMode; + billingMode = + Objects.nonNull(nativeValue.billingMode()) +- ? Option.create_Some( +- BillingMode._typeDescriptor(), +- ToDafny.BillingMode(nativeValue.billingMode()) +- ) +- : Option.create_None(BillingMode._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) ++ : Option.create_None(); + Option< + DafnySequence + > lastUpdateToPayPerRequestDateTime; + lastUpdateToPayPerRequestDateTime = + Objects.nonNull(nativeValue.lastUpdateToPayPerRequestDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastUpdateToPayPerRequestDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new BillingModeSummary( + billingMode, + lastUpdateToPayPerRequestDateTime +@@ -1636,51 +1413,26 @@ public class ToDafny { + > item; + item = + (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.item()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) ++ : Option.create_None(); + Option> code; + code = + Objects.nonNull(nativeValue.code()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.code() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> message; + message = + Objects.nonNull(nativeValue.message()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.message() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new CancellationReason(item, code, message); + } + +@@ -1705,32 +1457,29 @@ public class ToDafny { + readCapacityUnits = + Objects.nonNull(nativeValue.readCapacityUnits()) + ? Option.create_Some( +- ConsumedCapacityUnits._typeDescriptor(), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( + nativeValue.readCapacityUnits() + ) + ) +- : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); ++ : Option.create_None(); + Option> writeCapacityUnits; + writeCapacityUnits = + Objects.nonNull(nativeValue.writeCapacityUnits()) + ? Option.create_Some( +- ConsumedCapacityUnits._typeDescriptor(), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( + nativeValue.writeCapacityUnits() + ) + ) +- : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); ++ : Option.create_None(); + Option> capacityUnits; + capacityUnits = + Objects.nonNull(nativeValue.capacityUnits()) + ? Option.create_Some( +- ConsumedCapacityUnits._typeDescriptor(), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( + nativeValue.capacityUnits() + ) + ) +- : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); ++ : Option.create_None(); + return new Capacity(readCapacityUnits, writeCapacityUnits, capacityUnits); + } + +@@ -1742,12 +1491,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.attributeValueList()) && + nativeValue.attributeValueList().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), + ToDafny.AttributeValueList(nativeValue.attributeValueList()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) +- ); ++ : Option.create_None(); + ComparisonOperator comparisonOperator; + comparisonOperator = + ToDafny.ComparisonOperator(nativeValue.comparisonOperator()); +@@ -1782,20 +1528,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -1806,34 +1543,22 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( +- ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) +- : Option.create_None( +- ReturnValuesOnConditionCheckFailure._typeDescriptor() +- ); ++ : Option.create_None(); + return new ConditionCheck( + key, + tableName, +@@ -1851,52 +1576,43 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> capacityUnits; + capacityUnits = + Objects.nonNull(nativeValue.capacityUnits()) + ? Option.create_Some( +- ConsumedCapacityUnits._typeDescriptor(), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( + nativeValue.capacityUnits() + ) + ) +- : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); ++ : Option.create_None(); + Option> readCapacityUnits; + readCapacityUnits = + Objects.nonNull(nativeValue.readCapacityUnits()) + ? Option.create_Some( +- ConsumedCapacityUnits._typeDescriptor(), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( + nativeValue.readCapacityUnits() + ) + ) +- : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); ++ : Option.create_None(); + Option> writeCapacityUnits; + writeCapacityUnits = + Objects.nonNull(nativeValue.writeCapacityUnits()) + ? Option.create_Some( +- ConsumedCapacityUnits._typeDescriptor(), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( + nativeValue.writeCapacityUnits() + ) + ) +- : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); ++ : Option.create_None(); + Option table; + table = + Objects.nonNull(nativeValue.table()) +- ? Option.create_Some( +- Capacity._typeDescriptor(), +- ToDafny.Capacity(nativeValue.table()) +- ) +- : Option.create_None(Capacity._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Capacity(nativeValue.table())) ++ : Option.create_None(); + Option< + DafnyMap, ? extends Capacity> + > localSecondaryIndexes; +@@ -1904,20 +1620,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.localSecondaryIndexes()) && + nativeValue.localSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- Capacity._typeDescriptor() +- ), + ToDafny.SecondaryIndexesCapacityMap( + nativeValue.localSecondaryIndexes() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- Capacity._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap, ? extends Capacity> + > globalSecondaryIndexes; +@@ -1925,20 +1632,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- Capacity._typeDescriptor() +- ), + ToDafny.SecondaryIndexesCapacityMap( + nativeValue.globalSecondaryIndexes() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- Capacity._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new ConsumedCapacity( + tableName, + capacityUnits, +@@ -1974,12 +1672,11 @@ public class ToDafny { + pointInTimeRecoveryDescription = + Objects.nonNull(nativeValue.pointInTimeRecoveryDescription()) + ? Option.create_Some( +- PointInTimeRecoveryDescription._typeDescriptor(), + ToDafny.PointInTimeRecoveryDescription( + nativeValue.pointInTimeRecoveryDescription() + ) + ) +- : Option.create_None(PointInTimeRecoveryDescription._typeDescriptor()); ++ : Option.create_None(); + return new ContinuousBackupsDescription( + continuousBackupsStatus, + pointInTimeRecoveryDescription +@@ -2017,36 +1714,29 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> indexName; + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option contributorInsightsStatus; + contributorInsightsStatus = + Objects.nonNull(nativeValue.contributorInsightsStatus()) + ? Option.create_Some( +- ContributorInsightsStatus._typeDescriptor(), + ToDafny.ContributorInsightsStatus( + nativeValue.contributorInsightsStatus() + ) + ) +- : Option.create_None(ContributorInsightsStatus._typeDescriptor()); ++ : Option.create_None(); + return new ContributorInsightsSummary( + tableName, + indexName, +@@ -2076,11 +1766,8 @@ public class ToDafny { + Option backupDetails; + backupDetails = + Objects.nonNull(nativeValue.backupDetails()) +- ? Option.create_Some( +- BackupDetails._typeDescriptor(), +- ToDafny.BackupDetails(nativeValue.backupDetails()) +- ) +- : Option.create_None(BackupDetails._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BackupDetails(nativeValue.backupDetails())) ++ : Option.create_None(); + return new CreateBackupOutput(backupDetails); + } + +@@ -2100,10 +1787,9 @@ public class ToDafny { + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) +- : Option.create_None(ProvisionedThroughput._typeDescriptor()); ++ : Option.create_None(); + return new CreateGlobalSecondaryIndexAction( + indexName, + keySchema, +@@ -2132,10 +1818,9 @@ public class ToDafny { + globalTableDescription = + Objects.nonNull(nativeValue.globalTableDescription()) + ? Option.create_Some( +- GlobalTableDescription._typeDescriptor(), + ToDafny.GlobalTableDescription(nativeValue.globalTableDescription()) + ) +- : Option.create_None(GlobalTableDescription._typeDescriptor()); ++ : Option.create_None(); + return new CreateGlobalTableOutput(globalTableDescription); + } + +@@ -2162,24 +1847,20 @@ public class ToDafny { + kMSMasterKeyId = + Objects.nonNull(nativeValue.kmsMasterKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.kmsMasterKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option provisionedThroughputOverride; + provisionedThroughputOverride = + Objects.nonNull(nativeValue.provisionedThroughputOverride()) + ? Option.create_Some( +- ProvisionedThroughputOverride._typeDescriptor(), + ToDafny.ProvisionedThroughputOverride( + nativeValue.provisionedThroughputOverride() + ) + ) +- : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexes; +@@ -2187,26 +1868,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaGlobalSecondaryIndex._typeDescriptor() +- ), + ToDafny.ReplicaGlobalSecondaryIndexList( + nativeValue.globalSecondaryIndexes() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicaGlobalSecondaryIndex._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option tableClassOverride; + tableClassOverride = + Objects.nonNull(nativeValue.tableClassOverride()) + ? Option.create_Some( +- TableClass._typeDescriptor(), + ToDafny.TableClass(nativeValue.tableClassOverride()) + ) +- : Option.create_None(TableClass._typeDescriptor()); ++ : Option.create_None(); + return new CreateReplicationGroupMemberAction( + regionName, + kMSMasterKeyId, +@@ -2234,12 +1907,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.localSecondaryIndexes()) && + nativeValue.localSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(LocalSecondaryIndex._typeDescriptor()), + ToDafny.LocalSecondaryIndexList(nativeValue.localSecondaryIndexes()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(LocalSecondaryIndex._typeDescriptor()) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexes; +@@ -2247,62 +1917,45 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()), + ToDafny.GlobalSecondaryIndexList(nativeValue.globalSecondaryIndexes()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()) +- ); ++ : Option.create_None(); + Option billingMode; + billingMode = + Objects.nonNull(nativeValue.billingMode()) +- ? Option.create_Some( +- BillingMode._typeDescriptor(), +- ToDafny.BillingMode(nativeValue.billingMode()) +- ) +- : Option.create_None(BillingMode._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) ++ : Option.create_None(); + Option provisionedThroughput; + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) +- : Option.create_None(ProvisionedThroughput._typeDescriptor()); ++ : Option.create_None(); + Option streamSpecification; + streamSpecification = + Objects.nonNull(nativeValue.streamSpecification()) + ? Option.create_Some( +- StreamSpecification._typeDescriptor(), + ToDafny.StreamSpecification(nativeValue.streamSpecification()) + ) +- : Option.create_None(StreamSpecification._typeDescriptor()); ++ : Option.create_None(); + Option sSESpecification; + sSESpecification = + Objects.nonNull(nativeValue.sseSpecification()) + ? Option.create_Some( +- SSESpecification._typeDescriptor(), + ToDafny.SSESpecification(nativeValue.sseSpecification()) + ) +- : Option.create_None(SSESpecification._typeDescriptor()); ++ : Option.create_None(); + Option> tags; + tags = + (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()), +- ToDafny.TagList(nativeValue.tags()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) ++ : Option.create_None(); + Option tableClass; + tableClass = + Objects.nonNull(nativeValue.tableClass()) +- ? Option.create_Some( +- TableClass._typeDescriptor(), +- ToDafny.TableClass(nativeValue.tableClass()) +- ) +- : Option.create_None(TableClass._typeDescriptor()); ++ ? Option.create_Some(ToDafny.TableClass(nativeValue.tableClass())) ++ : Option.create_None(); + return new CreateTableInput( + attributeDefinitions, + tableName, +@@ -2325,10 +1978,9 @@ public class ToDafny { + tableDescription = + Objects.nonNull(nativeValue.tableDescription()) + ? Option.create_Some( +- TableDescription._typeDescriptor(), + ToDafny.TableDescription(nativeValue.tableDescription()) + ) +- : Option.create_None(TableDescription._typeDescriptor()); ++ : Option.create_None(); + return new CreateTableOutput(tableDescription); + } + +@@ -2349,31 +2001,19 @@ public class ToDafny { + delimiter = + Objects.nonNull(nativeValue.delimiter()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.delimiter() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnySequence> + > headerList; + headerList = + (Objects.nonNull(nativeValue.headerList()) && + nativeValue.headerList().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.CsvHeaderList(nativeValue.headerList()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.CsvHeaderList(nativeValue.headerList())) ++ : Option.create_None(); + return new CsvOptions(delimiter, headerList); + } + +@@ -2394,14 +2034,11 @@ public class ToDafny { + conditionExpression = + Objects.nonNull(nativeValue.conditionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.conditionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -2412,20 +2049,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -2436,34 +2064,22 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( +- ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) +- : Option.create_None( +- ReturnValuesOnConditionCheckFailure._typeDescriptor() +- ); ++ : Option.create_None(); + return new Delete( + key, + tableName, +@@ -2492,10 +2108,9 @@ public class ToDafny { + backupDescription = + Objects.nonNull(nativeValue.backupDescription()) + ? Option.create_Some( +- BackupDescription._typeDescriptor(), + ToDafny.BackupDescription(nativeValue.backupDescription()) + ) +- : Option.create_None(BackupDescription._typeDescriptor()); ++ : Option.create_None(); + return new DeleteBackupOutput(backupDescription); + } + +@@ -2531,64 +2146,46 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expected()) && + nativeValue.expected().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- ExpectedAttributeValue._typeDescriptor() +- ), + ToDafny.ExpectedAttributeMap(nativeValue.expected()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- ExpectedAttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option conditionalOperator; + conditionalOperator = + Objects.nonNull(nativeValue.conditionalOperator()) + ? Option.create_Some( +- ConditionalOperator._typeDescriptor(), + ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) + ) +- : Option.create_None(ConditionalOperator._typeDescriptor()); ++ : Option.create_None(); + Option returnValues; + returnValues = + Objects.nonNull(nativeValue.returnValues()) +- ? Option.create_Some( +- ReturnValue._typeDescriptor(), +- ToDafny.ReturnValue(nativeValue.returnValues()) +- ) +- : Option.create_None(ReturnValue._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ReturnValue(nativeValue.returnValues())) ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option returnItemCollectionMetrics; + returnItemCollectionMetrics = + Objects.nonNull(nativeValue.returnItemCollectionMetrics()) + ? Option.create_Some( +- ReturnItemCollectionMetrics._typeDescriptor(), + ToDafny.ReturnItemCollectionMetrics( + nativeValue.returnItemCollectionMetrics() + ) + ) +- : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + Option> conditionExpression; + conditionExpression = + Objects.nonNull(nativeValue.conditionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.conditionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -2599,20 +2196,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -2623,20 +2211,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new DeleteItemInput( + tableName, + key, +@@ -2663,43 +2242,22 @@ public class ToDafny { + attributes = + (Objects.nonNull(nativeValue.attributes()) && + nativeValue.attributes().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.attributes()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.attributes())) ++ : Option.create_None(); + Option consumedCapacity; + consumedCapacity = + Objects.nonNull(nativeValue.consumedCapacity()) + ? Option.create_Some( +- ConsumedCapacity._typeDescriptor(), + ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) + ) +- : Option.create_None(ConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option itemCollectionMetrics; + itemCollectionMetrics = + Objects.nonNull(nativeValue.itemCollectionMetrics()) + ? Option.create_Some( +- ItemCollectionMetrics._typeDescriptor(), + ToDafny.ItemCollectionMetrics(nativeValue.itemCollectionMetrics()) + ) +- : Option.create_None(ItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + return new DeleteItemOutput( + attributes, + consumedCapacity, +@@ -2758,10 +2316,9 @@ public class ToDafny { + tableDescription = + Objects.nonNull(nativeValue.tableDescription()) + ? Option.create_Some( +- TableDescription._typeDescriptor(), + ToDafny.TableDescription(nativeValue.tableDescription()) + ) +- : Option.create_None(TableDescription._typeDescriptor()); ++ : Option.create_None(); + return new DeleteTableOutput(tableDescription); + } + +@@ -2783,10 +2340,9 @@ public class ToDafny { + backupDescription = + Objects.nonNull(nativeValue.backupDescription()) + ? Option.create_Some( +- BackupDescription._typeDescriptor(), + ToDafny.BackupDescription(nativeValue.backupDescription()) + ) +- : Option.create_None(BackupDescription._typeDescriptor()); ++ : Option.create_None(); + return new DescribeBackupOutput(backupDescription); + } + +@@ -2808,12 +2364,11 @@ public class ToDafny { + continuousBackupsDescription = + Objects.nonNull(nativeValue.continuousBackupsDescription()) + ? Option.create_Some( +- ContinuousBackupsDescription._typeDescriptor(), + ToDafny.ContinuousBackupsDescription( + nativeValue.continuousBackupsDescription() + ) + ) +- : Option.create_None(ContinuousBackupsDescription._typeDescriptor()); ++ : Option.create_None(); + return new DescribeContinuousBackupsOutput(continuousBackupsDescription); + } + +@@ -2829,14 +2384,11 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new DescribeContributorInsightsInput(tableName, indexName); + } + +@@ -2847,26 +2399,20 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> indexName; + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnySequence> + > contributorInsightsRuleList; +@@ -2874,48 +2420,36 @@ public class ToDafny { + (Objects.nonNull(nativeValue.contributorInsightsRuleList()) && + nativeValue.contributorInsightsRuleList().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ContributorInsightsRuleList( + nativeValue.contributorInsightsRuleList() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option contributorInsightsStatus; + contributorInsightsStatus = + Objects.nonNull(nativeValue.contributorInsightsStatus()) + ? Option.create_Some( +- ContributorInsightsStatus._typeDescriptor(), + ToDafny.ContributorInsightsStatus( + nativeValue.contributorInsightsStatus() + ) + ) +- : Option.create_None(ContributorInsightsStatus._typeDescriptor()); ++ : Option.create_None(); + Option> lastUpdateDateTime; + lastUpdateDateTime = + Objects.nonNull(nativeValue.lastUpdateDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastUpdateDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option failureException; + failureException = + Objects.nonNull(nativeValue.failureException()) + ? Option.create_Some( +- FailureException._typeDescriptor(), + ToDafny.FailureException(nativeValue.failureException()) + ) +- : Option.create_None(FailureException._typeDescriptor()); ++ : Option.create_None(); + return new DescribeContributorInsightsOutput( + tableName, + indexName, +@@ -2958,10 +2492,9 @@ public class ToDafny { + exportDescription = + Objects.nonNull(nativeValue.exportDescription()) + ? Option.create_Some( +- ExportDescription._typeDescriptor(), + ToDafny.ExportDescription(nativeValue.exportDescription()) + ) +- : Option.create_None(ExportDescription._typeDescriptor()); ++ : Option.create_None(); + return new DescribeExportOutput(exportDescription); + } + +@@ -2983,10 +2516,9 @@ public class ToDafny { + globalTableDescription = + Objects.nonNull(nativeValue.globalTableDescription()) + ? Option.create_Some( +- GlobalTableDescription._typeDescriptor(), + ToDafny.GlobalTableDescription(nativeValue.globalTableDescription()) + ) +- : Option.create_None(GlobalTableDescription._typeDescriptor()); ++ : Option.create_None(); + return new DescribeGlobalTableOutput(globalTableDescription); + } + +@@ -3008,29 +2540,19 @@ public class ToDafny { + globalTableName = + Objects.nonNull(nativeValue.globalTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.globalTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> replicaSettings; + replicaSettings = + (Objects.nonNull(nativeValue.replicaSettings()) && + nativeValue.replicaSettings().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaSettingsDescription._typeDescriptor() +- ), + ToDafny.ReplicaSettingsDescriptionList(nativeValue.replicaSettings()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicaSettingsDescription._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new DescribeGlobalTableSettingsOutput( + globalTableName, + replicaSettings +@@ -3075,14 +2597,11 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > kinesisDataStreamDestinations; +@@ -3090,18 +2609,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.kinesisDataStreamDestinations()) && + nativeValue.kinesisDataStreamDestinations().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- KinesisDataStreamDestination._typeDescriptor() +- ), + ToDafny.KinesisDataStreamDestinations( + nativeValue.kinesisDataStreamDestinations() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- KinesisDataStreamDestination._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new DescribeKinesisStreamingDestinationOutput( + tableName, + kinesisDataStreamDestinations +@@ -3120,35 +2632,23 @@ public class ToDafny { + Option accountMaxReadCapacityUnits; + accountMaxReadCapacityUnits = + Objects.nonNull(nativeValue.accountMaxReadCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.accountMaxReadCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.accountMaxReadCapacityUnits())) ++ : Option.create_None(); + Option accountMaxWriteCapacityUnits; + accountMaxWriteCapacityUnits = + Objects.nonNull(nativeValue.accountMaxWriteCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.accountMaxWriteCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.accountMaxWriteCapacityUnits())) ++ : Option.create_None(); + Option tableMaxReadCapacityUnits; + tableMaxReadCapacityUnits = + Objects.nonNull(nativeValue.tableMaxReadCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.tableMaxReadCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.tableMaxReadCapacityUnits())) ++ : Option.create_None(); + Option tableMaxWriteCapacityUnits; + tableMaxWriteCapacityUnits = + Objects.nonNull(nativeValue.tableMaxWriteCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.tableMaxWriteCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.tableMaxWriteCapacityUnits())) ++ : Option.create_None(); + return new DescribeLimitsOutput( + accountMaxReadCapacityUnits, + accountMaxWriteCapacityUnits, +@@ -3174,11 +2674,8 @@ public class ToDafny { + Option table; + table = + Objects.nonNull(nativeValue.table()) +- ? Option.create_Some( +- TableDescription._typeDescriptor(), +- ToDafny.TableDescription(nativeValue.table()) +- ) +- : Option.create_None(TableDescription._typeDescriptor()); ++ ? Option.create_Some(ToDafny.TableDescription(nativeValue.table())) ++ : Option.create_None(); + return new DescribeTableOutput(table); + } + +@@ -3200,12 +2697,11 @@ public class ToDafny { + tableAutoScalingDescription = + Objects.nonNull(nativeValue.tableAutoScalingDescription()) + ? Option.create_Some( +- TableAutoScalingDescription._typeDescriptor(), + ToDafny.TableAutoScalingDescription( + nativeValue.tableAutoScalingDescription() + ) + ) +- : Option.create_None(TableAutoScalingDescription._typeDescriptor()); ++ : Option.create_None(); + return new DescribeTableReplicaAutoScalingOutput( + tableAutoScalingDescription + ); +@@ -3229,10 +2725,9 @@ public class ToDafny { + timeToLiveDescription = + Objects.nonNull(nativeValue.timeToLiveDescription()) + ? Option.create_Some( +- TimeToLiveDescription._typeDescriptor(), + ToDafny.TimeToLiveDescription(nativeValue.timeToLiveDescription()) + ) +- : Option.create_None(TimeToLiveDescription._typeDescriptor()); ++ : Option.create_None(); + return new DescribeTimeToLiveOutput(timeToLiveDescription); + } + +@@ -3259,34 +2754,27 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> streamArn; + streamArn = + Objects.nonNull(nativeValue.streamArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.streamArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option destinationStatus; + destinationStatus = + Objects.nonNull(nativeValue.destinationStatus()) + ? Option.create_Some( +- DestinationStatus._typeDescriptor(), + ToDafny.DestinationStatus(nativeValue.destinationStatus()) + ) +- : Option.create_None(DestinationStatus._typeDescriptor()); ++ : Option.create_None(); + return new DisableKinesisStreamingDestinationOutput( + tableName, + streamArn, +@@ -3317,34 +2805,27 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> streamArn; + streamArn = + Objects.nonNull(nativeValue.streamArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.streamArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option destinationStatus; + destinationStatus = + Objects.nonNull(nativeValue.destinationStatus()) + ? Option.create_Some( +- DestinationStatus._typeDescriptor(), + ToDafny.DestinationStatus(nativeValue.destinationStatus()) + ) +- : Option.create_None(DestinationStatus._typeDescriptor()); ++ : Option.create_None(); + return new EnableKinesisStreamingDestinationOutput( + tableName, + streamArn, +@@ -3388,45 +2869,35 @@ public class ToDafny { + (Objects.nonNull(nativeValue.parameters()) && + nativeValue.parameters().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), + ToDafny.PreparedStatementParameters(nativeValue.parameters()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) +- ); ++ : Option.create_None(); + Option consistentRead; + consistentRead = + Objects.nonNull(nativeValue.consistentRead()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.consistentRead()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.consistentRead())) ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + return new ExecuteStatementInput( + statement, + parameters, +@@ -3450,51 +2921,24 @@ public class ToDafny { + > items; + items = + (Objects.nonNull(nativeValue.items()) && nativeValue.items().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ), +- ToDafny.ItemList(nativeValue.items()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ) +- ); ++ ? Option.create_Some(ToDafny.ItemList(nativeValue.items())) ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option consumedCapacity; + consumedCapacity = + Objects.nonNull(nativeValue.consumedCapacity()) + ? Option.create_Some( +- ConsumedCapacity._typeDescriptor(), + ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) + ) +- : Option.create_None(ConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -3504,27 +2948,8 @@ public class ToDafny { + lastEvaluatedKey = + (Objects.nonNull(nativeValue.lastEvaluatedKey()) && + nativeValue.lastEvaluatedKey().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.Key(nativeValue.lastEvaluatedKey()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.Key(nativeValue.lastEvaluatedKey())) ++ : Option.create_None(); + return new ExecuteStatementOutput( + items, + nextToken, +@@ -3543,22 +2968,18 @@ public class ToDafny { + clientRequestToken = + Objects.nonNull(nativeValue.clientRequestToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.clientRequestToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + return new ExecuteTransactionInput( + transactStatements, + clientRequestToken, +@@ -3573,24 +2994,16 @@ public class ToDafny { + responses = + (Objects.nonNull(nativeValue.responses()) && + nativeValue.responses().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()), +- ToDafny.ItemResponseList(nativeValue.responses()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.ItemResponseList(nativeValue.responses())) ++ : Option.create_None(); + Option> consumedCapacity; + consumedCapacity = + (Objects.nonNull(nativeValue.consumedCapacity()) && + nativeValue.consumedCapacity().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), + ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) +- ); ++ : Option.create_None(); + return new ExecuteTransactionOutput(responses, consumedCapacity); + } + +@@ -3616,35 +3029,28 @@ public class ToDafny { + Option value; + value = + Objects.nonNull(nativeValue.value()) +- ? Option.create_Some( +- AttributeValue._typeDescriptor(), +- ToDafny.AttributeValue(nativeValue.value()) +- ) +- : Option.create_None(AttributeValue._typeDescriptor()); ++ ? Option.create_Some(ToDafny.AttributeValue(nativeValue.value())) ++ : Option.create_None(); + Option exists; + exists = + Objects.nonNull(nativeValue.exists()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.exists())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.exists())) ++ : Option.create_None(); + Option comparisonOperator; + comparisonOperator = + Objects.nonNull(nativeValue.comparisonOperator()) + ? Option.create_Some( +- ComparisonOperator._typeDescriptor(), + ToDafny.ComparisonOperator(nativeValue.comparisonOperator()) + ) +- : Option.create_None(ComparisonOperator._typeDescriptor()); ++ : Option.create_None(); + Option> attributeValueList; + attributeValueList = + (Objects.nonNull(nativeValue.attributeValueList()) && + nativeValue.attributeValueList().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), + ToDafny.AttributeValueList(nativeValue.attributeValueList()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) +- ); ++ : Option.create_None(); + return new ExpectedAttributeValue( + value, + exists, +@@ -3660,207 +3066,155 @@ public class ToDafny { + exportArn = + Objects.nonNull(nativeValue.exportArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option exportStatus; + exportStatus = + Objects.nonNull(nativeValue.exportStatus()) +- ? Option.create_Some( +- ExportStatus._typeDescriptor(), +- ToDafny.ExportStatus(nativeValue.exportStatus()) +- ) +- : Option.create_None(ExportStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ExportStatus(nativeValue.exportStatus())) ++ : Option.create_None(); + Option> startTime; + startTime = + Objects.nonNull(nativeValue.startTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.startTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> endTime; + endTime = + Objects.nonNull(nativeValue.endTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.endTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> exportManifest; + exportManifest = + Objects.nonNull(nativeValue.exportManifest()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportManifest() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tableArn; + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tableId; + tableId = + Objects.nonNull(nativeValue.tableId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> exportTime; + exportTime = + Objects.nonNull(nativeValue.exportTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> clientToken; + clientToken = + Objects.nonNull(nativeValue.clientToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.clientToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> s3Bucket; + s3Bucket = + Objects.nonNull(nativeValue.s3Bucket()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3Bucket() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> s3BucketOwner; + s3BucketOwner = + Objects.nonNull(nativeValue.s3BucketOwner()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3BucketOwner() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> s3Prefix; + s3Prefix = + Objects.nonNull(nativeValue.s3Prefix()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3Prefix() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option s3SseAlgorithm; + s3SseAlgorithm = + Objects.nonNull(nativeValue.s3SseAlgorithm()) + ? Option.create_Some( +- S3SseAlgorithm._typeDescriptor(), + ToDafny.S3SseAlgorithm(nativeValue.s3SseAlgorithm()) + ) +- : Option.create_None(S3SseAlgorithm._typeDescriptor()); ++ : Option.create_None(); + Option> s3SseKmsKeyId; + s3SseKmsKeyId = + Objects.nonNull(nativeValue.s3SseKmsKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3SseKmsKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> failureCode; + failureCode = + Objects.nonNull(nativeValue.failureCode()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.failureCode() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> failureMessage; + failureMessage = + Objects.nonNull(nativeValue.failureMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.failureMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option exportFormat; + exportFormat = + Objects.nonNull(nativeValue.exportFormat()) +- ? Option.create_Some( +- ExportFormat._typeDescriptor(), +- ToDafny.ExportFormat(nativeValue.exportFormat()) +- ) +- : Option.create_None(ExportFormat._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ExportFormat(nativeValue.exportFormat())) ++ : Option.create_None(); + Option billedSizeBytes; + billedSizeBytes = + Objects.nonNull(nativeValue.billedSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.billedSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.billedSizeBytes())) ++ : Option.create_None(); + Option itemCount; + itemCount = + Objects.nonNull(nativeValue.itemCount()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.itemCount())) ++ : Option.create_None(); + return new ExportDescription( + exportArn, + exportStatus, +@@ -3903,22 +3257,16 @@ public class ToDafny { + exportArn = + Objects.nonNull(nativeValue.exportArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option exportStatus; + exportStatus = + Objects.nonNull(nativeValue.exportStatus()) +- ? Option.create_Some( +- ExportStatus._typeDescriptor(), +- ToDafny.ExportStatus(nativeValue.exportStatus()) +- ) +- : Option.create_None(ExportStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ExportStatus(nativeValue.exportStatus())) ++ : Option.create_None(); + return new ExportSummary(exportArn, exportStatus); + } + +@@ -3934,26 +3282,20 @@ public class ToDafny { + exportTime = + Objects.nonNull(nativeValue.exportTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exportTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> clientToken; + clientToken = + Objects.nonNull(nativeValue.clientToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.clientToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + DafnySequence s3Bucket; + s3Bucket = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -3963,54 +3305,41 @@ public class ToDafny { + s3BucketOwner = + Objects.nonNull(nativeValue.s3BucketOwner()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3BucketOwner() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> s3Prefix; + s3Prefix = + Objects.nonNull(nativeValue.s3Prefix()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3Prefix() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option s3SseAlgorithm; + s3SseAlgorithm = + Objects.nonNull(nativeValue.s3SseAlgorithm()) + ? Option.create_Some( +- S3SseAlgorithm._typeDescriptor(), + ToDafny.S3SseAlgorithm(nativeValue.s3SseAlgorithm()) + ) +- : Option.create_None(S3SseAlgorithm._typeDescriptor()); ++ : Option.create_None(); + Option> s3SseKmsKeyId; + s3SseKmsKeyId = + Objects.nonNull(nativeValue.s3SseKmsKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.s3SseKmsKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option exportFormat; + exportFormat = + Objects.nonNull(nativeValue.exportFormat()) +- ? Option.create_Some( +- ExportFormat._typeDescriptor(), +- ToDafny.ExportFormat(nativeValue.exportFormat()) +- ) +- : Option.create_None(ExportFormat._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ExportFormat(nativeValue.exportFormat())) ++ : Option.create_None(); + return new ExportTableToPointInTimeInput( + tableArn, + exportTime, +@@ -4031,10 +3360,9 @@ public class ToDafny { + exportDescription = + Objects.nonNull(nativeValue.exportDescription()) + ? Option.create_Some( +- ExportDescription._typeDescriptor(), + ToDafny.ExportDescription(nativeValue.exportDescription()) + ) +- : Option.create_None(ExportDescription._typeDescriptor()); ++ : Option.create_None(); + return new ExportTableToPointInTimeOutput(exportDescription); + } + +@@ -4072,26 +3400,20 @@ public class ToDafny { + exceptionName = + Objects.nonNull(nativeValue.exceptionName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exceptionName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> exceptionDescription; + exceptionDescription = + Objects.nonNull(nativeValue.exceptionDescription()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exceptionDescription() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new FailureException(exceptionName, exceptionDescription); + } + +@@ -4128,14 +3450,11 @@ public class ToDafny { + projectionExpression = + Objects.nonNull(nativeValue.projectionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.projectionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -4146,20 +3465,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + return new Get( + key, + tableName, +@@ -4186,44 +3496,30 @@ public class ToDafny { + (Objects.nonNull(nativeValue.attributesToGet()) && + nativeValue.attributesToGet().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.AttributeNameList(nativeValue.attributesToGet()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option consistentRead; + consistentRead = + Objects.nonNull(nativeValue.consistentRead()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.consistentRead()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.consistentRead())) ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option> projectionExpression; + projectionExpression = + Objects.nonNull(nativeValue.projectionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.projectionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -4234,20 +3530,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + return new GetItemInput( + tableName, + key, +@@ -4268,35 +3555,15 @@ public class ToDafny { + > item; + item = + (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.item()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) ++ : Option.create_None(); + Option consumedCapacity; + consumedCapacity = + Objects.nonNull(nativeValue.consumedCapacity()) + ? Option.create_Some( +- ConsumedCapacity._typeDescriptor(), + ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) + ) +- : Option.create_None(ConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + return new GetItemOutput(item, consumedCapacity); + } + +@@ -4316,10 +3583,9 @@ public class ToDafny { + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) +- : Option.create_None(ProvisionedThroughput._typeDescriptor()); ++ : Option.create_None(); + return new GlobalSecondaryIndex( + indexName, + keySchema, +@@ -4335,24 +3601,20 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option provisionedWriteCapacityAutoScalingUpdate; + provisionedWriteCapacityAutoScalingUpdate = + Objects.nonNull(nativeValue.provisionedWriteCapacityAutoScalingUpdate()) + ? Option.create_Some( +- AutoScalingSettingsUpdate._typeDescriptor(), + ToDafny.AutoScalingSettingsUpdate( + nativeValue.provisionedWriteCapacityAutoScalingUpdate() + ) + ) +- : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); ++ : Option.create_None(); + return new GlobalSecondaryIndexAutoScalingUpdate( + indexName, + provisionedWriteCapacityAutoScalingUpdate +@@ -4380,86 +3642,60 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keySchema; + keySchema = + (Objects.nonNull(nativeValue.keySchema()) && + nativeValue.keySchema().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), +- ToDafny.KeySchema(nativeValue.keySchema()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) ++ : Option.create_None(); + Option projection; + projection = + Objects.nonNull(nativeValue.projection()) +- ? Option.create_Some( +- Projection._typeDescriptor(), +- ToDafny.Projection(nativeValue.projection()) +- ) +- : Option.create_None(Projection._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) ++ : Option.create_None(); + Option indexStatus; + indexStatus = + Objects.nonNull(nativeValue.indexStatus()) +- ? Option.create_Some( +- IndexStatus._typeDescriptor(), +- ToDafny.IndexStatus(nativeValue.indexStatus()) +- ) +- : Option.create_None(IndexStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.IndexStatus(nativeValue.indexStatus())) ++ : Option.create_None(); + Option backfilling; + backfilling = + Objects.nonNull(nativeValue.backfilling()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.backfilling()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.backfilling())) ++ : Option.create_None(); + Option provisionedThroughput; + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughputDescription._typeDescriptor(), + ToDafny.ProvisionedThroughputDescription( + nativeValue.provisionedThroughput() + ) + ) +- : Option.create_None( +- ProvisionedThroughputDescription._typeDescriptor() +- ); ++ : Option.create_None(); + Option indexSizeBytes; + indexSizeBytes = + Objects.nonNull(nativeValue.indexSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.indexSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.indexSizeBytes())) ++ : Option.create_None(); + Option itemCount; + itemCount = + Objects.nonNull(nativeValue.itemCount()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.itemCount())) ++ : Option.create_None(); + Option> indexArn; + indexArn = + Objects.nonNull(nativeValue.indexArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GlobalSecondaryIndexDescription( + indexName, + keySchema, +@@ -4508,41 +3744,29 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keySchema; + keySchema = + (Objects.nonNull(nativeValue.keySchema()) && + nativeValue.keySchema().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), +- ToDafny.KeySchema(nativeValue.keySchema()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) ++ : Option.create_None(); + Option projection; + projection = + Objects.nonNull(nativeValue.projection()) +- ? Option.create_Some( +- Projection._typeDescriptor(), +- ToDafny.Projection(nativeValue.projection()) +- ) +- : Option.create_None(Projection._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) ++ : Option.create_None(); + Option provisionedThroughput; + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) +- : Option.create_None(ProvisionedThroughput._typeDescriptor()); ++ : Option.create_None(); + return new GlobalSecondaryIndexInfo( + indexName, + keySchema, +@@ -4572,32 +3796,23 @@ public class ToDafny { + update = + Objects.nonNull(nativeValue.update()) + ? Option.create_Some( +- UpdateGlobalSecondaryIndexAction._typeDescriptor(), + ToDafny.UpdateGlobalSecondaryIndexAction(nativeValue.update()) + ) +- : Option.create_None( +- UpdateGlobalSecondaryIndexAction._typeDescriptor() +- ); ++ : Option.create_None(); + Option create; + create = + Objects.nonNull(nativeValue.create()) + ? Option.create_Some( +- CreateGlobalSecondaryIndexAction._typeDescriptor(), + ToDafny.CreateGlobalSecondaryIndexAction(nativeValue.create()) + ) +- : Option.create_None( +- CreateGlobalSecondaryIndexAction._typeDescriptor() +- ); ++ : Option.create_None(); + Option delete; + delete = + Objects.nonNull(nativeValue.delete()) + ? Option.create_Some( +- DeleteGlobalSecondaryIndexAction._typeDescriptor(), + ToDafny.DeleteGlobalSecondaryIndexAction(nativeValue.delete()) + ) +- : Option.create_None( +- DeleteGlobalSecondaryIndexAction._typeDescriptor() +- ); ++ : Option.create_None(); + return new GlobalSecondaryIndexUpdate(update, create, delete); + } + +@@ -4622,25 +3837,19 @@ public class ToDafny { + globalTableName = + Objects.nonNull(nativeValue.globalTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.globalTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> replicationGroup; + replicationGroup = + (Objects.nonNull(nativeValue.replicationGroup()) && + nativeValue.replicationGroup().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(Replica._typeDescriptor()), + ToDafny.ReplicaList(nativeValue.replicationGroup()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Replica._typeDescriptor()) +- ); ++ : Option.create_None(); + return new GlobalTable(globalTableName, replicationGroup); + } + +@@ -4652,56 +3861,43 @@ public class ToDafny { + (Objects.nonNull(nativeValue.replicationGroup()) && + nativeValue.replicationGroup().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()), + ToDafny.ReplicaDescriptionList(nativeValue.replicationGroup()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> globalTableArn; + globalTableArn = + Objects.nonNull(nativeValue.globalTableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.globalTableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> creationDateTime; + creationDateTime = + Objects.nonNull(nativeValue.creationDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.creationDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option globalTableStatus; + globalTableStatus = + Objects.nonNull(nativeValue.globalTableStatus()) + ? Option.create_Some( +- GlobalTableStatus._typeDescriptor(), + ToDafny.GlobalTableStatus(nativeValue.globalTableStatus()) + ) +- : Option.create_None(GlobalTableStatus._typeDescriptor()); ++ : Option.create_None(); + Option> globalTableName; + globalTableName = + Objects.nonNull(nativeValue.globalTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.globalTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GlobalTableDescription( + replicationGroup, + globalTableArn, +@@ -4722,11 +3918,8 @@ public class ToDafny { + Option provisionedWriteCapacityUnits; + provisionedWriteCapacityUnits = + Objects.nonNull(nativeValue.provisionedWriteCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.provisionedWriteCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.provisionedWriteCapacityUnits())) ++ : Option.create_None(); + Option< + AutoScalingSettingsUpdate + > provisionedWriteCapacityAutoScalingSettingsUpdate; +@@ -4735,12 +3928,11 @@ public class ToDafny { + nativeValue.provisionedWriteCapacityAutoScalingSettingsUpdate() + ) + ? Option.create_Some( +- AutoScalingSettingsUpdate._typeDescriptor(), + ToDafny.AutoScalingSettingsUpdate( + nativeValue.provisionedWriteCapacityAutoScalingSettingsUpdate() + ) + ) +- : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); ++ : Option.create_None(); + return new GlobalTableGlobalSecondaryIndexSettingsUpdate( + indexName, + provisionedWriteCapacityUnits, +@@ -4779,86 +3971,64 @@ public class ToDafny { + importArn = + Objects.nonNull(nativeValue.importArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.importArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option importStatus; + importStatus = + Objects.nonNull(nativeValue.importStatus()) +- ? Option.create_Some( +- ImportStatus._typeDescriptor(), +- ToDafny.ImportStatus(nativeValue.importStatus()) +- ) +- : Option.create_None(ImportStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ImportStatus(nativeValue.importStatus())) ++ : Option.create_None(); + Option> tableArn; + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option s3BucketSource; + s3BucketSource = + Objects.nonNull(nativeValue.s3BucketSource()) + ? Option.create_Some( +- S3BucketSource._typeDescriptor(), + ToDafny.S3BucketSource(nativeValue.s3BucketSource()) + ) +- : Option.create_None(S3BucketSource._typeDescriptor()); ++ : Option.create_None(); + Option> cloudWatchLogGroupArn; + cloudWatchLogGroupArn = + Objects.nonNull(nativeValue.cloudWatchLogGroupArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.cloudWatchLogGroupArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option inputFormat; + inputFormat = + Objects.nonNull(nativeValue.inputFormat()) +- ? Option.create_Some( +- InputFormat._typeDescriptor(), +- ToDafny.InputFormat(nativeValue.inputFormat()) +- ) +- : Option.create_None(InputFormat._typeDescriptor()); ++ ? Option.create_Some(ToDafny.InputFormat(nativeValue.inputFormat())) ++ : Option.create_None(); + Option> startTime; + startTime = + Objects.nonNull(nativeValue.startTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.startTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> endTime; + endTime = + Objects.nonNull(nativeValue.endTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.endTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ImportSummary( + importArn, + importStatus, +@@ -4890,187 +4060,141 @@ public class ToDafny { + importArn = + Objects.nonNull(nativeValue.importArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.importArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option importStatus; + importStatus = + Objects.nonNull(nativeValue.importStatus()) +- ? Option.create_Some( +- ImportStatus._typeDescriptor(), +- ToDafny.ImportStatus(nativeValue.importStatus()) +- ) +- : Option.create_None(ImportStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ImportStatus(nativeValue.importStatus())) ++ : Option.create_None(); + Option> tableArn; + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tableId; + tableId = + Objects.nonNull(nativeValue.tableId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> clientToken; + clientToken = + Objects.nonNull(nativeValue.clientToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.clientToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option s3BucketSource; + s3BucketSource = + Objects.nonNull(nativeValue.s3BucketSource()) + ? Option.create_Some( +- S3BucketSource._typeDescriptor(), + ToDafny.S3BucketSource(nativeValue.s3BucketSource()) + ) +- : Option.create_None(S3BucketSource._typeDescriptor()); ++ : Option.create_None(); + Option errorCount; + errorCount = + Objects.nonNull(nativeValue.errorCount()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.errorCount())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.errorCount())) ++ : Option.create_None(); + Option> cloudWatchLogGroupArn; + cloudWatchLogGroupArn = + Objects.nonNull(nativeValue.cloudWatchLogGroupArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.cloudWatchLogGroupArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option inputFormat; + inputFormat = + Objects.nonNull(nativeValue.inputFormat()) +- ? Option.create_Some( +- InputFormat._typeDescriptor(), +- ToDafny.InputFormat(nativeValue.inputFormat()) +- ) +- : Option.create_None(InputFormat._typeDescriptor()); ++ ? Option.create_Some(ToDafny.InputFormat(nativeValue.inputFormat())) ++ : Option.create_None(); + Option inputFormatOptions; + inputFormatOptions = + Objects.nonNull(nativeValue.inputFormatOptions()) + ? Option.create_Some( +- InputFormatOptions._typeDescriptor(), + ToDafny.InputFormatOptions(nativeValue.inputFormatOptions()) + ) +- : Option.create_None(InputFormatOptions._typeDescriptor()); ++ : Option.create_None(); + Option inputCompressionType; + inputCompressionType = + Objects.nonNull(nativeValue.inputCompressionType()) + ? Option.create_Some( +- InputCompressionType._typeDescriptor(), + ToDafny.InputCompressionType(nativeValue.inputCompressionType()) + ) +- : Option.create_None(InputCompressionType._typeDescriptor()); ++ : Option.create_None(); + Option tableCreationParameters; + tableCreationParameters = + Objects.nonNull(nativeValue.tableCreationParameters()) + ? Option.create_Some( +- TableCreationParameters._typeDescriptor(), + ToDafny.TableCreationParameters(nativeValue.tableCreationParameters()) + ) +- : Option.create_None(TableCreationParameters._typeDescriptor()); ++ : Option.create_None(); + Option> startTime; + startTime = + Objects.nonNull(nativeValue.startTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.startTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> endTime; + endTime = + Objects.nonNull(nativeValue.endTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.endTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option processedSizeBytes; + processedSizeBytes = + Objects.nonNull(nativeValue.processedSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.processedSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.processedSizeBytes())) ++ : Option.create_None(); + Option processedItemCount; + processedItemCount = + Objects.nonNull(nativeValue.processedItemCount()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.processedItemCount()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.processedItemCount())) ++ : Option.create_None(); + Option importedItemCount; + importedItemCount = + Objects.nonNull(nativeValue.importedItemCount()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.importedItemCount()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.importedItemCount())) ++ : Option.create_None(); + Option> failureCode; + failureCode = + Objects.nonNull(nativeValue.failureCode()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.failureCode() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> failureMessage; + failureMessage = + Objects.nonNull(nativeValue.failureMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.failureMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ImportTableDescription( + importArn, + importStatus, +@@ -5101,14 +4225,11 @@ public class ToDafny { + clientToken = + Objects.nonNull(nativeValue.clientToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.clientToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + S3BucketSource s3BucketSource; + s3BucketSource = ToDafny.S3BucketSource(nativeValue.s3BucketSource()); + InputFormat inputFormat; +@@ -5117,18 +4238,16 @@ public class ToDafny { + inputFormatOptions = + Objects.nonNull(nativeValue.inputFormatOptions()) + ? Option.create_Some( +- InputFormatOptions._typeDescriptor(), + ToDafny.InputFormatOptions(nativeValue.inputFormatOptions()) + ) +- : Option.create_None(InputFormatOptions._typeDescriptor()); ++ : Option.create_None(); + Option inputCompressionType; + inputCompressionType = + Objects.nonNull(nativeValue.inputCompressionType()) + ? Option.create_Some( +- InputCompressionType._typeDescriptor(), + ToDafny.InputCompressionType(nativeValue.inputCompressionType()) + ) +- : Option.create_None(InputCompressionType._typeDescriptor()); ++ : Option.create_None(); + TableCreationParameters tableCreationParameters; + tableCreationParameters = + ToDafny.TableCreationParameters(nativeValue.tableCreationParameters()); +@@ -5157,11 +4276,8 @@ public class ToDafny { + Option csv; + csv = + Objects.nonNull(nativeValue.csv()) +- ? Option.create_Some( +- CsvOptions._typeDescriptor(), +- ToDafny.CsvOptions(nativeValue.csv()) +- ) +- : Option.create_None(CsvOptions._typeDescriptor()); ++ ? Option.create_Some(ToDafny.CsvOptions(nativeValue.csv())) ++ : Option.create_None(); + return new InputFormatOptions(csv); + } + +@@ -5194,18 +4310,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.itemCollectionKey()) && + nativeValue.itemCollectionKey().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ItemCollectionKeyAttributeMap(nativeValue.itemCollectionKey()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + DafnySequence> + > sizeEstimateRangeGB; +@@ -5213,18 +4320,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.sizeEstimateRangeGB()) && + nativeValue.sizeEstimateRangeGB().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ItemCollectionSizeEstimateBound._typeDescriptor() +- ), + ToDafny.ItemCollectionSizeEstimateRange( + nativeValue.sizeEstimateRangeGB() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ItemCollectionSizeEstimateBound._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new ItemCollectionMetrics(itemCollectionKey, sizeEstimateRangeGB); + } + +@@ -5309,27 +4409,8 @@ public class ToDafny { + > item; + item = + (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.item()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) ++ : Option.create_None(); + return new ItemResponse(item); + } + +@@ -5424,36 +4505,23 @@ public class ToDafny { + (Objects.nonNull(nativeValue.attributesToGet()) && + nativeValue.attributesToGet().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.AttributeNameList(nativeValue.attributesToGet()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option consistentRead; + consistentRead = + Objects.nonNull(nativeValue.consistentRead()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.consistentRead()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.consistentRead())) ++ : Option.create_None(); + Option> projectionExpression; + projectionExpression = + Objects.nonNull(nativeValue.projectionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.projectionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -5464,20 +4532,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + return new KeysAndAttributes( + keys, + attributesToGet, +@@ -5519,34 +4578,27 @@ public class ToDafny { + streamArn = + Objects.nonNull(nativeValue.streamArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.streamArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option destinationStatus; + destinationStatus = + Objects.nonNull(nativeValue.destinationStatus()) + ? Option.create_Some( +- DestinationStatus._typeDescriptor(), + ToDafny.DestinationStatus(nativeValue.destinationStatus()) + ) +- : Option.create_None(DestinationStatus._typeDescriptor()); ++ : Option.create_None(); + Option> destinationStatusDescription; + destinationStatusDescription = + Objects.nonNull(nativeValue.destinationStatusDescription()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.destinationStatusDescription() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new KinesisDataStreamDestination( + streamArn, + destinationStatus, +@@ -5587,63 +4639,48 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> timeRangeLowerBound; + timeRangeLowerBound = + Objects.nonNull(nativeValue.timeRangeLowerBound()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.timeRangeLowerBound() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> timeRangeUpperBound; + timeRangeUpperBound = + Objects.nonNull(nativeValue.timeRangeUpperBound()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.timeRangeUpperBound() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> exclusiveStartBackupArn; + exclusiveStartBackupArn = + Objects.nonNull(nativeValue.exclusiveStartBackupArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exclusiveStartBackupArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option backupType; + backupType = + Objects.nonNull(nativeValue.backupType()) +- ? Option.create_Some( +- BackupTypeFilter._typeDescriptor(), +- ToDafny.BackupTypeFilter(nativeValue.backupType()) +- ) +- : Option.create_None(BackupTypeFilter._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BackupTypeFilter(nativeValue.backupType())) ++ : Option.create_None(); + return new ListBackupsInput( + tableName, + limit, +@@ -5662,24 +4699,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.backupSummaries()) && + nativeValue.backupSummaries().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(BackupSummary._typeDescriptor()), + ToDafny.BackupSummaries(nativeValue.backupSummaries()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(BackupSummary._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> lastEvaluatedBackupArn; + lastEvaluatedBackupArn = + Objects.nonNull(nativeValue.lastEvaluatedBackupArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastEvaluatedBackupArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListBackupsOutput(backupSummaries, lastEvaluatedBackupArn); + } + +@@ -5690,31 +4721,25 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option maxResults; + maxResults = + Objects.nonNull(nativeValue.maxResults()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.maxResults())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.maxResults())) ++ : Option.create_None(); + return new ListContributorInsightsInput(tableName, nextToken, maxResults); + } + +@@ -5728,30 +4753,20 @@ public class ToDafny { + (Objects.nonNull(nativeValue.contributorInsightsSummaries()) && + nativeValue.contributorInsightsSummaries().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ContributorInsightsSummary._typeDescriptor() +- ), + ToDafny.ContributorInsightsSummaries( + nativeValue.contributorInsightsSummaries() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ContributorInsightsSummary._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListContributorInsightsOutput( + contributorInsightsSummaries, + nextToken +@@ -5765,31 +4780,25 @@ public class ToDafny { + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option maxResults; + maxResults = + Objects.nonNull(nativeValue.maxResults()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.maxResults())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.maxResults())) ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListExportsInput(tableArn, maxResults, nextToken); + } + +@@ -5801,24 +4810,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.exportSummaries()) && + nativeValue.exportSummaries().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ExportSummary._typeDescriptor()), + ToDafny.ExportSummaries(nativeValue.exportSummaries()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ExportSummary._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListExportsOutput(exportSummaries, nextToken); + } + +@@ -5829,31 +4832,25 @@ public class ToDafny { + exclusiveStartGlobalTableName = + Objects.nonNull(nativeValue.exclusiveStartGlobalTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exclusiveStartGlobalTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> regionName; + regionName = + Objects.nonNull(nativeValue.regionName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.regionName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListGlobalTablesInput( + exclusiveStartGlobalTableName, + limit, +@@ -5869,24 +4866,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalTables()) && + nativeValue.globalTables().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(GlobalTable._typeDescriptor()), + ToDafny.GlobalTableList(nativeValue.globalTables()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(GlobalTable._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> lastEvaluatedGlobalTableName; + lastEvaluatedGlobalTableName = + Objects.nonNull(nativeValue.lastEvaluatedGlobalTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastEvaluatedGlobalTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListGlobalTablesOutput( + globalTables, + lastEvaluatedGlobalTableName +@@ -5900,31 +4891,25 @@ public class ToDafny { + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option pageSize; + pageSize = + Objects.nonNull(nativeValue.pageSize()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.pageSize())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.pageSize())) ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListImportsInput(tableArn, pageSize, nextToken); + } + +@@ -5936,24 +4921,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.importSummaryList()) && + nativeValue.importSummaryList().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ImportSummary._typeDescriptor()), + ToDafny.ImportSummaryList(nativeValue.importSummaryList()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ImportSummary._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListImportsOutput(importSummaryList, nextToken); + } + +@@ -5962,19 +4941,16 @@ public class ToDafny { + exclusiveStartTableName = + Objects.nonNull(nativeValue.exclusiveStartTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.exclusiveStartTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + return new ListTablesInput(exclusiveStartTableName, limit); + } + +@@ -5987,29 +4963,17 @@ public class ToDafny { + tableNames = + (Objects.nonNull(nativeValue.tableNames()) && + nativeValue.tableNames().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.TableNameList(nativeValue.tableNames()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.TableNameList(nativeValue.tableNames())) ++ : Option.create_None(); + Option> lastEvaluatedTableName; + lastEvaluatedTableName = + Objects.nonNull(nativeValue.lastEvaluatedTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastEvaluatedTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListTablesOutput(tableNames, lastEvaluatedTableName); + } + +@@ -6025,14 +4989,11 @@ public class ToDafny { + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListTagsOfResourceInput(resourceArn, nextToken); + } + +@@ -6042,25 +5003,17 @@ public class ToDafny { + Option> tags; + tags = + (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()), +- ToDafny.TagList(nativeValue.tags()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) ++ : Option.create_None(); + Option> nextToken; + nextToken = + Objects.nonNull(nativeValue.nextToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListTagsOfResourceOutput(tags, nextToken); + } + +@@ -6086,58 +5039,41 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keySchema; + keySchema = + (Objects.nonNull(nativeValue.keySchema()) && + nativeValue.keySchema().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), +- ToDafny.KeySchema(nativeValue.keySchema()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) ++ : Option.create_None(); + Option projection; + projection = + Objects.nonNull(nativeValue.projection()) +- ? Option.create_Some( +- Projection._typeDescriptor(), +- ToDafny.Projection(nativeValue.projection()) +- ) +- : Option.create_None(Projection._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) ++ : Option.create_None(); + Option indexSizeBytes; + indexSizeBytes = + Objects.nonNull(nativeValue.indexSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.indexSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.indexSizeBytes())) ++ : Option.create_None(); + Option itemCount; + itemCount = + Objects.nonNull(nativeValue.itemCount()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.itemCount())) ++ : Option.create_None(); + Option> indexArn; + indexArn = + Objects.nonNull(nativeValue.indexArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new LocalSecondaryIndexDescription( + indexName, + keySchema, +@@ -6183,33 +5119,22 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keySchema; + keySchema = + (Objects.nonNull(nativeValue.keySchema()) && + nativeValue.keySchema().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), +- ToDafny.KeySchema(nativeValue.keySchema()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) ++ : Option.create_None(); + Option projection; + projection = + Objects.nonNull(nativeValue.projection()) +- ? Option.create_Some( +- Projection._typeDescriptor(), +- ToDafny.Projection(nativeValue.projection()) +- ) +- : Option.create_None(Projection._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) ++ : Option.create_None(); + return new LocalSecondaryIndexInfo(indexName, keySchema, projection); + } + +@@ -6276,12 +5201,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.parameters()) && + nativeValue.parameters().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), + ToDafny.PreparedStatementParameters(nativeValue.parameters()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) +- ); ++ : Option.create_None(); + return new ParameterizedStatement(statement, parameters); + } + +@@ -6334,36 +5256,29 @@ public class ToDafny { + pointInTimeRecoveryStatus = + Objects.nonNull(nativeValue.pointInTimeRecoveryStatus()) + ? Option.create_Some( +- PointInTimeRecoveryStatus._typeDescriptor(), + ToDafny.PointInTimeRecoveryStatus( + nativeValue.pointInTimeRecoveryStatus() + ) + ) +- : Option.create_None(PointInTimeRecoveryStatus._typeDescriptor()); ++ : Option.create_None(); + Option> earliestRestorableDateTime; + earliestRestorableDateTime = + Objects.nonNull(nativeValue.earliestRestorableDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.earliestRestorableDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> latestRestorableDateTime; + latestRestorableDateTime = + Objects.nonNull(nativeValue.latestRestorableDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.latestRestorableDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new PointInTimeRecoveryDescription( + pointInTimeRecoveryStatus, + earliestRestorableDateTime, +@@ -6400,10 +5315,9 @@ public class ToDafny { + projectionType = + Objects.nonNull(nativeValue.projectionType()) + ? Option.create_Some( +- ProjectionType._typeDescriptor(), + ToDafny.ProjectionType(nativeValue.projectionType()) + ) +- : Option.create_None(ProjectionType._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence> + > nonKeyAttributes; +@@ -6411,16 +5325,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.nonKeyAttributes()) && + nativeValue.nonKeyAttributes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.NonKeyAttributeNameList(nativeValue.nonKeyAttributes()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + return new Projection(projectionType, nonKeyAttributes); + } + +@@ -6441,50 +5348,35 @@ public class ToDafny { + lastIncreaseDateTime = + Objects.nonNull(nativeValue.lastIncreaseDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastIncreaseDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> lastDecreaseDateTime; + lastDecreaseDateTime = + Objects.nonNull(nativeValue.lastDecreaseDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastDecreaseDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option numberOfDecreasesToday; + numberOfDecreasesToday = + Objects.nonNull(nativeValue.numberOfDecreasesToday()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.numberOfDecreasesToday()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.numberOfDecreasesToday())) ++ : Option.create_None(); + Option readCapacityUnits; + readCapacityUnits = + Objects.nonNull(nativeValue.readCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.readCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.readCapacityUnits())) ++ : Option.create_None(); + Option writeCapacityUnits; + writeCapacityUnits = + Objects.nonNull(nativeValue.writeCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.writeCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.writeCapacityUnits())) ++ : Option.create_None(); + return new ProvisionedThroughputDescription( + lastIncreaseDateTime, + lastDecreaseDateTime, +@@ -6500,11 +5392,8 @@ public class ToDafny { + Option readCapacityUnits; + readCapacityUnits = + Objects.nonNull(nativeValue.readCapacityUnits()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.readCapacityUnits()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.readCapacityUnits())) ++ : Option.create_None(); + return new ProvisionedThroughputOverride(readCapacityUnits); + } + +@@ -6525,14 +5414,11 @@ public class ToDafny { + conditionExpression = + Objects.nonNull(nativeValue.conditionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.conditionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -6543,20 +5429,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -6567,34 +5444,22 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( +- ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) +- : Option.create_None( +- ReturnValuesOnConditionCheckFailure._typeDescriptor() +- ); ++ : Option.create_None(); + return new Put( + item, + tableName, +@@ -6626,64 +5491,46 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expected()) && + nativeValue.expected().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- ExpectedAttributeValue._typeDescriptor() +- ), + ToDafny.ExpectedAttributeMap(nativeValue.expected()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- ExpectedAttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option returnValues; + returnValues = + Objects.nonNull(nativeValue.returnValues()) +- ? Option.create_Some( +- ReturnValue._typeDescriptor(), +- ToDafny.ReturnValue(nativeValue.returnValues()) +- ) +- : Option.create_None(ReturnValue._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ReturnValue(nativeValue.returnValues())) ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option returnItemCollectionMetrics; + returnItemCollectionMetrics = + Objects.nonNull(nativeValue.returnItemCollectionMetrics()) + ? Option.create_Some( +- ReturnItemCollectionMetrics._typeDescriptor(), + ToDafny.ReturnItemCollectionMetrics( + nativeValue.returnItemCollectionMetrics() + ) + ) +- : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + Option conditionalOperator; + conditionalOperator = + Objects.nonNull(nativeValue.conditionalOperator()) + ? Option.create_Some( +- ConditionalOperator._typeDescriptor(), + ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) + ) +- : Option.create_None(ConditionalOperator._typeDescriptor()); ++ : Option.create_None(); + Option> conditionExpression; + conditionExpression = + Objects.nonNull(nativeValue.conditionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.conditionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -6694,20 +5541,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -6718,20 +5556,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new PutItemInput( + tableName, + item, +@@ -6772,43 +5601,22 @@ public class ToDafny { + attributes = + (Objects.nonNull(nativeValue.attributes()) && + nativeValue.attributes().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.attributes()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.attributes())) ++ : Option.create_None(); + Option consumedCapacity; + consumedCapacity = + Objects.nonNull(nativeValue.consumedCapacity()) + ? Option.create_Some( +- ConsumedCapacity._typeDescriptor(), + ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) + ) +- : Option.create_None(ConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option itemCollectionMetrics; + itemCollectionMetrics = + Objects.nonNull(nativeValue.itemCollectionMetrics()) + ? Option.create_Some( +- ItemCollectionMetrics._typeDescriptor(), + ToDafny.ItemCollectionMetrics(nativeValue.itemCollectionMetrics()) + ) +- : Option.create_None(ItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + return new PutItemOutput( + attributes, + consumedCapacity, +@@ -6837,22 +5645,16 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option select; + select = + Objects.nonNull(nativeValue.select()) +- ? Option.create_Some( +- Select._typeDescriptor(), +- ToDafny.Select(nativeValue.select()) +- ) +- : Option.create_None(Select._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Select(nativeValue.select())) ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -8478,26 +6973,16 @@ public class ToDafny { + (Objects.nonNull(nativeValue.scanFilter()) && + nativeValue.scanFilter().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- Condition._typeDescriptor() +- ), + ToDafny.FilterConditionMap(nativeValue.scanFilter()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- Condition._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option conditionalOperator; + conditionalOperator = + Objects.nonNull(nativeValue.conditionalOperator()) + ? Option.create_Some( +- ConditionalOperator._typeDescriptor(), + ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) + ) +- : Option.create_None(ConditionalOperator._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -8507,69 +6992,43 @@ public class ToDafny { + exclusiveStartKey = + (Objects.nonNull(nativeValue.exclusiveStartKey()) && + nativeValue.exclusiveStartKey().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.Key(nativeValue.exclusiveStartKey()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.Key(nativeValue.exclusiveStartKey())) ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option totalSegments; + totalSegments = + Objects.nonNull(nativeValue.totalSegments()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.totalSegments())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.totalSegments())) ++ : Option.create_None(); + Option segment; + segment = + Objects.nonNull(nativeValue.segment()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.segment())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.segment())) ++ : Option.create_None(); + Option> projectionExpression; + projectionExpression = + Objects.nonNull(nativeValue.projectionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.projectionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> filterExpression; + filterExpression = + Objects.nonNull(nativeValue.filterExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.filterExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -8580,20 +7039,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -8604,28 +7054,16 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option consistentRead; + consistentRead = + Objects.nonNull(nativeValue.consistentRead()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.consistentRead()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.consistentRead())) ++ : Option.create_None(); + return new ScanInput( + tableName, + indexName, +@@ -8657,41 +7095,18 @@ public class ToDafny { + > items; + items = + (Objects.nonNull(nativeValue.items()) && nativeValue.items().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ), +- ToDafny.ItemList(nativeValue.items()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ) +- ); ++ ? Option.create_Some(ToDafny.ItemList(nativeValue.items())) ++ : Option.create_None(); + Option count; + count = + Objects.nonNull(nativeValue.count()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.count())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.count())) ++ : Option.create_None(); + Option scannedCount; + scannedCount = + Objects.nonNull(nativeValue.scannedCount()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.scannedCount())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.scannedCount())) ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -8701,35 +7116,15 @@ public class ToDafny { + lastEvaluatedKey = + (Objects.nonNull(nativeValue.lastEvaluatedKey()) && + nativeValue.lastEvaluatedKey().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.Key(nativeValue.lastEvaluatedKey()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.Key(nativeValue.lastEvaluatedKey())) ++ : Option.create_None(); + Option consumedCapacity; + consumedCapacity = + Objects.nonNull(nativeValue.consumedCapacity()) + ? Option.create_Some( +- ConsumedCapacity._typeDescriptor(), + ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) + ) +- : Option.create_None(ConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + return new ScanOutput( + items, + count, +@@ -8772,22 +7167,16 @@ public class ToDafny { + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option tableSizeBytes; + tableSizeBytes = + Objects.nonNull(nativeValue.tableSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.tableSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.tableSizeBytes())) ++ : Option.create_None(); + DafnySequence keySchema; + keySchema = ToDafny.KeySchema(nativeValue.keySchema()); + DafnySequence tableCreationDateTime; +@@ -8801,16 +7190,13 @@ public class ToDafny { + Option itemCount; + itemCount = + Objects.nonNull(nativeValue.itemCount()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.itemCount())) ++ : Option.create_None(); + Option billingMode; + billingMode = + Objects.nonNull(nativeValue.billingMode()) +- ? Option.create_Some( +- BillingMode._typeDescriptor(), +- ToDafny.BillingMode(nativeValue.billingMode()) +- ) +- : Option.create_None(BillingMode._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) ++ : Option.create_None(); + return new SourceTableDetails( + tableName, + tableId, +@@ -8834,16 +7220,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.localSecondaryIndexes()) && + nativeValue.localSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- LocalSecondaryIndexInfo._typeDescriptor() +- ), + ToDafny.LocalSecondaryIndexes(nativeValue.localSecondaryIndexes()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- LocalSecondaryIndexInfo._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexes; +@@ -8851,40 +7230,30 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexInfo._typeDescriptor() +- ), + ToDafny.GlobalSecondaryIndexes(nativeValue.globalSecondaryIndexes()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexInfo._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option streamDescription; + streamDescription = + Objects.nonNull(nativeValue.streamDescription()) + ? Option.create_Some( +- StreamSpecification._typeDescriptor(), + ToDafny.StreamSpecification(nativeValue.streamDescription()) + ) +- : Option.create_None(StreamSpecification._typeDescriptor()); ++ : Option.create_None(); + Option timeToLiveDescription; + timeToLiveDescription = + Objects.nonNull(nativeValue.timeToLiveDescription()) + ? Option.create_Some( +- TimeToLiveDescription._typeDescriptor(), + ToDafny.TimeToLiveDescription(nativeValue.timeToLiveDescription()) + ) +- : Option.create_None(TimeToLiveDescription._typeDescriptor()); ++ : Option.create_None(); + Option sSEDescription; + sSEDescription = + Objects.nonNull(nativeValue.sseDescription()) + ? Option.create_Some( +- SSEDescription._typeDescriptor(), + ToDafny.SSEDescription(nativeValue.sseDescription()) + ) +- : Option.create_None(SSEDescription._typeDescriptor()); ++ : Option.create_None(); + return new SourceTableFeatureDetails( + localSecondaryIndexes, + globalSecondaryIndexes, +@@ -8900,43 +7269,31 @@ public class ToDafny { + Option status; + status = + Objects.nonNull(nativeValue.status()) +- ? Option.create_Some( +- SSEStatus._typeDescriptor(), +- ToDafny.SSEStatus(nativeValue.status()) +- ) +- : Option.create_None(SSEStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.SSEStatus(nativeValue.status())) ++ : Option.create_None(); + Option sSEType; + sSEType = + Objects.nonNull(nativeValue.sseType()) +- ? Option.create_Some( +- SSEType._typeDescriptor(), +- ToDafny.SSEType(nativeValue.sseType()) +- ) +- : Option.create_None(SSEType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.SSEType(nativeValue.sseType())) ++ : Option.create_None(); + Option> kMSMasterKeyArn; + kMSMasterKeyArn = + Objects.nonNull(nativeValue.kmsMasterKeyArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.kmsMasterKeyArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> inaccessibleEncryptionDateTime; + inaccessibleEncryptionDateTime = + Objects.nonNull(nativeValue.inaccessibleEncryptionDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.inaccessibleEncryptionDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new SSEDescription( + status, + sSEType, +@@ -8951,28 +7308,22 @@ public class ToDafny { + Option enabled; + enabled = + Objects.nonNull(nativeValue.enabled()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.enabled())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.enabled())) ++ : Option.create_None(); + Option sSEType; + sSEType = + Objects.nonNull(nativeValue.sseType()) +- ? Option.create_Some( +- SSEType._typeDescriptor(), +- ToDafny.SSEType(nativeValue.sseType()) +- ) +- : Option.create_None(SSEType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.SSEType(nativeValue.sseType())) ++ : Option.create_None(); + Option> kMSMasterKeyId; + kMSMasterKeyId = + Objects.nonNull(nativeValue.kmsMasterKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.kmsMasterKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new SSESpecification(enabled, sSEType, kMSMasterKeyId); + } + +@@ -8985,10 +7336,9 @@ public class ToDafny { + streamViewType = + Objects.nonNull(nativeValue.streamViewType()) + ? Option.create_Some( +- StreamViewType._typeDescriptor(), + ToDafny.StreamViewType(nativeValue.streamViewType()) + ) +- : Option.create_None(StreamViewType._typeDescriptor()); ++ : Option.create_None(); + return new StreamSpecification(streamEnabled, streamViewType); + } + +@@ -9009,37 +7359,24 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option tableStatus; + tableStatus = + Objects.nonNull(nativeValue.tableStatus()) +- ? Option.create_Some( +- TableStatus._typeDescriptor(), +- ToDafny.TableStatus(nativeValue.tableStatus()) +- ) +- : Option.create_None(TableStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.TableStatus(nativeValue.tableStatus())) ++ : Option.create_None(); + Option> replicas; + replicas = + (Objects.nonNull(nativeValue.replicas()) && + nativeValue.replicas().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaAutoScalingDescription._typeDescriptor() +- ), + ToDafny.ReplicaAutoScalingDescriptionList(nativeValue.replicas()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicaAutoScalingDescription._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new TableAutoScalingDescription(tableName, tableStatus, replicas); + } + +@@ -9049,23 +7386,17 @@ public class ToDafny { + Option tableClass; + tableClass = + Objects.nonNull(nativeValue.tableClass()) +- ? Option.create_Some( +- TableClass._typeDescriptor(), +- ToDafny.TableClass(nativeValue.tableClass()) +- ) +- : Option.create_None(TableClass._typeDescriptor()); ++ ? Option.create_Some(ToDafny.TableClass(nativeValue.tableClass())) ++ : Option.create_None(); + Option> lastUpdateDateTime; + lastUpdateDateTime = + Objects.nonNull(nativeValue.lastUpdateDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastUpdateDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new TableClassSummary(tableClass, lastUpdateDateTime); + } + +@@ -9085,27 +7416,22 @@ public class ToDafny { + Option billingMode; + billingMode = + Objects.nonNull(nativeValue.billingMode()) +- ? Option.create_Some( +- BillingMode._typeDescriptor(), +- ToDafny.BillingMode(nativeValue.billingMode()) +- ) +- : Option.create_None(BillingMode._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) ++ : Option.create_None(); + Option provisionedThroughput; + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) +- : Option.create_None(ProvisionedThroughput._typeDescriptor()); ++ : Option.create_None(); + Option sSESpecification; + sSESpecification = + Objects.nonNull(nativeValue.sseSpecification()) + ? Option.create_Some( +- SSESpecification._typeDescriptor(), + ToDafny.SSESpecification(nativeValue.sseSpecification()) + ) +- : Option.create_None(SSESpecification._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexes; +@@ -9113,12 +7439,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()), + ToDafny.GlobalSecondaryIndexList(nativeValue.globalSecondaryIndexes()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()) +- ); ++ : Option.create_None(); + return new TableCreationParameters( + tableName, + attributeDefinitions, +@@ -9138,112 +7461,82 @@ public class ToDafny { + (Objects.nonNull(nativeValue.attributeDefinitions()) && + nativeValue.attributeDefinitions().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()), + ToDafny.AttributeDefinitions(nativeValue.attributeDefinitions()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> tableName; + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keySchema; + keySchema = + (Objects.nonNull(nativeValue.keySchema()) && + nativeValue.keySchema().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), +- ToDafny.KeySchema(nativeValue.keySchema()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) ++ : Option.create_None(); + Option tableStatus; + tableStatus = + Objects.nonNull(nativeValue.tableStatus()) +- ? Option.create_Some( +- TableStatus._typeDescriptor(), +- ToDafny.TableStatus(nativeValue.tableStatus()) +- ) +- : Option.create_None(TableStatus._typeDescriptor()); ++ ? Option.create_Some(ToDafny.TableStatus(nativeValue.tableStatus())) ++ : Option.create_None(); + Option> creationDateTime; + creationDateTime = + Objects.nonNull(nativeValue.creationDateTime()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.creationDateTime() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option provisionedThroughput; + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughputDescription._typeDescriptor(), + ToDafny.ProvisionedThroughputDescription( + nativeValue.provisionedThroughput() + ) + ) +- : Option.create_None( +- ProvisionedThroughputDescription._typeDescriptor() +- ); ++ : Option.create_None(); + Option tableSizeBytes; + tableSizeBytes = + Objects.nonNull(nativeValue.tableSizeBytes()) +- ? Option.create_Some( +- TypeDescriptor.LONG, +- (nativeValue.tableSizeBytes()) +- ) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.tableSizeBytes())) ++ : Option.create_None(); + Option itemCount; + itemCount = + Objects.nonNull(nativeValue.itemCount()) +- ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) +- : Option.create_None(TypeDescriptor.LONG); ++ ? Option.create_Some((nativeValue.itemCount())) ++ : Option.create_None(); + Option> tableArn; + tableArn = + Objects.nonNull(nativeValue.tableArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tableId; + tableId = + Objects.nonNull(nativeValue.tableId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option billingModeSummary; + billingModeSummary = + Objects.nonNull(nativeValue.billingModeSummary()) + ? Option.create_Some( +- BillingModeSummary._typeDescriptor(), + ToDafny.BillingModeSummary(nativeValue.billingModeSummary()) + ) +- : Option.create_None(BillingModeSummary._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence + > localSecondaryIndexes; +@@ -9251,18 +7544,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.localSecondaryIndexes()) && + nativeValue.localSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- LocalSecondaryIndexDescription._typeDescriptor() +- ), + ToDafny.LocalSecondaryIndexDescriptionList( + nativeValue.localSecondaryIndexes() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- LocalSecondaryIndexDescription._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexes; +@@ -9270,105 +7556,81 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexDescription._typeDescriptor() +- ), + ToDafny.GlobalSecondaryIndexDescriptionList( + nativeValue.globalSecondaryIndexes() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexDescription._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option streamSpecification; + streamSpecification = + Objects.nonNull(nativeValue.streamSpecification()) + ? Option.create_Some( +- StreamSpecification._typeDescriptor(), + ToDafny.StreamSpecification(nativeValue.streamSpecification()) + ) +- : Option.create_None(StreamSpecification._typeDescriptor()); ++ : Option.create_None(); + Option> latestStreamLabel; + latestStreamLabel = + Objects.nonNull(nativeValue.latestStreamLabel()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.latestStreamLabel() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> latestStreamArn; + latestStreamArn = + Objects.nonNull(nativeValue.latestStreamArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.latestStreamArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> globalTableVersion; + globalTableVersion = + Objects.nonNull(nativeValue.globalTableVersion()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.globalTableVersion() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> replicas; + replicas = + (Objects.nonNull(nativeValue.replicas()) && + nativeValue.replicas().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()), + ToDafny.ReplicaDescriptionList(nativeValue.replicas()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()) +- ); ++ : Option.create_None(); + Option restoreSummary; + restoreSummary = + Objects.nonNull(nativeValue.restoreSummary()) + ? Option.create_Some( +- RestoreSummary._typeDescriptor(), + ToDafny.RestoreSummary(nativeValue.restoreSummary()) + ) +- : Option.create_None(RestoreSummary._typeDescriptor()); ++ : Option.create_None(); + Option sSEDescription; + sSEDescription = + Objects.nonNull(nativeValue.sseDescription()) + ? Option.create_Some( +- SSEDescription._typeDescriptor(), + ToDafny.SSEDescription(nativeValue.sseDescription()) + ) +- : Option.create_None(SSEDescription._typeDescriptor()); ++ : Option.create_None(); + Option archivalSummary; + archivalSummary = + Objects.nonNull(nativeValue.archivalSummary()) + ? Option.create_Some( +- ArchivalSummary._typeDescriptor(), + ToDafny.ArchivalSummary(nativeValue.archivalSummary()) + ) +- : Option.create_None(ArchivalSummary._typeDescriptor()); ++ : Option.create_None(); + Option tableClassSummary; + tableClassSummary = + Objects.nonNull(nativeValue.tableClassSummary()) + ? Option.create_Some( +- TableClassSummary._typeDescriptor(), + ToDafny.TableClassSummary(nativeValue.tableClassSummary()) + ) +- : Option.create_None(TableClassSummary._typeDescriptor()); ++ : Option.create_None(); + return new TableDescription( + attributeDefinitions, + tableName, +@@ -9461,22 +7723,18 @@ public class ToDafny { + timeToLiveStatus = + Objects.nonNull(nativeValue.timeToLiveStatus()) + ? Option.create_Some( +- TimeToLiveStatus._typeDescriptor(), + ToDafny.TimeToLiveStatus(nativeValue.timeToLiveStatus()) + ) +- : Option.create_None(TimeToLiveStatus._typeDescriptor()); ++ : Option.create_None(); + Option> attributeName; + attributeName = + Objects.nonNull(nativeValue.attributeName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.attributeName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new TimeToLiveDescription(timeToLiveStatus, attributeName); + } + +@@ -9522,10 +7780,9 @@ public class ToDafny { + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + return new TransactGetItemsInput(transactItems, returnConsumedCapacity); + } + +@@ -9537,23 +7794,15 @@ public class ToDafny { + (Objects.nonNull(nativeValue.consumedCapacity()) && + nativeValue.consumedCapacity().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), + ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) +- ); ++ : Option.create_None(); + Option> responses; + responses = + (Objects.nonNull(nativeValue.responses()) && + nativeValue.responses().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()), +- ToDafny.ItemResponseList(nativeValue.responses()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.ItemResponseList(nativeValue.responses())) ++ : Option.create_None(); + return new TransactGetItemsOutput(consumedCapacity, responses); + } + +@@ -9564,34 +7813,24 @@ public class ToDafny { + conditionCheck = + Objects.nonNull(nativeValue.conditionCheck()) + ? Option.create_Some( +- ConditionCheck._typeDescriptor(), + ToDafny.ConditionCheck(nativeValue.conditionCheck()) + ) +- : Option.create_None(ConditionCheck._typeDescriptor()); ++ : Option.create_None(); + Option put; + put = + Objects.nonNull(nativeValue.put()) +- ? Option.create_Some( +- Put._typeDescriptor(), +- ToDafny.Put(nativeValue.put()) +- ) +- : Option.create_None(Put._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Put(nativeValue.put())) ++ : Option.create_None(); + Option delete; + delete = + Objects.nonNull(nativeValue.delete()) +- ? Option.create_Some( +- Delete._typeDescriptor(), +- ToDafny.Delete(nativeValue.delete()) +- ) +- : Option.create_None(Delete._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Delete(nativeValue.delete())) ++ : Option.create_None(); + Option update; + update = + Objects.nonNull(nativeValue.update()) +- ? Option.create_Some( +- Update._typeDescriptor(), +- ToDafny.Update(nativeValue.update()) +- ) +- : Option.create_None(Update._typeDescriptor()); ++ ? Option.create_Some(ToDafny.Update(nativeValue.update())) ++ : Option.create_None(); + return new TransactWriteItem(conditionCheck, put, delete, update); + } + +@@ -9618,32 +7857,27 @@ public class ToDafny { + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option returnItemCollectionMetrics; + returnItemCollectionMetrics = + Objects.nonNull(nativeValue.returnItemCollectionMetrics()) + ? Option.create_Some( +- ReturnItemCollectionMetrics._typeDescriptor(), + ToDafny.ReturnItemCollectionMetrics( + nativeValue.returnItemCollectionMetrics() + ) + ) +- : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + Option> clientRequestToken; + clientRequestToken = + Objects.nonNull(nativeValue.clientRequestToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.clientRequestToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new TransactWriteItemsInput( + transactItems, + returnConsumedCapacity, +@@ -9660,12 +7894,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.consumedCapacity()) && + nativeValue.consumedCapacity().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), + ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -9676,24 +7907,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.itemCollectionMetrics()) && + nativeValue.itemCollectionMetrics().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor( +- ItemCollectionMetrics._typeDescriptor() +- ) +- ), + ToDafny.ItemCollectionMetricsPerTable( + nativeValue.itemCollectionMetrics() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor( +- ItemCollectionMetrics._typeDescriptor() +- ) +- ) +- ); ++ : Option.create_None(); + return new TransactWriteItemsOutput( + consumedCapacity, + itemCollectionMetrics +@@ -9735,14 +7953,11 @@ public class ToDafny { + conditionExpression = + Objects.nonNull(nativeValue.conditionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.conditionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -9753,20 +7968,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -9777,34 +7983,22 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + ReturnValuesOnConditionCheckFailure + > returnValuesOnConditionCheckFailure; + returnValuesOnConditionCheckFailure = + Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) + ? Option.create_Some( +- ReturnValuesOnConditionCheckFailure._typeDescriptor(), + ToDafny.ReturnValuesOnConditionCheckFailure( + nativeValue.returnValuesOnConditionCheckFailure() + ) + ) +- : Option.create_None( +- ReturnValuesOnConditionCheckFailure._typeDescriptor() +- ); ++ : Option.create_None(); + return new Update( + key, + updateExpression, +@@ -9842,12 +8036,11 @@ public class ToDafny { + continuousBackupsDescription = + Objects.nonNull(nativeValue.continuousBackupsDescription()) + ? Option.create_Some( +- ContinuousBackupsDescription._typeDescriptor(), + ToDafny.ContinuousBackupsDescription( + nativeValue.continuousBackupsDescription() + ) + ) +- : Option.create_None(ContinuousBackupsDescription._typeDescriptor()); ++ : Option.create_None(); + return new UpdateContinuousBackupsOutput(continuousBackupsDescription); + } + +@@ -9863,14 +8056,11 @@ public class ToDafny { + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + ContributorInsightsAction contributorInsightsAction; + contributorInsightsAction = + ToDafny.ContributorInsightsAction( +@@ -9890,36 +8080,29 @@ public class ToDafny { + tableName = + Objects.nonNull(nativeValue.tableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.tableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> indexName; + indexName = + Objects.nonNull(nativeValue.indexName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.indexName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option contributorInsightsStatus; + contributorInsightsStatus = + Objects.nonNull(nativeValue.contributorInsightsStatus()) + ? Option.create_Some( +- ContributorInsightsStatus._typeDescriptor(), + ToDafny.ContributorInsightsStatus( + nativeValue.contributorInsightsStatus() + ) + ) +- : Option.create_None(ContributorInsightsStatus._typeDescriptor()); ++ : Option.create_None(); + return new UpdateContributorInsightsOutput( + tableName, + indexName, +@@ -9964,10 +8147,9 @@ public class ToDafny { + globalTableDescription = + Objects.nonNull(nativeValue.globalTableDescription()) + ? Option.create_Some( +- GlobalTableDescription._typeDescriptor(), + ToDafny.GlobalTableDescription(nativeValue.globalTableDescription()) + ) +- : Option.create_None(GlobalTableDescription._typeDescriptor()); ++ : Option.create_None(); + return new UpdateGlobalTableOutput(globalTableDescription); + } + +@@ -9983,18 +8165,16 @@ public class ToDafny { + globalTableBillingMode = + Objects.nonNull(nativeValue.globalTableBillingMode()) + ? Option.create_Some( +- BillingMode._typeDescriptor(), + ToDafny.BillingMode(nativeValue.globalTableBillingMode()) + ) +- : Option.create_None(BillingMode._typeDescriptor()); ++ : Option.create_None(); + Option globalTableProvisionedWriteCapacityUnits; + globalTableProvisionedWriteCapacityUnits = + Objects.nonNull(nativeValue.globalTableProvisionedWriteCapacityUnits()) + ? Option.create_Some( +- TypeDescriptor.LONG, + (nativeValue.globalTableProvisionedWriteCapacityUnits()) + ) +- : Option.create_None(TypeDescriptor.LONG); ++ : Option.create_None(); + Option< + AutoScalingSettingsUpdate + > globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate; +@@ -10003,12 +8183,11 @@ public class ToDafny { + nativeValue.globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate() + ) + ? Option.create_Some( +- AutoScalingSettingsUpdate._typeDescriptor(), + ToDafny.AutoScalingSettingsUpdate( + nativeValue.globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate() + ) + ) +- : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence + > globalTableGlobalSecondaryIndexSettingsUpdate; +@@ -10019,18 +8198,11 @@ public class ToDafny { + nativeValue.globalTableGlobalSecondaryIndexSettingsUpdate().size() > + 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- GlobalTableGlobalSecondaryIndexSettingsUpdate._typeDescriptor() +- ), + ToDafny.GlobalTableGlobalSecondaryIndexSettingsUpdateList( + nativeValue.globalTableGlobalSecondaryIndexSettingsUpdate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- GlobalTableGlobalSecondaryIndexSettingsUpdate._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > replicaSettingsUpdate; +@@ -10038,14 +8210,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.replicaSettingsUpdate()) && + nativeValue.replicaSettingsUpdate().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaSettingsUpdate._typeDescriptor() +- ), + ToDafny.ReplicaSettingsUpdateList(nativeValue.replicaSettingsUpdate()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(ReplicaSettingsUpdate._typeDescriptor()) +- ); ++ : Option.create_None(); + return new UpdateGlobalTableSettingsInput( + globalTableName, + globalTableBillingMode, +@@ -10063,29 +8230,19 @@ public class ToDafny { + globalTableName = + Objects.nonNull(nativeValue.globalTableName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.globalTableName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> replicaSettings; + replicaSettings = + (Objects.nonNull(nativeValue.replicaSettings()) && + nativeValue.replicaSettings().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaSettingsDescription._typeDescriptor() +- ), + ToDafny.ReplicaSettingsDescriptionList(nativeValue.replicaSettings()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicaSettingsDescription._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new UpdateGlobalTableSettingsOutput( + globalTableName, + replicaSettings +@@ -10113,18 +8270,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.attributeUpdates()) && + nativeValue.attributeUpdates().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValueUpdate._typeDescriptor() +- ), + ToDafny.AttributeUpdates(nativeValue.attributeUpdates()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValueUpdate._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -10135,76 +8283,55 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expected()) && + nativeValue.expected().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- ExpectedAttributeValue._typeDescriptor() +- ), + ToDafny.ExpectedAttributeMap(nativeValue.expected()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- ExpectedAttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option conditionalOperator; + conditionalOperator = + Objects.nonNull(nativeValue.conditionalOperator()) + ? Option.create_Some( +- ConditionalOperator._typeDescriptor(), + ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) + ) +- : Option.create_None(ConditionalOperator._typeDescriptor()); ++ : Option.create_None(); + Option returnValues; + returnValues = + Objects.nonNull(nativeValue.returnValues()) +- ? Option.create_Some( +- ReturnValue._typeDescriptor(), +- ToDafny.ReturnValue(nativeValue.returnValues()) +- ) +- : Option.create_None(ReturnValue._typeDescriptor()); ++ ? Option.create_Some(ToDafny.ReturnValue(nativeValue.returnValues())) ++ : Option.create_None(); + Option returnConsumedCapacity; + returnConsumedCapacity = + Objects.nonNull(nativeValue.returnConsumedCapacity()) + ? Option.create_Some( +- ReturnConsumedCapacity._typeDescriptor(), + ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) + ) +- : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option returnItemCollectionMetrics; + returnItemCollectionMetrics = + Objects.nonNull(nativeValue.returnItemCollectionMetrics()) + ? Option.create_Some( +- ReturnItemCollectionMetrics._typeDescriptor(), + ToDafny.ReturnItemCollectionMetrics( + nativeValue.returnItemCollectionMetrics() + ) + ) +- : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + Option> updateExpression; + updateExpression = + Objects.nonNull(nativeValue.updateExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.updateExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> conditionExpression; + conditionExpression = + Objects.nonNull(nativeValue.conditionExpression()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.conditionExpression() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -10215,20 +8342,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeNames()) && + nativeValue.expressionAttributeNames().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.ExpressionAttributeNameMap( + nativeValue.expressionAttributeNames() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -10239,20 +8357,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.expressionAttributeValues()) && + nativeValue.expressionAttributeValues().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ), + ToDafny.ExpressionAttributeValueMap( + nativeValue.expressionAttributeValues() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- AttributeValue._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new UpdateItemInput( + tableName, + key, +@@ -10281,43 +8390,22 @@ public class ToDafny { + attributes = + (Objects.nonNull(nativeValue.attributes()) && + nativeValue.attributes().size() > 0) +- ? Option.create_Some( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ), +- ToDafny.AttributeMap(nativeValue.attributes()) +- ) +- : Option.create_None( +- TypeDescriptor.referenceWithInitializer( +- dafny.DafnyMap.class, +- () -> +- dafny.DafnyMap.< +- dafny.DafnySequence, +- AttributeValue +- >empty() +- ) +- ); ++ ? Option.create_Some(ToDafny.AttributeMap(nativeValue.attributes())) ++ : Option.create_None(); + Option consumedCapacity; + consumedCapacity = + Objects.nonNull(nativeValue.consumedCapacity()) + ? Option.create_Some( +- ConsumedCapacity._typeDescriptor(), + ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) + ) +- : Option.create_None(ConsumedCapacity._typeDescriptor()); ++ : Option.create_None(); + Option itemCollectionMetrics; + itemCollectionMetrics = + Objects.nonNull(nativeValue.itemCollectionMetrics()) + ? Option.create_Some( +- ItemCollectionMetrics._typeDescriptor(), + ToDafny.ItemCollectionMetrics(nativeValue.itemCollectionMetrics()) + ) +- : Option.create_None(ItemCollectionMetrics._typeDescriptor()); ++ : Option.create_None(); + return new UpdateItemOutput( + attributes, + consumedCapacity, +@@ -10337,24 +8425,20 @@ public class ToDafny { + kMSMasterKeyId = + Objects.nonNull(nativeValue.kmsMasterKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.kmsMasterKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option provisionedThroughputOverride; + provisionedThroughputOverride = + Objects.nonNull(nativeValue.provisionedThroughputOverride()) + ? Option.create_Some( +- ProvisionedThroughputOverride._typeDescriptor(), + ToDafny.ProvisionedThroughputOverride( + nativeValue.provisionedThroughputOverride() + ) + ) +- : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexes; +@@ -10362,26 +8446,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && + nativeValue.globalSecondaryIndexes().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaGlobalSecondaryIndex._typeDescriptor() +- ), + ToDafny.ReplicaGlobalSecondaryIndexList( + nativeValue.globalSecondaryIndexes() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicaGlobalSecondaryIndex._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option tableClassOverride; + tableClassOverride = + Objects.nonNull(nativeValue.tableClassOverride()) + ? Option.create_Some( +- TableClass._typeDescriptor(), + ToDafny.TableClass(nativeValue.tableClassOverride()) + ) +- : Option.create_None(TableClass._typeDescriptor()); ++ : Option.create_None(); + return new UpdateReplicationGroupMemberAction( + regionName, + kMSMasterKeyId, +@@ -10399,12 +8475,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.attributeDefinitions()) && + nativeValue.attributeDefinitions().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()), + ToDafny.AttributeDefinitions(nativeValue.attributeDefinitions()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()) +- ); ++ : Option.create_None(); + DafnySequence tableName; + tableName = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -10413,19 +8486,15 @@ public class ToDafny { + Option billingMode; + billingMode = + Objects.nonNull(nativeValue.billingMode()) +- ? Option.create_Some( +- BillingMode._typeDescriptor(), +- ToDafny.BillingMode(nativeValue.billingMode()) +- ) +- : Option.create_None(BillingMode._typeDescriptor()); ++ ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) ++ : Option.create_None(); + Option provisionedThroughput; + provisionedThroughput = + Objects.nonNull(nativeValue.provisionedThroughput()) + ? Option.create_Some( +- ProvisionedThroughput._typeDescriptor(), + ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) + ) +- : Option.create_None(ProvisionedThroughput._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence + > globalSecondaryIndexUpdates; +@@ -10433,57 +8502,38 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexUpdates()) && + nativeValue.globalSecondaryIndexUpdates().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexUpdate._typeDescriptor() +- ), + ToDafny.GlobalSecondaryIndexUpdateList( + nativeValue.globalSecondaryIndexUpdates() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexUpdate._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option streamSpecification; + streamSpecification = + Objects.nonNull(nativeValue.streamSpecification()) + ? Option.create_Some( +- StreamSpecification._typeDescriptor(), + ToDafny.StreamSpecification(nativeValue.streamSpecification()) + ) +- : Option.create_None(StreamSpecification._typeDescriptor()); ++ : Option.create_None(); + Option sSESpecification; + sSESpecification = + Objects.nonNull(nativeValue.sseSpecification()) + ? Option.create_Some( +- SSESpecification._typeDescriptor(), + ToDafny.SSESpecification(nativeValue.sseSpecification()) + ) +- : Option.create_None(SSESpecification._typeDescriptor()); ++ : Option.create_None(); + Option> replicaUpdates; + replicaUpdates = + (Objects.nonNull(nativeValue.replicaUpdates()) && + nativeValue.replicaUpdates().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicationGroupUpdate._typeDescriptor() +- ), + ToDafny.ReplicationGroupUpdateList(nativeValue.replicaUpdates()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicationGroupUpdate._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option tableClass; + tableClass = + Objects.nonNull(nativeValue.tableClass()) +- ? Option.create_Some( +- TableClass._typeDescriptor(), +- ToDafny.TableClass(nativeValue.tableClass()) +- ) +- : Option.create_None(TableClass._typeDescriptor()); ++ ? Option.create_Some(ToDafny.TableClass(nativeValue.tableClass())) ++ : Option.create_None(); + return new UpdateTableInput( + attributeDefinitions, + tableName, +@@ -10504,10 +8554,9 @@ public class ToDafny { + tableDescription = + Objects.nonNull(nativeValue.tableDescription()) + ? Option.create_Some( +- TableDescription._typeDescriptor(), + ToDafny.TableDescription(nativeValue.tableDescription()) + ) +- : Option.create_None(TableDescription._typeDescriptor()); ++ : Option.create_None(); + return new UpdateTableOutput(tableDescription); + } + +@@ -10521,18 +8570,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.globalSecondaryIndexUpdates()) && + nativeValue.globalSecondaryIndexUpdates().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexAutoScalingUpdate._typeDescriptor() +- ), + ToDafny.GlobalSecondaryIndexAutoScalingUpdateList( + nativeValue.globalSecondaryIndexUpdates() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- GlobalSecondaryIndexAutoScalingUpdate._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + DafnySequence tableName; + tableName = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -10542,27 +8584,19 @@ public class ToDafny { + provisionedWriteCapacityAutoScalingUpdate = + Objects.nonNull(nativeValue.provisionedWriteCapacityAutoScalingUpdate()) + ? Option.create_Some( +- AutoScalingSettingsUpdate._typeDescriptor(), + ToDafny.AutoScalingSettingsUpdate( + nativeValue.provisionedWriteCapacityAutoScalingUpdate() + ) + ) +- : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); ++ : Option.create_None(); + Option> replicaUpdates; + replicaUpdates = + (Objects.nonNull(nativeValue.replicaUpdates()) && + nativeValue.replicaUpdates().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- ReplicaAutoScalingUpdate._typeDescriptor() +- ), + ToDafny.ReplicaAutoScalingUpdateList(nativeValue.replicaUpdates()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- ReplicaAutoScalingUpdate._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new UpdateTableReplicaAutoScalingInput( + globalSecondaryIndexUpdates, + tableName, +@@ -10578,12 +8612,11 @@ public class ToDafny { + tableAutoScalingDescription = + Objects.nonNull(nativeValue.tableAutoScalingDescription()) + ? Option.create_Some( +- TableAutoScalingDescription._typeDescriptor(), + ToDafny.TableAutoScalingDescription( + nativeValue.tableAutoScalingDescription() + ) + ) +- : Option.create_None(TableAutoScalingDescription._typeDescriptor()); ++ : Option.create_None(); + return new UpdateTableReplicaAutoScalingOutput(tableAutoScalingDescription); + } + +@@ -10608,10 +8641,9 @@ public class ToDafny { + timeToLiveSpecification = + Objects.nonNull(nativeValue.timeToLiveSpecification()) + ? Option.create_Some( +- TimeToLiveSpecification._typeDescriptor(), + ToDafny.TimeToLiveSpecification(nativeValue.timeToLiveSpecification()) + ) +- : Option.create_None(TimeToLiveSpecification._typeDescriptor()); ++ : Option.create_None(); + return new UpdateTimeToLiveOutput(timeToLiveSpecification); + } + +@@ -10621,19 +8653,13 @@ public class ToDafny { + Option putRequest; + putRequest = + Objects.nonNull(nativeValue.putRequest()) +- ? Option.create_Some( +- PutRequest._typeDescriptor(), +- ToDafny.PutRequest(nativeValue.putRequest()) +- ) +- : Option.create_None(PutRequest._typeDescriptor()); ++ ? Option.create_Some(ToDafny.PutRequest(nativeValue.putRequest())) ++ : Option.create_None(); + Option deleteRequest; + deleteRequest = + Objects.nonNull(nativeValue.deleteRequest()) +- ? Option.create_Some( +- DeleteRequest._typeDescriptor(), +- ToDafny.DeleteRequest(nativeValue.deleteRequest()) +- ) +- : Option.create_None(DeleteRequest._typeDescriptor()); ++ ? Option.create_Some(ToDafny.DeleteRequest(nativeValue.deleteRequest())) ++ : Option.create_None(); + return new WriteRequest(putRequest, deleteRequest); + } + +@@ -10654,14 +8680,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_BackupInUseException(message); + } + +@@ -10670,14 +8693,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_BackupNotFoundException(message); + } + +@@ -10686,14 +8706,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ConditionalCheckFailedException(message); + } + +@@ -10702,14 +8719,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ContinuousBackupsUnavailableException(message); + } + +@@ -10718,14 +8732,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_DuplicateItemException(message); + } + +@@ -10734,14 +8745,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ExportConflictException(message); + } + +@@ -10750,14 +8758,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ExportNotFoundException(message); + } + +@@ -10766,14 +8771,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_GlobalTableAlreadyExistsException(message); + } + +@@ -10782,14 +8784,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_GlobalTableNotFoundException(message); + } + +@@ -10798,14 +8797,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_IdempotentParameterMismatchException(message); + } + +@@ -10814,14 +8810,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ImportConflictException(message); + } + +@@ -10830,14 +8823,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ImportNotFoundException(message); + } + +@@ -10846,14 +8836,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_IndexNotFoundException(message); + } + +@@ -10862,14 +8849,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InternalServerError(message); + } + +@@ -10878,14 +8862,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidExportTimeException(message); + } + +@@ -10894,14 +8875,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidRestoreTimeException(message); + } + +@@ -10912,14 +8890,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ItemCollectionSizeLimitExceededException(message); + } + +@@ -10928,14 +8903,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_LimitExceededException(message); + } + +@@ -10946,14 +8918,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_PointInTimeRecoveryUnavailableException(message); + } + +@@ -10964,14 +8933,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ProvisionedThroughputExceededException(message); + } + +@@ -10980,14 +8946,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ReplicaAlreadyExistsException(message); + } + +@@ -10996,14 +8959,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ReplicaNotFoundException(message); + } + +@@ -11012,14 +8972,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_RequestLimitExceeded(message); + } + +@@ -11028,14 +8985,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ResourceInUseException(message); + } + +@@ -11044,14 +8998,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ResourceNotFoundException(message); + } + +@@ -11060,14 +9011,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_TableAlreadyExistsException(message); + } + +@@ -11076,14 +9024,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_TableInUseException(message); + } + +@@ -11092,14 +9037,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_TableNotFoundException(message); + } + +@@ -11108,25 +9050,19 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> cancellationReasons; + cancellationReasons = + (Objects.nonNull(nativeValue.cancellationReasons()) && + nativeValue.cancellationReasons().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(CancellationReason._typeDescriptor()), + ToDafny.CancellationReasonList(nativeValue.cancellationReasons()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(CancellationReason._typeDescriptor()) +- ); ++ : Option.create_None(); + return new Error_TransactionCanceledException(message, cancellationReasons); + } + +@@ -11135,14 +9071,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_TransactionConflictException(message); + } + +@@ -11151,14 +9084,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_TransactionInProgressException(message); + } + +diff --git b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java +index 171a36d3..3964b7cb 100644 +--- b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java ++++ a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java +@@ -8040,6 +8040,126 @@ public class ToNative { + return builder.build(); + } + ++ // BEGIN MANUAL EDIT ++ public static RuntimeException Error( ++ software.amazon.cryptography.services.dynamodb.internaldafny.types.Error dafnyValue ++ ) { ++ if (dafnyValue.is_BackupInUseException()) { ++ return ToNative.Error((Error_BackupInUseException) dafnyValue); ++ } ++ if (dafnyValue.is_BackupNotFoundException()) { ++ return ToNative.Error((Error_BackupNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_ConditionalCheckFailedException()) { ++ return ToNative.Error((Error_ConditionalCheckFailedException) dafnyValue); ++ } ++ if (dafnyValue.is_ContinuousBackupsUnavailableException()) { ++ return ToNative.Error( ++ (Error_ContinuousBackupsUnavailableException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_DuplicateItemException()) { ++ return ToNative.Error((Error_DuplicateItemException) dafnyValue); ++ } ++ if (dafnyValue.is_ExportConflictException()) { ++ return ToNative.Error((Error_ExportConflictException) dafnyValue); ++ } ++ if (dafnyValue.is_ExportNotFoundException()) { ++ return ToNative.Error((Error_ExportNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_GlobalTableAlreadyExistsException()) { ++ return ToNative.Error( ++ (Error_GlobalTableAlreadyExistsException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_GlobalTableNotFoundException()) { ++ return ToNative.Error((Error_GlobalTableNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_IdempotentParameterMismatchException()) { ++ return ToNative.Error( ++ (Error_IdempotentParameterMismatchException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_ImportConflictException()) { ++ return ToNative.Error((Error_ImportConflictException) dafnyValue); ++ } ++ if (dafnyValue.is_ImportNotFoundException()) { ++ return ToNative.Error((Error_ImportNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_IndexNotFoundException()) { ++ return ToNative.Error((Error_IndexNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_InternalServerError()) { ++ return ToNative.Error((Error_InternalServerError) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidExportTimeException()) { ++ return ToNative.Error((Error_InvalidExportTimeException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidRestoreTimeException()) { ++ return ToNative.Error((Error_InvalidRestoreTimeException) dafnyValue); ++ } ++ if (dafnyValue.is_ItemCollectionSizeLimitExceededException()) { ++ return ToNative.Error( ++ (Error_ItemCollectionSizeLimitExceededException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_LimitExceededException()) { ++ return ToNative.Error((Error_LimitExceededException) dafnyValue); ++ } ++ if (dafnyValue.is_PointInTimeRecoveryUnavailableException()) { ++ return ToNative.Error( ++ (Error_PointInTimeRecoveryUnavailableException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_ProvisionedThroughputExceededException()) { ++ return ToNative.Error( ++ (Error_ProvisionedThroughputExceededException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_ReplicaAlreadyExistsException()) { ++ return ToNative.Error((Error_ReplicaAlreadyExistsException) dafnyValue); ++ } ++ if (dafnyValue.is_ReplicaNotFoundException()) { ++ return ToNative.Error((Error_ReplicaNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_RequestLimitExceeded()) { ++ return ToNative.Error((Error_RequestLimitExceeded) dafnyValue); ++ } ++ if (dafnyValue.is_ResourceInUseException()) { ++ return ToNative.Error((Error_ResourceInUseException) dafnyValue); ++ } ++ if (dafnyValue.is_ResourceNotFoundException()) { ++ return ToNative.Error((Error_ResourceNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_TableAlreadyExistsException()) { ++ return ToNative.Error((Error_TableAlreadyExistsException) dafnyValue); ++ } ++ if (dafnyValue.is_TableInUseException()) { ++ return ToNative.Error((Error_TableInUseException) dafnyValue); ++ } ++ if (dafnyValue.is_TableNotFoundException()) { ++ return ToNative.Error((Error_TableNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_TransactionCanceledException()) { ++ return ToNative.Error((Error_TransactionCanceledException) dafnyValue); ++ } ++ if (dafnyValue.is_TransactionConflictException()) { ++ return ToNative.Error((Error_TransactionConflictException) dafnyValue); ++ } ++ if (dafnyValue.is_TransactionInProgressException()) { ++ return ToNative.Error((Error_TransactionInProgressException) dafnyValue); ++ } ++ if (dafnyValue.is_Opaque()) { ++ return ToNative.Error((Error_Opaque) dafnyValue); ++ } ++ // TODO This should indicate a codegen bug ++ return new IllegalStateException( ++ String.format("Unknown error thrown while calling DDB. %s", dafnyValue) ++ ); ++ } ++ ++ // END MANUAL EDIT ++ + public static DynamoDbClient DynamoDB_20120810(IDynamoDBClient dafnyValue) { + return ((Shim) dafnyValue).impl(); + } +@@ -8054,17 +8174,9 @@ public class ToNative { + return (DynamoDbException) dafnyValue.dtor_obj(); + } else if (dafnyValue.dtor_obj() instanceof Exception) { + return (RuntimeException) dafnyValue.dtor_obj(); +- } else if (dafnyValue.dtor_message().is_Some()) { +- final String suffix = dafnyValue.dtor_obj() != null +- ? String.format(" Unknown Object: %s", dafnyValue.dtor_obj()) +- : ""; +- final String message = +- software.amazon.smithy.dafny.conversion.ToNative.Simple.String( +- dafnyValue.dtor_message().dtor_value() +- ) + +- suffix; +- return new RuntimeException(message); + } ++ // BEGIN MANUAL EDIT ++ // END MANUAL EDIT + return new IllegalStateException( + String.format( + "Unknown error thrown while calling Amazon DynamoDB. %s", diff --git a/ComAmazonawsDynamodb/project.properties b/ComAmazonawsDynamodb/project.properties index dd7eb37b9..b35126df6 100644 --- a/ComAmazonawsDynamodb/project.properties +++ b/ComAmazonawsDynamodb/project.properties @@ -1,3 +1,4 @@ # This file stores the top level dafny version information. # All elements of the project need to agree on this version. dafnyVersion=4.2.0 +dafnyRuntimeJavaVersion=4.2.0 diff --git a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java index a3f3777e3..69b00db9f 100644 --- a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java +++ b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/Shim.java @@ -288,7 +288,7 @@ public Result BatchExecuteStatement( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -312,7 +312,7 @@ public Result BatchGetItem( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -338,7 +338,7 @@ public Result BatchWriteItem( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -366,7 +366,7 @@ public Result CreateBackup( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -392,7 +392,7 @@ public Result CreateGlobalTable( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -412,7 +412,7 @@ public Result CreateTable(CreateTableInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -436,7 +436,7 @@ public Result DeleteBackup( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -464,7 +464,7 @@ public Result DeleteItem(DeleteItemInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -486,7 +486,7 @@ public Result DeleteTable(DeleteTableInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -506,7 +506,7 @@ public Result DescribeBackup( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -530,7 +530,7 @@ > DescribeContinuousBackups(DescribeContinuousBackupsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -554,7 +554,7 @@ > DescribeContributorInsights(DescribeContributorInsightsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -573,7 +573,7 @@ public Result DescribeEndpoints( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -595,7 +595,7 @@ public Result DescribeExport( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -618,7 +618,7 @@ public Result DescribeGlobalTable( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -642,7 +642,7 @@ > DescribeGlobalTableSettings(DescribeGlobalTableSettingsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -660,7 +660,7 @@ public Result DescribeImport( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -686,7 +686,7 @@ > DescribeKinesisStreamingDestination( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -704,7 +704,7 @@ public Result DescribeLimits( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -724,7 +724,7 @@ public Result DescribeTable( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -750,7 +750,7 @@ > DescribeTableReplicaAutoScaling( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -774,7 +774,7 @@ public Result DescribeTimeToLive( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -804,7 +804,7 @@ > DisableKinesisStreamingDestination( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -834,7 +834,7 @@ > EnableKinesisStreamingDestination( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -868,7 +868,7 @@ public Result ExecuteStatement( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -902,7 +902,7 @@ public Result ExecuteTransaction( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -934,7 +934,7 @@ public Result ExportTableToPointInTime( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -956,7 +956,7 @@ public Result GetItem(GetItemInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -976,7 +976,7 @@ public Result ImportTable(ImportTableInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -992,7 +992,7 @@ public Result ListBackups(ListBackupsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1016,7 +1016,7 @@ public Result ListContributorInsights( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1034,7 +1034,7 @@ public Result ListExports(ListExportsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1054,7 +1054,7 @@ public Result ListGlobalTables( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1070,7 +1070,7 @@ public Result ListImports(ListImportsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1086,7 +1086,7 @@ public Result ListTables(ListTablesInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1110,7 +1110,7 @@ public Result ListTagsOfResource( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1138,7 +1138,7 @@ public Result PutItem(PutItemInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1160,7 +1160,7 @@ public Result Query(QueryInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1192,7 +1192,7 @@ public Result RestoreTableFromBackup( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1226,7 +1226,7 @@ > RestoreTableToPointInTime(RestoreTableToPointInTimeInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1248,7 +1248,7 @@ public Result Scan(ScanInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1269,7 +1269,7 @@ public Result TagResource(TagResourceInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1297,7 +1297,7 @@ public Result TransactGetItems( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1331,7 +1331,7 @@ public Result TransactWriteItems( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1352,7 +1352,7 @@ public Result UntagResource(UntagResourceInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1378,7 +1378,7 @@ public Result UpdateContinuousBackups( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1402,7 +1402,7 @@ > UpdateContributorInsights(UpdateContributorInsightsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1430,7 +1430,7 @@ public Result UpdateGlobalTable( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1462,7 +1462,7 @@ > UpdateGlobalTableSettings(UpdateGlobalTableSettingsInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1490,7 +1490,7 @@ public Result UpdateItem(UpdateItemInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1512,7 +1512,7 @@ public Result UpdateTable(UpdateTableInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1540,7 +1540,7 @@ > UpdateTableReplicaAutoScaling(UpdateTableReplicaAutoScalingInput input) { } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1566,7 +1566,7 @@ public Result UpdateTimeToLive( } catch (DynamoDbException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } } diff --git a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java index c2f87875c..914b78be7 100644 --- a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java +++ b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToDafny.java @@ -11,6 +11,7 @@ import java.lang.Byte; import java.lang.Character; import java.lang.Double; +import java.lang.Exception; import java.lang.IllegalArgumentException; import java.lang.Integer; import java.lang.Long; @@ -269,7 +270,6 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; -import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_Opaque; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; @@ -10489,9 +10489,21 @@ public static TimeToLiveStatus TimeToLiveStatus(String nativeValue) { } public static Error Error(DynamoDbException nativeValue) { - // BEGIN MANUAL EDIT - return new Error_Opaque(nativeValue); - // END MANUAL EDIT + // While this is logically identical to the other Opaque Error case, + // it is semantically distinct. + // An un-modeled Service Error is different from a Java Heap Exhaustion error. + // In the future, Smithy-Dafny MAY allow for this distinction. + // Which would allow Dafny developers to treat the two differently. + return Error.create_Opaque(nativeValue); + } + + public static Error Error(Exception nativeValue) { + // While this is logically identical to the other Opaque Error case, + // it is semantically distinct. + // An un-modeled Service Error is different from a Java Heap Exhaustion error. + // In the future, Smithy-Dafny MAY allow for this distinction. + // Which would allow Dafny developers to treat the two differently. + return Error.create_Opaque(nativeValue); } public static IDynamoDBClient DynamoDB_20120810(DynamoDbClient nativeValue) { diff --git a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java index 80bf84d1f..3964b7cb1 100644 --- a/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java +++ b/ComAmazonawsDynamodb/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/dynamodb/internaldafny/ToNative.java @@ -8,6 +8,9 @@ import java.lang.Byte; import java.lang.Character; import java.lang.Double; +import java.lang.Exception; +import java.lang.IllegalStateException; +import java.lang.RuntimeException; import java.lang.String; import java.util.List; import java.util.Map; @@ -109,9 +112,7 @@ import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationRequest; import software.amazon.awssdk.services.dynamodb.model.DisableKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.DuplicateItemException; -// BEGIN MANUAL EDIT import software.amazon.awssdk.services.dynamodb.model.DynamoDbException; -// END MANUAL EDIT import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationRequest; import software.amazon.awssdk.services.dynamodb.model.EnableKinesisStreamingDestinationResponse; import software.amazon.awssdk.services.dynamodb.model.Endpoint; @@ -352,9 +353,7 @@ import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException; -// BEGIN MANUAL EDIT import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_Opaque; -// END MANUAL EDIT import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException; import software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException; @@ -428,19 +427,6 @@ public class ToNative { - // BEGIN MANUAL EDIT - public static RuntimeException Error(Error_Opaque dafnyValue) { - if (dafnyValue.dtor_obj() instanceof DynamoDbException) { - return (DynamoDbException) dafnyValue.dtor_obj(); - } - // Because we only ever put `DynamoDbException` into `Error_Opaque`, - // recieving any other type here indicates a bug with the codegen. - // Bubble up some error to indicate this failure state. - return new IllegalStateException("Unknown error recieved from DynamoDb."); - } - - // END MANUAL EDIT - public static ArchivalSummary ArchivalSummary( software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary dafnyValue ) { @@ -8167,7 +8153,9 @@ public static RuntimeException Error( return ToNative.Error((Error_Opaque) dafnyValue); } // TODO This should indicate a codegen bug - return new IllegalStateException("Unknown error recieved from DynamoDb."); + return new IllegalStateException( + String.format("Unknown error thrown while calling DDB. %s", dafnyValue) + ); } // END MANUAL EDIT @@ -8175,4 +8163,25 @@ public static RuntimeException Error( public static DynamoDbClient DynamoDB_20120810(IDynamoDBClient dafnyValue) { return ((Shim) dafnyValue).impl(); } + + public static RuntimeException Error(Error_Opaque dafnyValue) { + // While the first two cases are logically identical, + // there is a semantic distinction. + // An un-modeled Service Error is different from a Java Heap Exhaustion error. + // In the future, Smithy-Dafny MAY allow for this distinction. + // Which would allow Dafny developers to treat the two differently. + if (dafnyValue.dtor_obj() instanceof DynamoDbException) { + return (DynamoDbException) dafnyValue.dtor_obj(); + } else if (dafnyValue.dtor_obj() instanceof Exception) { + return (RuntimeException) dafnyValue.dtor_obj(); + } + // BEGIN MANUAL EDIT + // END MANUAL EDIT + return new IllegalStateException( + String.format( + "Unknown error thrown while calling Amazon DynamoDB. %s", + dafnyValue + ) + ); + } } diff --git a/ComAmazonawsKms/codegen-patches/java/dafny-4.1.0.patch b/ComAmazonawsKms/codegen-patches/java/dafny-4.1.0.patch deleted file mode 100644 index 15d5e519e..000000000 --- a/ComAmazonawsKms/codegen-patches/java/dafny-4.1.0.patch +++ /dev/null @@ -1,202 +0,0 @@ -diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -index 9084fae1..880ddcae 100644 ---- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -+++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -@@ -4179,16 +4179,9 @@ public class ToDafny { - } - - public static Error Error(KmsException nativeValue) { -- Option> message; -- message = -- Objects.nonNull(nativeValue.getMessage()) -- ? Option.create_Some( -- software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( -- nativeValue.getMessage() -- ) -- ) -- : Option.create_None(); -- return new Error_Opaque(message); -+ // BEGIN MANUAL EDIT -+ return new Error_Opaque(nativeValue); -+ // END MANUAL EDIT - } - - public static IKMSClient TrentService(KmsClient nativeValue) { -diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -index b4cc1964..98e53314 100644 ---- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -+++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -@@ -103,6 +103,9 @@ import software.amazon.awssdk.services.kms.model.KeySpec; - import software.amazon.awssdk.services.kms.model.KeyState; - import software.amazon.awssdk.services.kms.model.KeyUnavailableException; - import software.amazon.awssdk.services.kms.model.KeyUsageType; -+// BEGIN MANUAL EDIT -+import software.amazon.awssdk.services.kms.model.KmsException; -+// END MANUAL EDIT - import software.amazon.awssdk.services.kms.model.KmsInternalException; - import software.amazon.awssdk.services.kms.model.KmsInvalidSignatureException; - import software.amazon.awssdk.services.kms.model.KmsInvalidStateException; -@@ -178,12 +181,30 @@ import software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUn - import software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException; -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_Opaque; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; -+// END MANUAL EDIT -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; -+// BEGIN MANUAL EDIT - import software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient; - - public class ToNative { - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error(Error_Opaque dafnyValue) { -+ if (dafnyValue.dtor_obj() instanceof KmsException) { -+ return (KmsException) dafnyValue.dtor_obj(); -+ } -+ // Because we only ever put `KmsException` into `Error_Opaque`, -+ // recieving any other type here indicates a bug with the codegen. -+ // Bubble up some error to indicate this failure state. -+ return new IllegalStateException("Unknown error recieved from KMS."); -+ } -+ -+ // END MANUAL EDIT -+ - public static AlgorithmSpec AlgorithmSpec( - software.amazon.cryptography.services.kms.internaldafny.types.AlgorithmSpec dafnyValue - ) { -@@ -3339,6 +3360,132 @@ public class ToNative { - return builder.build(); - } - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error( -+ software.amazon.cryptography.services.kms.internaldafny.types.Error dafnyValue -+ ) { -+ if (dafnyValue.is_AlreadyExistsException()) { -+ return ToNative.Error((Error_AlreadyExistsException) dafnyValue); -+ } -+ if (dafnyValue.is_CloudHsmClusterInUseException()) { -+ return ToNative.Error((Error_CloudHsmClusterInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_CloudHsmClusterInvalidConfigurationException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterInvalidConfigurationException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CloudHsmClusterNotActiveException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterNotActiveException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CloudHsmClusterNotFoundException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterNotFoundException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CloudHsmClusterNotRelatedException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterNotRelatedException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CustomKeyStoreHasCMKsException()) { -+ return ToNative.Error((Error_CustomKeyStoreHasCMKsException) dafnyValue); -+ } -+ if (dafnyValue.is_CustomKeyStoreInvalidStateException()) { -+ return ToNative.Error( -+ (Error_CustomKeyStoreInvalidStateException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CustomKeyStoreNameInUseException()) { -+ return ToNative.Error( -+ (Error_CustomKeyStoreNameInUseException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CustomKeyStoreNotFoundException()) { -+ return ToNative.Error((Error_CustomKeyStoreNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_DependencyTimeoutException()) { -+ return ToNative.Error((Error_DependencyTimeoutException) dafnyValue); -+ } -+ if (dafnyValue.is_DisabledException()) { -+ return ToNative.Error((Error_DisabledException) dafnyValue); -+ } -+ if (dafnyValue.is_ExpiredImportTokenException()) { -+ return ToNative.Error((Error_ExpiredImportTokenException) dafnyValue); -+ } -+ if (dafnyValue.is_IncorrectKeyException()) { -+ return ToNative.Error((Error_IncorrectKeyException) dafnyValue); -+ } -+ if (dafnyValue.is_IncorrectKeyMaterialException()) { -+ return ToNative.Error((Error_IncorrectKeyMaterialException) dafnyValue); -+ } -+ if (dafnyValue.is_IncorrectTrustAnchorException()) { -+ return ToNative.Error((Error_IncorrectTrustAnchorException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidAliasNameException()) { -+ return ToNative.Error((Error_InvalidAliasNameException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidArnException()) { -+ return ToNative.Error((Error_InvalidArnException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidCiphertextException()) { -+ return ToNative.Error((Error_InvalidCiphertextException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidGrantIdException()) { -+ return ToNative.Error((Error_InvalidGrantIdException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidGrantTokenException()) { -+ return ToNative.Error((Error_InvalidGrantTokenException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidImportTokenException()) { -+ return ToNative.Error((Error_InvalidImportTokenException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidKeyUsageException()) { -+ return ToNative.Error((Error_InvalidKeyUsageException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidMarkerException()) { -+ return ToNative.Error((Error_InvalidMarkerException) dafnyValue); -+ } -+ if (dafnyValue.is_KeyUnavailableException()) { -+ return ToNative.Error((Error_KeyUnavailableException) dafnyValue); -+ } -+ if (dafnyValue.is_KMSInternalException()) { -+ return ToNative.Error((Error_KMSInternalException) dafnyValue); -+ } -+ if (dafnyValue.is_KMSInvalidSignatureException()) { -+ return ToNative.Error((Error_KMSInvalidSignatureException) dafnyValue); -+ } -+ if (dafnyValue.is_KMSInvalidStateException()) { -+ return ToNative.Error((Error_KMSInvalidStateException) dafnyValue); -+ } -+ if (dafnyValue.is_LimitExceededException()) { -+ return ToNative.Error((Error_LimitExceededException) dafnyValue); -+ } -+ if (dafnyValue.is_MalformedPolicyDocumentException()) { -+ return ToNative.Error( -+ (Error_MalformedPolicyDocumentException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_NotFoundException()) { -+ return ToNative.Error((Error_NotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_TagException()) { -+ return ToNative.Error((Error_TagException) dafnyValue); -+ } -+ if (dafnyValue.is_UnsupportedOperationException()) { -+ return ToNative.Error((Error_UnsupportedOperationException) dafnyValue); -+ } -+ if (dafnyValue.is_Opaque()) { -+ return ToNative.Error((Error_Opaque) dafnyValue); -+ } -+ // TODO This should indicate a codegen bug -+ return new IllegalStateException("Unknown error recieved from KMS."); -+ } -+ -+ // END MANUAL EDIT -+ - public static KmsClient TrentService(IKMSClient dafnyValue) { - return ((Shim) dafnyValue).impl(); - } diff --git a/ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch b/ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch index 481c6e2fb..c30c759d3 100644 --- a/ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch +++ b/ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch @@ -1,7 +1,7 @@ -diff --git a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -index c4416ed5..e0a52bfe 100644 ---- a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -+++ b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java +diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java +index 52abd119..9d02d333 100644 +--- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java ++++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java @@ -2300,7 +2300,13 @@ public class ToDafny { public static DafnySequence< @@ -50,51 +50,11 @@ index c4416ed5..e0a52bfe 100644 { return SigningAlgorithmSpec.create_SM2DSA(); } -diff --git a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -index 7c11a9bf..ac7b1a14 100644 ---- a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -+++ b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -@@ -113,6 +113,9 @@ import software.amazon.awssdk.services.kms.model.KeySpec; - import software.amazon.awssdk.services.kms.model.KeyState; - import software.amazon.awssdk.services.kms.model.KeyUnavailableException; - import software.amazon.awssdk.services.kms.model.KeyUsageType; -+// BEGIN MANUAL EDIT -+import software.amazon.awssdk.services.kms.model.KmsException; -+// END MANUAL EDIT - import software.amazon.awssdk.services.kms.model.KmsInternalException; - import software.amazon.awssdk.services.kms.model.KmsInvalidMacException; - import software.amazon.awssdk.services.kms.model.KmsInvalidSignatureException; -@@ -220,6 +223,9 @@ import software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUn - import software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException; -+// BEGIN MANUAL EDIT -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_Opaque; -+// END MANUAL EDIT - import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException; -@@ -238,6 +244,19 @@ import software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient; - - public class ToNative { - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error(Error_Opaque dafnyValue) { -+ if (dafnyValue.dtor_obj() instanceof KmsException) { -+ return (KmsException) dafnyValue.dtor_obj(); -+ } -+ // Because we only ever put `KmsException` into `Error_Opaque`, -+ // recieving any other type here indicates a bug with the codegen. -+ // Bubble up some error to indicate this failure state. -+ return new IllegalStateException("Unknown error recieved from KMS."); -+ } -+ -+ // END MANUAL EDIT -+ - public static AlgorithmSpec AlgorithmSpec( - software.amazon.cryptography.services.kms.internaldafny.types.AlgorithmSpec dafnyValue - ) { -@@ -4537,6 +4556,195 @@ public class ToNative { +diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java +index 56979da2..59df5196 100644 +--- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java ++++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java +@@ -4542,6 +4542,196 @@ public class ToNative { return builder.build(); } @@ -281,12 +241,33 @@ index 7c11a9bf..ac7b1a14 100644 + if (dafnyValue.is_Opaque()) { + return ToNative.Error((Error_Opaque) dafnyValue); + } -+ // TODO This should indicate a codegen bug -+ return new IllegalStateException("Unknown error recieved from KMS."); ++ // TODO This should indicate a codegen bug; every error Should have been taken care of. ++ return new IllegalStateException( ++ String.format("Unknown error thrown while calling KMS. %s", dafnyValue) ++ ); + } + + // END MANUAL EDIT -+ public static KmsClient TrentService(IKMSClient dafnyValue) { return ((Shim) dafnyValue).impl(); } +@@ -4556,17 +4746,9 @@ public class ToNative { + return (KmsException) dafnyValue.dtor_obj(); + } else if (dafnyValue.dtor_obj() instanceof Exception) { + return (RuntimeException) dafnyValue.dtor_obj(); +- } else if (dafnyValue.dtor_message().is_Some()) { +- final String suffix = dafnyValue.dtor_obj() != null +- ? String.format(" Unknown Object: %s", dafnyValue.dtor_obj()) +- : ""; +- final String message = +- software.amazon.smithy.dafny.conversion.ToNative.Simple.String( +- dafnyValue.dtor_message().dtor_value() +- ) + +- suffix; +- return new RuntimeException(message); + } ++ // BEGIN MANUAL EDIT ++ // END MANUAL EDIT + return new IllegalStateException( + String.format( + "Unknown error thrown while calling AWS Key Management Service. %s", diff --git a/ComAmazonawsKms/codegen-patches/java/dafny-4.3.0.patch b/ComAmazonawsKms/codegen-patches/java/dafny-4.3.0.patch deleted file mode 100644 index 48b08ea2b..000000000 --- a/ComAmazonawsKms/codegen-patches/java/dafny-4.3.0.patch +++ /dev/null @@ -1,205 +0,0 @@ -diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -index 31895371..6a3a24f6 100644 ---- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -+++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java -@@ -4948,19 +4813,9 @@ public class ToDafny { - } - - public static Error Error(KmsException nativeValue) { -- Option> message; -- message = -- Objects.nonNull(nativeValue.getMessage()) -- ? Option.create_Some( -- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), -- software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( -- nativeValue.getMessage() -- ) -- ) -- : Option.create_None( -- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) -- ); -- return new Error_Opaque(message); -+ // BEGIN MANUAL EDIT -+ return new Error_Opaque(nativeValue); -+ // END MANUAL EDIT - } - - public static IKMSClient TrentService(KmsClient nativeValue) { -diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -index b4cc1964..98e53314 100644 ---- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -+++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java -@@ -103,6 +103,9 @@ import software.amazon.awssdk.services.kms.model.KeySpec; - import software.amazon.awssdk.services.kms.model.KeyState; - import software.amazon.awssdk.services.kms.model.KeyUnavailableException; - import software.amazon.awssdk.services.kms.model.KeyUsageType; -+// BEGIN MANUAL EDIT -+import software.amazon.awssdk.services.kms.model.KmsException; -+// END MANUAL EDIT - import software.amazon.awssdk.services.kms.model.KmsInternalException; - import software.amazon.awssdk.services.kms.model.KmsInvalidSignatureException; - import software.amazon.awssdk.services.kms.model.KmsInvalidStateException; -@@ -178,12 +181,30 @@ import software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUn - import software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException; -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_Opaque; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; -+// END MANUAL EDIT -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; -+import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; - import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; -+// BEGIN MANUAL EDIT - import software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient; - - public class ToNative { - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error(Error_Opaque dafnyValue) { -+ if (dafnyValue.dtor_obj() instanceof KmsException) { -+ return (KmsException) dafnyValue.dtor_obj(); -+ } -+ // Because we only ever put `KmsException` into `Error_Opaque`, -+ // recieving any other type here indicates a bug with the codegen. -+ // Bubble up some error to indicate this failure state. -+ return new IllegalStateException("Unknown error recieved from KMS."); -+ } -+ -+ // END MANUAL EDIT -+ - public static AlgorithmSpec AlgorithmSpec( - software.amazon.cryptography.services.kms.internaldafny.types.AlgorithmSpec dafnyValue - ) { -@@ -3339,6 +3360,132 @@ public class ToNative { - return builder.build(); - } - -+ // BEGIN MANUAL EDIT -+ public static RuntimeException Error( -+ software.amazon.cryptography.services.kms.internaldafny.types.Error dafnyValue -+ ) { -+ if (dafnyValue.is_AlreadyExistsException()) { -+ return ToNative.Error((Error_AlreadyExistsException) dafnyValue); -+ } -+ if (dafnyValue.is_CloudHsmClusterInUseException()) { -+ return ToNative.Error((Error_CloudHsmClusterInUseException) dafnyValue); -+ } -+ if (dafnyValue.is_CloudHsmClusterInvalidConfigurationException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterInvalidConfigurationException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CloudHsmClusterNotActiveException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterNotActiveException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CloudHsmClusterNotFoundException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterNotFoundException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CloudHsmClusterNotRelatedException()) { -+ return ToNative.Error( -+ (Error_CloudHsmClusterNotRelatedException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CustomKeyStoreHasCMKsException()) { -+ return ToNative.Error((Error_CustomKeyStoreHasCMKsException) dafnyValue); -+ } -+ if (dafnyValue.is_CustomKeyStoreInvalidStateException()) { -+ return ToNative.Error( -+ (Error_CustomKeyStoreInvalidStateException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CustomKeyStoreNameInUseException()) { -+ return ToNative.Error( -+ (Error_CustomKeyStoreNameInUseException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_CustomKeyStoreNotFoundException()) { -+ return ToNative.Error((Error_CustomKeyStoreNotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_DependencyTimeoutException()) { -+ return ToNative.Error((Error_DependencyTimeoutException) dafnyValue); -+ } -+ if (dafnyValue.is_DisabledException()) { -+ return ToNative.Error((Error_DisabledException) dafnyValue); -+ } -+ if (dafnyValue.is_ExpiredImportTokenException()) { -+ return ToNative.Error((Error_ExpiredImportTokenException) dafnyValue); -+ } -+ if (dafnyValue.is_IncorrectKeyException()) { -+ return ToNative.Error((Error_IncorrectKeyException) dafnyValue); -+ } -+ if (dafnyValue.is_IncorrectKeyMaterialException()) { -+ return ToNative.Error((Error_IncorrectKeyMaterialException) dafnyValue); -+ } -+ if (dafnyValue.is_IncorrectTrustAnchorException()) { -+ return ToNative.Error((Error_IncorrectTrustAnchorException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidAliasNameException()) { -+ return ToNative.Error((Error_InvalidAliasNameException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidArnException()) { -+ return ToNative.Error((Error_InvalidArnException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidCiphertextException()) { -+ return ToNative.Error((Error_InvalidCiphertextException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidGrantIdException()) { -+ return ToNative.Error((Error_InvalidGrantIdException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidGrantTokenException()) { -+ return ToNative.Error((Error_InvalidGrantTokenException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidImportTokenException()) { -+ return ToNative.Error((Error_InvalidImportTokenException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidKeyUsageException()) { -+ return ToNative.Error((Error_InvalidKeyUsageException) dafnyValue); -+ } -+ if (dafnyValue.is_InvalidMarkerException()) { -+ return ToNative.Error((Error_InvalidMarkerException) dafnyValue); -+ } -+ if (dafnyValue.is_KeyUnavailableException()) { -+ return ToNative.Error((Error_KeyUnavailableException) dafnyValue); -+ } -+ if (dafnyValue.is_KMSInternalException()) { -+ return ToNative.Error((Error_KMSInternalException) dafnyValue); -+ } -+ if (dafnyValue.is_KMSInvalidSignatureException()) { -+ return ToNative.Error((Error_KMSInvalidSignatureException) dafnyValue); -+ } -+ if (dafnyValue.is_KMSInvalidStateException()) { -+ return ToNative.Error((Error_KMSInvalidStateException) dafnyValue); -+ } -+ if (dafnyValue.is_LimitExceededException()) { -+ return ToNative.Error((Error_LimitExceededException) dafnyValue); -+ } -+ if (dafnyValue.is_MalformedPolicyDocumentException()) { -+ return ToNative.Error( -+ (Error_MalformedPolicyDocumentException) dafnyValue -+ ); -+ } -+ if (dafnyValue.is_NotFoundException()) { -+ return ToNative.Error((Error_NotFoundException) dafnyValue); -+ } -+ if (dafnyValue.is_TagException()) { -+ return ToNative.Error((Error_TagException) dafnyValue); -+ } -+ if (dafnyValue.is_UnsupportedOperationException()) { -+ return ToNative.Error((Error_UnsupportedOperationException) dafnyValue); -+ } -+ if (dafnyValue.is_Opaque()) { -+ return ToNative.Error((Error_Opaque) dafnyValue); -+ } -+ // TODO This should indicate a codegen bug -+ return new IllegalStateException("Unknown error recieved from KMS."); -+ } -+ -+ // END MANUAL EDIT -+ - public static KmsClient TrentService(IKMSClient dafnyValue) { - return ((Shim) dafnyValue).impl(); - } diff --git a/ComAmazonawsKms/codegen-patches/java/dafny-4.4.0.patch b/ComAmazonawsKms/codegen-patches/java/dafny-4.4.0.patch new file mode 100644 index 000000000..c69ba5ddd --- /dev/null +++ b/ComAmazonawsKms/codegen-patches/java/dafny-4.4.0.patch @@ -0,0 +1,8859 @@ +diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java +index 1b6da026..946ba4d3 100644 +--- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java ++++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java +@@ -179,53 +179,21 @@ public class Shim implements IKMSClient { + _impl.cancelKeyDeletion(converted); + CancelKeyDeletionResponse dafnyResponse = + ToDafny.CancelKeyDeletionResponse(result); +- return Result.create_Success( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CancelKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -240,53 +208,21 @@ public class Shim implements IKMSClient { + _impl.connectCustomKeyStore(converted); + ConnectCustomKeyStoreResponse dafnyResponse = + ToDafny.ConnectCustomKeyStoreResponse(result); +- return Result.create_Success( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CloudHsmClusterInvalidConfigurationException ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterNotActiveException ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreInvalidStateException ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ConnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -296,65 +232,25 @@ public class Shim implements IKMSClient { + ToNative.CreateAliasRequest(input); + try { + _impl.createAlias(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (AlreadyExistsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidAliasNameException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -369,125 +265,45 @@ public class Shim implements IKMSClient { + _impl.createCustomKeyStore(converted); + CreateCustomKeyStoreResponse dafnyResponse = + ToDafny.CreateCustomKeyStoreResponse(result); +- return Result.create_Success( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CloudHsmClusterInUseException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterInvalidConfigurationException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterNotActiveException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterNotFoundException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNameInUseException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (IncorrectTrustAnchorException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyIncorrectAuthenticationCredentialException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyInvalidConfigurationException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyInvalidResponseException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyUriEndpointInUseException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyUriInUseException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyUriUnreachableException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyVpcEndpointServiceInUseException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyVpcEndpointServiceInvalidConfigurationException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyVpcEndpointServiceNotFoundException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CreateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -501,77 +317,29 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.CreateGrantResponse result = + _impl.createGrant(converted); + CreateGrantResponse dafnyResponse = ToDafny.CreateGrantResponse(result); +- return Result.create_Success( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CreateGrantResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -583,101 +351,37 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.CreateKeyResponse result = + _impl.createKey(converted); + CreateKeyResponse dafnyResponse = ToDafny.CreateKeyResponse(result); +- return Result.create_Success( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CloudHsmClusterInvalidConfigurationException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreInvalidStateException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (MalformedPolicyDocumentException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TagException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksKeyAlreadyInUseException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksKeyInvalidConfigurationException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksKeyNotFoundException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- CreateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -689,89 +393,33 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.DecryptResponse result = + _impl.decrypt(converted); + DecryptResponse dafnyResponse = ToDafny.DecryptResponse(result); +- return Result.create_Success( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (IncorrectKeyException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidCiphertextException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DecryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -781,47 +429,19 @@ public class Shim implements IKMSClient { + ToNative.DeleteAliasRequest(input); + try { + _impl.deleteAlias(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -836,47 +456,19 @@ public class Shim implements IKMSClient { + _impl.deleteCustomKeyStore(converted); + DeleteCustomKeyStoreResponse dafnyResponse = + ToDafny.DeleteCustomKeyStoreResponse(result); +- return Result.create_Success( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CustomKeyStoreHasCmKsException ex) { +- return Result.create_Failure( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreInvalidStateException ex) { +- return Result.create_Failure( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DeleteCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -888,59 +480,23 @@ public class Shim implements IKMSClient { + ToNative.DeleteImportedKeyMaterialRequest(input); + try { + _impl.deleteImportedKeyMaterial(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -955,77 +511,29 @@ public class Shim implements IKMSClient { + _impl.deriveSharedSecret(converted); + DeriveSharedSecretResponse dafnyResponse = + ToDafny.DeriveSharedSecretResponse(result); +- return Result.create_Success( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DeriveSharedSecretResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1040,41 +548,17 @@ public class Shim implements IKMSClient { + _impl.describeCustomKeyStores(converted); + DescribeCustomKeyStoresResponse dafnyResponse = + ToDafny.DescribeCustomKeyStoresResponse(result); +- return Result.create_Success( +- DescribeCustomKeyStoresResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- DescribeCustomKeyStoresResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidMarkerException ex) { +- return Result.create_Failure( +- DescribeCustomKeyStoresResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- DescribeCustomKeyStoresResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- DescribeCustomKeyStoresResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeCustomKeyStoresResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1088,47 +572,19 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.DescribeKeyResponse result = + _impl.describeKey(converted); + DescribeKeyResponse dafnyResponse = ToDafny.DescribeKeyResponse(result); +- return Result.create_Success( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DescribeKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1138,53 +594,21 @@ public class Shim implements IKMSClient { + ToNative.DisableKeyRequest(input); + try { + _impl.disableKey(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1196,65 +620,25 @@ public class Shim implements IKMSClient { + ToNative.DisableKeyRotationRequest(input); + try { + _impl.disableKeyRotation(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1270,41 +654,17 @@ public class Shim implements IKMSClient { + _impl.disconnectCustomKeyStore(converted); + DisconnectCustomKeyStoreResponse dafnyResponse = + ToDafny.DisconnectCustomKeyStoreResponse(result); +- return Result.create_Success( +- DisconnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CustomKeyStoreInvalidStateException ex) { +- return Result.create_Failure( +- DisconnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- DisconnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- DisconnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- DisconnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- DisconnectCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1314,59 +674,23 @@ public class Shim implements IKMSClient { + ToNative.EnableKeyRequest(input); + try { + _impl.enableKey(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1378,65 +702,25 @@ public class Shim implements IKMSClient { + ToNative.EnableKeyRotationRequest(input); + try { + _impl.enableKeyRotation(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1448,77 +732,29 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.EncryptResponse result = + _impl.encrypt(converted); + EncryptResponse dafnyResponse = ToDafny.EncryptResponse(result); +- return Result.create_Success( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- EncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1534,77 +770,29 @@ public class Shim implements IKMSClient { + GenerateDataKeyResponse dafnyResponse = ToDafny.GenerateDataKeyResponse( + result + ); +- return Result.create_Success( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GenerateDataKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1619,83 +807,31 @@ public class Shim implements IKMSClient { + _impl.generateDataKeyPair(converted); + GenerateDataKeyPairResponse dafnyResponse = + ToDafny.GenerateDataKeyPairResponse(result); +- return Result.create_Success( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GenerateDataKeyPairResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1713,83 +849,31 @@ public class Shim implements IKMSClient { + _impl.generateDataKeyPairWithoutPlaintext(converted); + GenerateDataKeyPairWithoutPlaintextResponse dafnyResponse = + ToDafny.GenerateDataKeyPairWithoutPlaintextResponse(result); +- return Result.create_Success( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1807,77 +891,29 @@ public class Shim implements IKMSClient { + _impl.generateDataKeyWithoutPlaintext(converted); + GenerateDataKeyWithoutPlaintextResponse dafnyResponse = + ToDafny.GenerateDataKeyWithoutPlaintextResponse(result); +- return Result.create_Success( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1891,71 +927,27 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.GenerateMacResponse result = + _impl.generateMac(converted); + GenerateMacResponse dafnyResponse = ToDafny.GenerateMacResponse(result); +- return Result.create_Success( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DisabledException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GenerateMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -1971,53 +963,21 @@ public class Shim implements IKMSClient { + GenerateRandomResponse dafnyResponse = ToDafny.GenerateRandomResponse( + result + ); +- return Result.create_Success( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CustomKeyStoreInvalidStateException ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GenerateRandomResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2031,53 +991,21 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.GetKeyPolicyResponse result = + _impl.getKeyPolicy(converted); + GetKeyPolicyResponse dafnyResponse = ToDafny.GetKeyPolicyResponse(result); +- return Result.create_Success( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GetKeyPolicyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2092,59 +1020,23 @@ public class Shim implements IKMSClient { + _impl.getKeyRotationStatus(converted); + GetKeyRotationStatusResponse dafnyResponse = + ToDafny.GetKeyRotationStatusResponse(result); +- return Result.create_Success( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GetKeyRotationStatusResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2159,59 +1051,23 @@ public class Shim implements IKMSClient { + _impl.getParametersForImport(converted); + GetParametersForImportResponse dafnyResponse = + ToDafny.GetParametersForImportResponse(result); +- return Result.create_Success( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GetParametersForImportResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2225,83 +1081,31 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.GetPublicKeyResponse result = + _impl.getPublicKey(converted); + GetPublicKeyResponse dafnyResponse = ToDafny.GetPublicKeyResponse(result); +- return Result.create_Success( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- GetPublicKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2316,83 +1120,31 @@ public class Shim implements IKMSClient { + _impl.importKeyMaterial(converted); + ImportKeyMaterialResponse dafnyResponse = + ToDafny.ImportKeyMaterialResponse(result); +- return Result.create_Success( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (ExpiredImportTokenException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (IncorrectKeyMaterialException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidCiphertextException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidImportTokenException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ImportKeyMaterialResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2406,53 +1158,21 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.ListAliasesResponse result = + _impl.listAliases(converted); + ListAliasesResponse dafnyResponse = ToDafny.ListAliasesResponse(result); +- return Result.create_Success( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidMarkerException ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListAliasesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2464,65 +1184,25 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.ListGrantsResponse result = + _impl.listGrants(converted); + ListGrantsResponse dafnyResponse = ToDafny.ListGrantsResponse(result); +- return Result.create_Success( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantIdException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidMarkerException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListGrantsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2538,53 +1218,21 @@ public class Shim implements IKMSClient { + ListKeyPoliciesResponse dafnyResponse = ToDafny.ListKeyPoliciesResponse( + result + ); +- return Result.create_Success( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListKeyPoliciesResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2600,59 +1248,23 @@ public class Shim implements IKMSClient { + ListKeyRotationsResponse dafnyResponse = ToDafny.ListKeyRotationsResponse( + result + ); +- return Result.create_Success( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidMarkerException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListKeyRotationsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2664,41 +1276,17 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.ListKeysResponse result = + _impl.listKeys(converted); + ListKeysResponse dafnyResponse = ToDafny.ListKeysResponse(result); +- return Result.create_Success( +- ListKeysResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ListKeysResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidMarkerException ex) { +- return Result.create_Failure( +- ListKeysResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ListKeysResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ListKeysResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListKeysResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2714,47 +1302,19 @@ public class Shim implements IKMSClient { + ListResourceTagsResponse dafnyResponse = ToDafny.ListResourceTagsResponse( + result + ); +- return Result.create_Success( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidMarkerException ex) { +- return Result.create_Failure( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ListResourceTagsResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2764,71 +1324,27 @@ public class Shim implements IKMSClient { + ToNative.PutKeyPolicyRequest(input); + try { + _impl.putKeyPolicy(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (MalformedPolicyDocumentException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2840,89 +1356,33 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.ReEncryptResponse result = + _impl.reEncrypt(converted); + ReEncryptResponse dafnyResponse = ToDafny.ReEncryptResponse(result); +- return Result.create_Success( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (IncorrectKeyException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidCiphertextException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ReEncryptResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -2936,83 +1396,31 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.ReplicateKeyResponse result = + _impl.replicateKey(converted); + ReplicateKeyResponse dafnyResponse = ToDafny.ReplicateKeyResponse(result); +- return Result.create_Success( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (AlreadyExistsException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (MalformedPolicyDocumentException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TagException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ReplicateKeyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3022,71 +1430,27 @@ public class Shim implements IKMSClient { + ToNative.RetireGrantRequest(input); + try { + _impl.retireGrant(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantIdException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3096,65 +1460,25 @@ public class Shim implements IKMSClient { + ToNative.RevokeGrantRequest(input); + try { + _impl.revokeGrant(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantIdException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3169,77 +1493,29 @@ public class Shim implements IKMSClient { + _impl.rotateKeyOnDemand(converted); + RotateKeyOnDemandResponse dafnyResponse = + ToDafny.RotateKeyOnDemandResponse(result); +- return Result.create_Success( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (ConflictException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- RotateKeyOnDemandResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3254,53 +1530,21 @@ public class Shim implements IKMSClient { + _impl.scheduleKeyDeletion(converted); + ScheduleKeyDeletionResponse dafnyResponse = + ToDafny.ScheduleKeyDeletionResponse(result); +- return Result.create_Success( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- ScheduleKeyDeletionResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3312,77 +1556,29 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.SignResponse result = + _impl.sign(converted); + SignResponse dafnyResponse = ToDafny.SignResponse(result); +- return Result.create_Success( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- SignResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3392,59 +1588,23 @@ public class Shim implements IKMSClient { + ToNative.TagResourceRequest(input); + try { + _impl.tagResource(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TagException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3454,53 +1614,21 @@ public class Shim implements IKMSClient { + ToNative.UntagResourceRequest(input); + try { + _impl.untagResource(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (TagException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3510,53 +1638,21 @@ public class Shim implements IKMSClient { + ToNative.UpdateAliasRequest(input); + try { + _impl.updateAlias(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (LimitExceededException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3571,125 +1667,45 @@ public class Shim implements IKMSClient { + _impl.updateCustomKeyStore(converted); + UpdateCustomKeyStoreResponse dafnyResponse = + ToDafny.UpdateCustomKeyStoreResponse(result); +- return Result.create_Success( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (CloudHsmClusterInvalidConfigurationException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterNotActiveException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterNotFoundException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CloudHsmClusterNotRelatedException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreInvalidStateException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNameInUseException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (CustomKeyStoreNotFoundException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyIncorrectAuthenticationCredentialException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyInvalidConfigurationException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyInvalidResponseException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyUriEndpointInUseException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyUriInUseException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyUriUnreachableException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyVpcEndpointServiceInUseException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyVpcEndpointServiceInvalidConfigurationException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (XksProxyVpcEndpointServiceNotFoundException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- UpdateCustomKeyStoreResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3701,53 +1717,21 @@ public class Shim implements IKMSClient { + ToNative.UpdateKeyDescriptionRequest(input); + try { + _impl.updateKeyDescription(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3759,59 +1743,23 @@ public class Shim implements IKMSClient { + ToNative.UpdatePrimaryRegionRequest(input); + try { + _impl.updatePrimaryRegion(converted); +- return Result.create_Success( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- Tuple0.create() +- ); ++ return Result.create_Success(Tuple0.create()); + } catch (DisabledException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidArnException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (UnsupportedOperationException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- dafny.Tuple0._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3823,83 +1771,31 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.VerifyResponse result = + _impl.verify(converted); + VerifyResponse dafnyResponse = ToDafny.VerifyResponse(result); +- return Result.create_Success( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DependencyTimeoutException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DisabledException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidSignatureException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- VerifyResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + +@@ -3911,77 +1807,29 @@ public class Shim implements IKMSClient { + software.amazon.awssdk.services.kms.model.VerifyMacResponse result = + _impl.verifyMac(converted); + VerifyMacResponse dafnyResponse = ToDafny.VerifyMacResponse(result); +- return Result.create_Success( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- dafnyResponse +- ); ++ return Result.create_Success(dafnyResponse); + } catch (DisabledException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (DryRunOperationException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidGrantTokenException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (InvalidKeyUsageException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KeyUnavailableException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInternalException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidMacException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsInvalidStateException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (NotFoundException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (KmsException ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } catch (Exception ex) { +- return Result.create_Failure( +- VerifyMacResponse._typeDescriptor(), +- Error._typeDescriptor(), +- ToDafny.Error(ex) +- ); ++ return Result.create_Failure(ToDafny.Error(ex)); + } + } + } +diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java +index 5e894e4e..9d02d333 100644 +--- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java ++++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java +@@ -264,62 +264,47 @@ public class ToDafny { + aliasName = + Objects.nonNull(nativeValue.aliasName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.aliasName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> aliasArn; + aliasArn = + Objects.nonNull(nativeValue.aliasArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.aliasArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> targetKeyId; + targetKeyId = + Objects.nonNull(nativeValue.targetKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.targetKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> creationDate; + creationDate = + Objects.nonNull(nativeValue.creationDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.creationDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> lastUpdatedDate; + lastUpdatedDate = + Objects.nonNull(nativeValue.lastUpdatedDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.lastUpdatedDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new AliasListEntry( + aliasName, + aliasArn, +@@ -347,14 +332,11 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new CancelKeyDeletionResponse(keyId); + } + +@@ -403,104 +385,81 @@ public class ToDafny { + cloudHsmClusterId = + Objects.nonNull(nativeValue.cloudHsmClusterId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.cloudHsmClusterId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> trustAnchorCertificate; + trustAnchorCertificate = + Objects.nonNull(nativeValue.trustAnchorCertificate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.trustAnchorCertificate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keyStorePassword; + keyStorePassword = + Objects.nonNull(nativeValue.keyStorePassword()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyStorePassword() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option customKeyStoreType; + customKeyStoreType = + Objects.nonNull(nativeValue.customKeyStoreType()) + ? Option.create_Some( +- CustomKeyStoreType._typeDescriptor(), + ToDafny.CustomKeyStoreType(nativeValue.customKeyStoreType()) + ) +- : Option.create_None(CustomKeyStoreType._typeDescriptor()); ++ : Option.create_None(); + Option> xksProxyUriEndpoint; + xksProxyUriEndpoint = + Objects.nonNull(nativeValue.xksProxyUriEndpoint()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksProxyUriEndpoint() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> xksProxyUriPath; + xksProxyUriPath = + Objects.nonNull(nativeValue.xksProxyUriPath()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksProxyUriPath() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> xksProxyVpcEndpointServiceName; + xksProxyVpcEndpointServiceName = + Objects.nonNull(nativeValue.xksProxyVpcEndpointServiceName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksProxyVpcEndpointServiceName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + XksProxyAuthenticationCredentialType + > xksProxyAuthenticationCredential; + xksProxyAuthenticationCredential = + Objects.nonNull(nativeValue.xksProxyAuthenticationCredential()) + ? Option.create_Some( +- XksProxyAuthenticationCredentialType._typeDescriptor(), + ToDafny.XksProxyAuthenticationCredentialType( + nativeValue.xksProxyAuthenticationCredential() + ) + ) +- : Option.create_None( +- XksProxyAuthenticationCredentialType._typeDescriptor() +- ); ++ : Option.create_None(); + Option xksProxyConnectivity; + xksProxyConnectivity = + Objects.nonNull(nativeValue.xksProxyConnectivity()) + ? Option.create_Some( +- XksProxyConnectivityType._typeDescriptor(), + ToDafny.XksProxyConnectivityType(nativeValue.xksProxyConnectivity()) + ) +- : Option.create_None(XksProxyConnectivityType._typeDescriptor()); ++ : Option.create_None(); + return new CreateCustomKeyStoreRequest( + customKeyStoreName, + cloudHsmClusterId, +@@ -522,14 +481,11 @@ public class ToDafny { + customKeyStoreId = + Objects.nonNull(nativeValue.customKeyStoreId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new CreateCustomKeyStoreResponse(customKeyStoreId); + } + +@@ -550,58 +506,42 @@ public class ToDafny { + retiringPrincipal = + Objects.nonNull(nativeValue.retiringPrincipal()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.retiringPrincipal() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + DafnySequence operations; + operations = ToDafny.GrantOperationList(nativeValue.operations()); + Option constraints; + constraints = + Objects.nonNull(nativeValue.constraints()) + ? Option.create_Some( +- GrantConstraints._typeDescriptor(), + ToDafny.GrantConstraints(nativeValue.constraints()) + ) +- : Option.create_None(GrantConstraints._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option> name; + name = + Objects.nonNull(nativeValue.name()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.name() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new CreateGrantRequest( + keyId, + granteePrincipal, +@@ -621,26 +561,20 @@ public class ToDafny { + grantToken = + Objects.nonNull(nativeValue.grantToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.grantToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> grantId; + grantId = + Objects.nonNull(nativeValue.grantId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.grantId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new CreateGrantResponse(grantToken, grantId); + } + +@@ -651,108 +585,75 @@ public class ToDafny { + policy = + Objects.nonNull(nativeValue.policy()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policy() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> description; + description = + Objects.nonNull(nativeValue.description()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.description() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option keyUsage; + keyUsage = + Objects.nonNull(nativeValue.keyUsage()) +- ? Option.create_Some( +- KeyUsageType._typeDescriptor(), +- ToDafny.KeyUsageType(nativeValue.keyUsage()) +- ) +- : Option.create_None(KeyUsageType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyUsageType(nativeValue.keyUsage())) ++ : Option.create_None(); + Option customerMasterKeySpec; + customerMasterKeySpec = + Objects.nonNull(nativeValue.customerMasterKeySpec()) + ? Option.create_Some( +- CustomerMasterKeySpec._typeDescriptor(), + ToDafny.CustomerMasterKeySpec(nativeValue.customerMasterKeySpec()) + ) +- : Option.create_None(CustomerMasterKeySpec._typeDescriptor()); ++ : Option.create_None(); + Option keySpec; + keySpec = + Objects.nonNull(nativeValue.keySpec()) +- ? Option.create_Some( +- KeySpec._typeDescriptor(), +- ToDafny.KeySpec(nativeValue.keySpec()) +- ) +- : Option.create_None(KeySpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeySpec(nativeValue.keySpec())) ++ : Option.create_None(); + Option origin; + origin = + Objects.nonNull(nativeValue.origin()) +- ? Option.create_Some( +- OriginType._typeDescriptor(), +- ToDafny.OriginType(nativeValue.origin()) +- ) +- : Option.create_None(OriginType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.OriginType(nativeValue.origin())) ++ : Option.create_None(); + Option> customKeyStoreId; + customKeyStoreId = + Objects.nonNull(nativeValue.customKeyStoreId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option bypassPolicyLockoutSafetyCheck; + bypassPolicyLockoutSafetyCheck = + Objects.nonNull(nativeValue.bypassPolicyLockoutSafetyCheck()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.bypassPolicyLockoutSafetyCheck()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.bypassPolicyLockoutSafetyCheck())) ++ : Option.create_None(); + Option> tags; + tags = + (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()), +- ToDafny.TagList(nativeValue.tags()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) ++ : Option.create_None(); + Option multiRegion; + multiRegion = + Objects.nonNull(nativeValue.multiRegion()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.multiRegion()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.multiRegion())) ++ : Option.create_None(); + Option> xksKeyId; + xksKeyId = + Objects.nonNull(nativeValue.xksKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new CreateKeyRequest( + policy, + description, +@@ -774,11 +675,8 @@ public class ToDafny { + Option keyMetadata; + keyMetadata = + Objects.nonNull(nativeValue.keyMetadata()) +- ? Option.create_Some( +- KeyMetadata._typeDescriptor(), +- ToDafny.KeyMetadata(nativeValue.keyMetadata()) +- ) +- : Option.create_None(KeyMetadata._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyMetadata(nativeValue.keyMetadata())) ++ : Option.create_None(); + return new CreateKeyResponse(keyMetadata); + } + +@@ -803,94 +701,75 @@ public class ToDafny { + customKeyStoreId = + Objects.nonNull(nativeValue.customKeyStoreId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> customKeyStoreName; + customKeyStoreName = + Objects.nonNull(nativeValue.customKeyStoreName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> cloudHsmClusterId; + cloudHsmClusterId = + Objects.nonNull(nativeValue.cloudHsmClusterId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.cloudHsmClusterId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> trustAnchorCertificate; + trustAnchorCertificate = + Objects.nonNull(nativeValue.trustAnchorCertificate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.trustAnchorCertificate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option connectionState; + connectionState = + Objects.nonNull(nativeValue.connectionState()) + ? Option.create_Some( +- ConnectionStateType._typeDescriptor(), + ToDafny.ConnectionStateType(nativeValue.connectionState()) + ) +- : Option.create_None(ConnectionStateType._typeDescriptor()); ++ : Option.create_None(); + Option connectionErrorCode; + connectionErrorCode = + Objects.nonNull(nativeValue.connectionErrorCode()) + ? Option.create_Some( +- ConnectionErrorCodeType._typeDescriptor(), + ToDafny.ConnectionErrorCodeType(nativeValue.connectionErrorCode()) + ) +- : Option.create_None(ConnectionErrorCodeType._typeDescriptor()); ++ : Option.create_None(); + Option> creationDate; + creationDate = + Objects.nonNull(nativeValue.creationDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.creationDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option customKeyStoreType; + customKeyStoreType = + Objects.nonNull(nativeValue.customKeyStoreType()) + ? Option.create_Some( +- CustomKeyStoreType._typeDescriptor(), + ToDafny.CustomKeyStoreType(nativeValue.customKeyStoreType()) + ) +- : Option.create_None(CustomKeyStoreType._typeDescriptor()); ++ : Option.create_None(); + Option xksProxyConfiguration; + xksProxyConfiguration = + Objects.nonNull(nativeValue.xksProxyConfiguration()) + ? Option.create_Some( +- XksProxyConfigurationType._typeDescriptor(), + ToDafny.XksProxyConfigurationType(nativeValue.xksProxyConfiguration()) + ) +- : Option.create_None(XksProxyConfigurationType._typeDescriptor()); ++ : Option.create_None(); + return new CustomKeyStoresListEntry( + customKeyStoreId, + customKeyStoreName, +@@ -922,68 +801,43 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContext()) && + nativeValue.encryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option encryptionAlgorithm; + encryptionAlgorithm = + Objects.nonNull(nativeValue.encryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec(nativeValue.encryptionAlgorithm()) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option recipient; + recipient = + Objects.nonNull(nativeValue.recipient()) +- ? Option.create_Some( +- RecipientInfo._typeDescriptor(), +- ToDafny.RecipientInfo(nativeValue.recipient()) +- ) +- : Option.create_None(RecipientInfo._typeDescriptor()); ++ ? Option.create_Some(ToDafny.RecipientInfo(nativeValue.recipient())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new DecryptRequest( + ciphertextBlob, + encryptionContext, +@@ -1002,46 +856,36 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> plaintext; + plaintext = + Objects.nonNull(nativeValue.plaintext()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.plaintext().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option encryptionAlgorithm; + encryptionAlgorithm = + Objects.nonNull(nativeValue.encryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec(nativeValue.encryptionAlgorithm()) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option> ciphertextForRecipient; + ciphertextForRecipient = + Objects.nonNull(nativeValue.ciphertextForRecipient()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextForRecipient().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + return new DecryptResponse( + keyId, + plaintext, +@@ -1111,30 +955,18 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + Option recipient; + recipient = + Objects.nonNull(nativeValue.recipient()) +- ? Option.create_Some( +- RecipientInfo._typeDescriptor(), +- ToDafny.RecipientInfo(nativeValue.recipient()) +- ) +- : Option.create_None(RecipientInfo._typeDescriptor()); ++ ? Option.create_Some(ToDafny.RecipientInfo(nativeValue.recipient())) ++ : Option.create_None(); + return new DeriveSharedSecretRequest( + keyId, + keyAgreementAlgorithm, +@@ -1152,54 +984,41 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> sharedSecret; + sharedSecret = + Objects.nonNull(nativeValue.sharedSecret()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.sharedSecret().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> ciphertextForRecipient; + ciphertextForRecipient = + Objects.nonNull(nativeValue.ciphertextForRecipient()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextForRecipient().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option keyAgreementAlgorithm; + keyAgreementAlgorithm = + Objects.nonNull(nativeValue.keyAgreementAlgorithm()) + ? Option.create_Some( +- KeyAgreementAlgorithmSpec._typeDescriptor(), + ToDafny.KeyAgreementAlgorithmSpec(nativeValue.keyAgreementAlgorithm()) + ) +- : Option.create_None(KeyAgreementAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option keyOrigin; + keyOrigin = + Objects.nonNull(nativeValue.keyOrigin()) +- ? Option.create_Some( +- OriginType._typeDescriptor(), +- ToDafny.OriginType(nativeValue.keyOrigin()) +- ) +- : Option.create_None(OriginType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.OriginType(nativeValue.keyOrigin())) ++ : Option.create_None(); + return new DeriveSharedSecretResponse( + keyId, + sharedSecret, +@@ -1216,43 +1035,34 @@ public class ToDafny { + customKeyStoreId = + Objects.nonNull(nativeValue.customKeyStoreId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> customKeyStoreName; + customKeyStoreName = + Objects.nonNull(nativeValue.customKeyStoreName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new DescribeCustomKeyStoresRequest( + customKeyStoreId, + customKeyStoreName, +@@ -1269,33 +1079,23 @@ public class ToDafny { + (Objects.nonNull(nativeValue.customKeyStores()) && + nativeValue.customKeyStores().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- CustomKeyStoresListEntry._typeDescriptor() +- ), + ToDafny.CustomKeyStoresList(nativeValue.customKeyStores()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- CustomKeyStoresListEntry._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new DescribeCustomKeyStoresResponse( + customKeyStores, + nextMarker, +@@ -1317,17 +1117,8 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + return new DescribeKeyRequest(keyId, grantTokens); + } + +@@ -1337,11 +1128,8 @@ public class ToDafny { + Option keyMetadata; + keyMetadata = + Objects.nonNull(nativeValue.keyMetadata()) +- ? Option.create_Some( +- KeyMetadata._typeDescriptor(), +- ToDafny.KeyMetadata(nativeValue.keyMetadata()) +- ) +- : Option.create_None(KeyMetadata._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyMetadata(nativeValue.keyMetadata())) ++ : Option.create_None(); + return new DescribeKeyResponse(keyMetadata); + } + +@@ -1406,11 +1194,8 @@ public class ToDafny { + Option rotationPeriodInDays; + rotationPeriodInDays = + Objects.nonNull(nativeValue.rotationPeriodInDays()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.rotationPeriodInDays()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.rotationPeriodInDays())) ++ : Option.create_None(); + return new EnableKeyRotationRequest(keyId, rotationPeriodInDays); + } + +@@ -1462,48 +1247,29 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContext()) && + nativeValue.encryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option encryptionAlgorithm; + encryptionAlgorithm = + Objects.nonNull(nativeValue.encryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec(nativeValue.encryptionAlgorithm()) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new EncryptRequest( + keyId, + plaintext, +@@ -1521,34 +1287,27 @@ public class ToDafny { + ciphertextBlob = + Objects.nonNull(nativeValue.ciphertextBlob()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextBlob().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option encryptionAlgorithm; + encryptionAlgorithm = + Objects.nonNull(nativeValue.encryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec(nativeValue.encryptionAlgorithm()) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + return new EncryptResponse(ciphertextBlob, keyId, encryptionAlgorithm); + } + +@@ -1565,18 +1324,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContext()) && + nativeValue.encryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + DafnySequence keyId; + keyId = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -1590,30 +1340,18 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option recipient; + recipient = + Objects.nonNull(nativeValue.recipient()) +- ? Option.create_Some( +- RecipientInfo._typeDescriptor(), +- ToDafny.RecipientInfo(nativeValue.recipient()) +- ) +- : Option.create_None(RecipientInfo._typeDescriptor()); ++ ? Option.create_Some(ToDafny.RecipientInfo(nativeValue.recipient())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new GenerateDataKeyPairRequest( + encryptionContext, + keyId, +@@ -1631,70 +1369,52 @@ public class ToDafny { + privateKeyCiphertextBlob = + Objects.nonNull(nativeValue.privateKeyCiphertextBlob()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.privateKeyCiphertextBlob().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> privateKeyPlaintext; + privateKeyPlaintext = + Objects.nonNull(nativeValue.privateKeyPlaintext()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.privateKeyPlaintext().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> publicKey; + publicKey = + Objects.nonNull(nativeValue.publicKey()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.publicKey().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option keyPairSpec; + keyPairSpec = + Objects.nonNull(nativeValue.keyPairSpec()) +- ? Option.create_Some( +- DataKeyPairSpec._typeDescriptor(), +- ToDafny.DataKeyPairSpec(nativeValue.keyPairSpec()) +- ) +- : Option.create_None(DataKeyPairSpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.DataKeyPairSpec(nativeValue.keyPairSpec())) ++ : Option.create_None(); + Option> ciphertextForRecipient; + ciphertextForRecipient = + Objects.nonNull(nativeValue.ciphertextForRecipient()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextForRecipient().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + return new GenerateDataKeyPairResponse( + privateKeyCiphertextBlob, + privateKeyPlaintext, +@@ -1718,18 +1438,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContext()) && + nativeValue.encryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + DafnySequence keyId; + keyId = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -1743,22 +1454,13 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new GenerateDataKeyPairWithoutPlaintextRequest( + encryptionContext, + keyId, +@@ -1775,46 +1477,34 @@ public class ToDafny { + privateKeyCiphertextBlob = + Objects.nonNull(nativeValue.privateKeyCiphertextBlob()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.privateKeyCiphertextBlob().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> publicKey; + publicKey = + Objects.nonNull(nativeValue.publicKey()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.publicKey().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option keyPairSpec; + keyPairSpec = + Objects.nonNull(nativeValue.keyPairSpec()) +- ? Option.create_Some( +- DataKeyPairSpec._typeDescriptor(), +- ToDafny.DataKeyPairSpec(nativeValue.keyPairSpec()) +- ) +- : Option.create_None(DataKeyPairSpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.DataKeyPairSpec(nativeValue.keyPairSpec())) ++ : Option.create_None(); + return new GenerateDataKeyPairWithoutPlaintextResponse( + privateKeyCiphertextBlob, + publicKey, +@@ -1841,61 +1531,37 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContext()) && + nativeValue.encryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option numberOfBytes; + numberOfBytes = + Objects.nonNull(nativeValue.numberOfBytes()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.numberOfBytes())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.numberOfBytes())) ++ : Option.create_None(); + Option keySpec; + keySpec = + Objects.nonNull(nativeValue.keySpec()) +- ? Option.create_Some( +- DataKeySpec._typeDescriptor(), +- ToDafny.DataKeySpec(nativeValue.keySpec()) +- ) +- : Option.create_None(DataKeySpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.DataKeySpec(nativeValue.keySpec())) ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option recipient; + recipient = + Objects.nonNull(nativeValue.recipient()) +- ? Option.create_Some( +- RecipientInfo._typeDescriptor(), +- ToDafny.RecipientInfo(nativeValue.recipient()) +- ) +- : Option.create_None(RecipientInfo._typeDescriptor()); ++ ? Option.create_Some(ToDafny.RecipientInfo(nativeValue.recipient())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new GenerateDataKeyRequest( + keyId, + encryptionContext, +@@ -1914,50 +1580,38 @@ public class ToDafny { + ciphertextBlob = + Objects.nonNull(nativeValue.ciphertextBlob()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextBlob().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> plaintext; + plaintext = + Objects.nonNull(nativeValue.plaintext()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.plaintext().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> ciphertextForRecipient; + ciphertextForRecipient = + Objects.nonNull(nativeValue.ciphertextForRecipient()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextForRecipient().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + return new GenerateDataKeyResponse( + ciphertextBlob, + plaintext, +@@ -1984,53 +1638,32 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContext()) && + nativeValue.encryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option keySpec; + keySpec = + Objects.nonNull(nativeValue.keySpec()) +- ? Option.create_Some( +- DataKeySpec._typeDescriptor(), +- ToDafny.DataKeySpec(nativeValue.keySpec()) +- ) +- : Option.create_None(DataKeySpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.DataKeySpec(nativeValue.keySpec())) ++ : Option.create_None(); + Option numberOfBytes; + numberOfBytes = + Objects.nonNull(nativeValue.numberOfBytes()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.numberOfBytes())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.numberOfBytes())) ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new GenerateDataKeyWithoutPlaintextRequest( + keyId, + encryptionContext, +@@ -2048,26 +1681,20 @@ public class ToDafny { + ciphertextBlob = + Objects.nonNull(nativeValue.ciphertextBlob()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextBlob().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GenerateDataKeyWithoutPlaintextResponse(ciphertextBlob, keyId); + } + +@@ -2092,22 +1719,13 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new GenerateMacRequest( + message, + keyId, +@@ -2124,34 +1742,27 @@ public class ToDafny { + mac = + Objects.nonNull(nativeValue.mac()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.mac().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option macAlgorithm; + macAlgorithm = + Objects.nonNull(nativeValue.macAlgorithm()) + ? Option.create_Some( +- MacAlgorithmSpec._typeDescriptor(), + ToDafny.MacAlgorithmSpec(nativeValue.macAlgorithm()) + ) +- : Option.create_None(MacAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GenerateMacResponse(mac, macAlgorithm, keyId); + } + +@@ -2161,28 +1772,22 @@ public class ToDafny { + Option numberOfBytes; + numberOfBytes = + Objects.nonNull(nativeValue.numberOfBytes()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.numberOfBytes())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.numberOfBytes())) ++ : Option.create_None(); + Option> customKeyStoreId; + customKeyStoreId = + Objects.nonNull(nativeValue.customKeyStoreId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option recipient; + recipient = + Objects.nonNull(nativeValue.recipient()) +- ? Option.create_Some( +- RecipientInfo._typeDescriptor(), +- ToDafny.RecipientInfo(nativeValue.recipient()) +- ) +- : Option.create_None(RecipientInfo._typeDescriptor()); ++ ? Option.create_Some(ToDafny.RecipientInfo(nativeValue.recipient())) ++ : Option.create_None(); + return new GenerateRandomRequest( + numberOfBytes, + customKeyStoreId, +@@ -2197,26 +1802,20 @@ public class ToDafny { + plaintext = + Objects.nonNull(nativeValue.plaintext()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.plaintext().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> ciphertextForRecipient; + ciphertextForRecipient = + Objects.nonNull(nativeValue.ciphertextForRecipient()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextForRecipient().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + return new GenerateRandomResponse(plaintext, ciphertextForRecipient); + } + +@@ -2232,14 +1831,11 @@ public class ToDafny { + policyName = + Objects.nonNull(nativeValue.policyName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policyName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GetKeyPolicyRequest(keyId, policyName); + } + +@@ -2250,26 +1846,20 @@ public class ToDafny { + policy = + Objects.nonNull(nativeValue.policy()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policy() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> policyName; + policyName = + Objects.nonNull(nativeValue.policyName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policyName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GetKeyPolicyResponse(policy, policyName); + } + +@@ -2290,55 +1880,40 @@ public class ToDafny { + Option keyRotationEnabled; + keyRotationEnabled = + Objects.nonNull(nativeValue.keyRotationEnabled()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.keyRotationEnabled()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.keyRotationEnabled())) ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option rotationPeriodInDays; + rotationPeriodInDays = + Objects.nonNull(nativeValue.rotationPeriodInDays()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.rotationPeriodInDays()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.rotationPeriodInDays())) ++ : Option.create_None(); + Option> nextRotationDate; + nextRotationDate = + Objects.nonNull(nativeValue.nextRotationDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextRotationDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> onDemandRotationStartDate; + onDemandRotationStartDate = + Objects.nonNull(nativeValue.onDemandRotationStartDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.onDemandRotationStartDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GetKeyRotationStatusResponse( + keyRotationEnabled, + keyId, +@@ -2374,50 +1949,38 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> importToken; + importToken = + Objects.nonNull(nativeValue.importToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.importToken().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> publicKey; + publicKey = + Objects.nonNull(nativeValue.publicKey()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.publicKey().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> parametersValidTo; + parametersValidTo = + Objects.nonNull(nativeValue.parametersValidTo()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.parametersValidTo() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new GetParametersForImportResponse( + keyId, + importToken, +@@ -2440,17 +2003,8 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + return new GetPublicKeyRequest(keyId, grantTokens); + } + +@@ -2461,50 +2015,37 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> publicKey; + publicKey = + Objects.nonNull(nativeValue.publicKey()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.publicKey().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option customerMasterKeySpec; + customerMasterKeySpec = + Objects.nonNull(nativeValue.customerMasterKeySpec()) + ? Option.create_Some( +- CustomerMasterKeySpec._typeDescriptor(), + ToDafny.CustomerMasterKeySpec(nativeValue.customerMasterKeySpec()) + ) +- : Option.create_None(CustomerMasterKeySpec._typeDescriptor()); ++ : Option.create_None(); + Option keySpec; + keySpec = + Objects.nonNull(nativeValue.keySpec()) +- ? Option.create_Some( +- KeySpec._typeDescriptor(), +- ToDafny.KeySpec(nativeValue.keySpec()) +- ) +- : Option.create_None(KeySpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeySpec(nativeValue.keySpec())) ++ : Option.create_None(); + Option keyUsage; + keyUsage = + Objects.nonNull(nativeValue.keyUsage()) +- ? Option.create_Some( +- KeyUsageType._typeDescriptor(), +- ToDafny.KeyUsageType(nativeValue.keyUsage()) +- ) +- : Option.create_None(KeyUsageType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyUsageType(nativeValue.keyUsage())) ++ : Option.create_None(); + Option< + DafnySequence + > encryptionAlgorithms; +@@ -2512,29 +2053,19 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionAlgorithms()) && + nativeValue.encryptionAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- EncryptionAlgorithmSpec._typeDescriptor() +- ), + ToDafny.EncryptionAlgorithmSpecList( + nativeValue.encryptionAlgorithms() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- EncryptionAlgorithmSpec._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option> signingAlgorithms; + signingAlgorithms = + (Objects.nonNull(nativeValue.signingAlgorithms()) && + nativeValue.signingAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(SigningAlgorithmSpec._typeDescriptor()), + ToDafny.SigningAlgorithmSpecList(nativeValue.signingAlgorithms()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(SigningAlgorithmSpec._typeDescriptor()) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > keyAgreementAlgorithms; +@@ -2542,18 +2073,11 @@ public class ToDafny { + (Objects.nonNull(nativeValue.keyAgreementAlgorithms()) && + nativeValue.keyAgreementAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- KeyAgreementAlgorithmSpec._typeDescriptor() +- ), + ToDafny.KeyAgreementAlgorithmSpecList( + nativeValue.keyAgreementAlgorithms() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- KeyAgreementAlgorithmSpec._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + return new GetPublicKeyResponse( + keyId, + publicKey, +@@ -2579,18 +2103,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContextSubset()) && + nativeValue.encryptionContextSubset().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContextSubset()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option< + DafnyMap< + ? extends DafnySequence, +@@ -2601,18 +2116,9 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionContextEquals()) && + nativeValue.encryptionContextEquals().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.encryptionContextEquals()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + return new GrantConstraints( + encryptionContextSubset, + encryptionContextEquals +@@ -2636,105 +2142,80 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> grantId; + grantId = + Objects.nonNull(nativeValue.grantId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.grantId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> name; + name = + Objects.nonNull(nativeValue.name()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.name() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> creationDate; + creationDate = + Objects.nonNull(nativeValue.creationDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.creationDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> granteePrincipal; + granteePrincipal = + Objects.nonNull(nativeValue.granteePrincipal()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.granteePrincipal() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> retiringPrincipal; + retiringPrincipal = + Objects.nonNull(nativeValue.retiringPrincipal()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.retiringPrincipal() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> issuingAccount; + issuingAccount = + Objects.nonNull(nativeValue.issuingAccount()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.issuingAccount() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> operations; + operations = + (Objects.nonNull(nativeValue.operations()) && + nativeValue.operations().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(GrantOperation._typeDescriptor()), + ToDafny.GrantOperationList(nativeValue.operations()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(GrantOperation._typeDescriptor()) +- ); ++ : Option.create_None(); + Option constraints; + constraints = + Objects.nonNull(nativeValue.constraints()) + ? Option.create_Some( +- GrantConstraints._typeDescriptor(), + ToDafny.GrantConstraints(nativeValue.constraints()) + ) +- : Option.create_None(GrantConstraints._typeDescriptor()); ++ : Option.create_None(); + return new GrantListEntry( + keyId, + grantId, +@@ -2790,22 +2271,18 @@ public class ToDafny { + validTo = + Objects.nonNull(nativeValue.validTo()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.validTo() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option expirationModel; + expirationModel = + Objects.nonNull(nativeValue.expirationModel()) + ? Option.create_Some( +- ExpirationModelType._typeDescriptor(), + ToDafny.ExpirationModelType(nativeValue.expirationModel()) + ) +- : Option.create_None(ExpirationModelType._typeDescriptor()); ++ : Option.create_None(); + return new ImportKeyMaterialRequest( + keyId, + importToken, +@@ -2823,7 +2300,13 @@ public class ToDafny { + + public static DafnySequence< + ? extends KeyAgreementAlgorithmSpec +- > KeyAgreementAlgorithmSpecList(List nativeValue) { ++ // BEGIN MANUAL EDIT ++ > KeyAgreementAlgorithmSpecList( ++ List< ++ software.amazon.awssdk.services.kms.model.KeyAgreementAlgorithmSpec ++ > nativeValue ++ ) { ++ // END MANUAL EDIT + return software.amazon.smithy.dafny.conversion.ToDafny.Aggregate.GenericToSequence( + nativeValue, + software.amazon.cryptography.services.kms.internaldafny.ToDafny::KeyAgreementAlgorithmSpec, +@@ -2848,26 +2331,20 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keyArn; + keyArn = + Objects.nonNull(nativeValue.keyArn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyArn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new KeyListEntry(keyId, keyArn); + } + +@@ -2878,14 +2355,11 @@ public class ToDafny { + aWSAccountId = + Objects.nonNull(nativeValue.awsAccountId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.awsAccountId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + DafnySequence keyId; + keyId = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -2895,147 +2369,109 @@ public class ToDafny { + arn = + Objects.nonNull(nativeValue.arn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.arn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> creationDate; + creationDate = + Objects.nonNull(nativeValue.creationDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.creationDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option enabled; + enabled = + Objects.nonNull(nativeValue.enabled()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.enabled())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.enabled())) ++ : Option.create_None(); + Option> description; + description = + Objects.nonNull(nativeValue.description()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.description() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option keyUsage; + keyUsage = + Objects.nonNull(nativeValue.keyUsage()) +- ? Option.create_Some( +- KeyUsageType._typeDescriptor(), +- ToDafny.KeyUsageType(nativeValue.keyUsage()) +- ) +- : Option.create_None(KeyUsageType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyUsageType(nativeValue.keyUsage())) ++ : Option.create_None(); + Option keyState; + keyState = + Objects.nonNull(nativeValue.keyState()) +- ? Option.create_Some( +- KeyState._typeDescriptor(), +- ToDafny.KeyState(nativeValue.keyState()) +- ) +- : Option.create_None(KeyState._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyState(nativeValue.keyState())) ++ : Option.create_None(); + Option> deletionDate; + deletionDate = + Objects.nonNull(nativeValue.deletionDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.deletionDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> validTo; + validTo = + Objects.nonNull(nativeValue.validTo()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.validTo() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option origin; + origin = + Objects.nonNull(nativeValue.origin()) +- ? Option.create_Some( +- OriginType._typeDescriptor(), +- ToDafny.OriginType(nativeValue.origin()) +- ) +- : Option.create_None(OriginType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.OriginType(nativeValue.origin())) ++ : Option.create_None(); + Option> customKeyStoreId; + customKeyStoreId = + Objects.nonNull(nativeValue.customKeyStoreId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.customKeyStoreId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> cloudHsmClusterId; + cloudHsmClusterId = + Objects.nonNull(nativeValue.cloudHsmClusterId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.cloudHsmClusterId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option expirationModel; + expirationModel = + Objects.nonNull(nativeValue.expirationModel()) + ? Option.create_Some( +- ExpirationModelType._typeDescriptor(), + ToDafny.ExpirationModelType(nativeValue.expirationModel()) + ) +- : Option.create_None(ExpirationModelType._typeDescriptor()); ++ : Option.create_None(); + Option keyManager; + keyManager = + Objects.nonNull(nativeValue.keyManager()) +- ? Option.create_Some( +- KeyManagerType._typeDescriptor(), +- ToDafny.KeyManagerType(nativeValue.keyManager()) +- ) +- : Option.create_None(KeyManagerType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyManagerType(nativeValue.keyManager())) ++ : Option.create_None(); + Option customerMasterKeySpec; + customerMasterKeySpec = + Objects.nonNull(nativeValue.customerMasterKeySpec()) + ? Option.create_Some( +- CustomerMasterKeySpec._typeDescriptor(), + ToDafny.CustomerMasterKeySpec(nativeValue.customerMasterKeySpec()) + ) +- : Option.create_None(CustomerMasterKeySpec._typeDescriptor()); ++ : Option.create_None(); + Option keySpec; + keySpec = + Objects.nonNull(nativeValue.keySpec()) +- ? Option.create_Some( +- KeySpec._typeDescriptor(), +- ToDafny.KeySpec(nativeValue.keySpec()) +- ) +- : Option.create_None(KeySpec._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeySpec(nativeValue.keySpec())) ++ : Option.create_None(); + Option< + DafnySequence + > encryptionAlgorithms; +@@ -3043,29 +2479,19 @@ public class ToDafny { + (Objects.nonNull(nativeValue.encryptionAlgorithms()) && + nativeValue.encryptionAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- EncryptionAlgorithmSpec._typeDescriptor() +- ), + ToDafny.EncryptionAlgorithmSpecList( + nativeValue.encryptionAlgorithms() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- EncryptionAlgorithmSpec._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option> signingAlgorithms; + signingAlgorithms = + (Objects.nonNull(nativeValue.signingAlgorithms()) && + nativeValue.signingAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(SigningAlgorithmSpec._typeDescriptor()), + ToDafny.SigningAlgorithmSpecList(nativeValue.signingAlgorithms()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(SigningAlgorithmSpec._typeDescriptor()) +- ); ++ : Option.create_None(); + Option< + DafnySequence + > keyAgreementAlgorithms; +@@ -3073,63 +2499,45 @@ public class ToDafny { + (Objects.nonNull(nativeValue.keyAgreementAlgorithms()) && + nativeValue.keyAgreementAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor( +- KeyAgreementAlgorithmSpec._typeDescriptor() +- ), + ToDafny.KeyAgreementAlgorithmSpecList( + nativeValue.keyAgreementAlgorithms() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- KeyAgreementAlgorithmSpec._typeDescriptor() +- ) +- ); ++ : Option.create_None(); + Option multiRegion; + multiRegion = + Objects.nonNull(nativeValue.multiRegion()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.multiRegion()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.multiRegion())) ++ : Option.create_None(); + Option multiRegionConfiguration; + multiRegionConfiguration = + Objects.nonNull(nativeValue.multiRegionConfiguration()) + ? Option.create_Some( +- MultiRegionConfiguration._typeDescriptor(), + ToDafny.MultiRegionConfiguration( + nativeValue.multiRegionConfiguration() + ) + ) +- : Option.create_None(MultiRegionConfiguration._typeDescriptor()); ++ : Option.create_None(); + Option pendingDeletionWindowInDays; + pendingDeletionWindowInDays = + Objects.nonNull(nativeValue.pendingDeletionWindowInDays()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.pendingDeletionWindowInDays()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.pendingDeletionWindowInDays())) ++ : Option.create_None(); + Option> macAlgorithms; + macAlgorithms = + (Objects.nonNull(nativeValue.macAlgorithms()) && + nativeValue.macAlgorithms().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(MacAlgorithmSpec._typeDescriptor()), + ToDafny.MacAlgorithmSpecList(nativeValue.macAlgorithms()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(MacAlgorithmSpec._typeDescriptor()) +- ); ++ : Option.create_None(); + Option xksKeyConfiguration; + xksKeyConfiguration = + Objects.nonNull(nativeValue.xksKeyConfiguration()) + ? Option.create_Some( +- XksKeyConfigurationType._typeDescriptor(), + ToDafny.XksKeyConfigurationType(nativeValue.xksKeyConfiguration()) + ) +- : Option.create_None(XksKeyConfigurationType._typeDescriptor()); ++ : Option.create_None(); + return new KeyMetadata( + aWSAccountId, + keyId, +@@ -3166,31 +2574,25 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListAliasesRequest(keyId, limit, marker); + } + +@@ -3201,30 +2603,22 @@ public class ToDafny { + aliases = + (Objects.nonNull(nativeValue.aliases()) && + nativeValue.aliases().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(AliasListEntry._typeDescriptor()), +- ToDafny.AliasList(nativeValue.aliases()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(AliasListEntry._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.AliasList(nativeValue.aliases())) ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new ListAliasesResponse(aliases, nextMarker, truncated); + } + +@@ -3234,20 +2628,17 @@ public class ToDafny { + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + DafnySequence keyId; + keyId = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -3257,26 +2648,20 @@ public class ToDafny { + grantId = + Objects.nonNull(nativeValue.grantId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.grantId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> granteePrincipal; + granteePrincipal = + Objects.nonNull(nativeValue.granteePrincipal()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.granteePrincipal() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListGrantsRequest( + limit, + marker, +@@ -3292,30 +2677,22 @@ public class ToDafny { + Option> grants; + grants = + (Objects.nonNull(nativeValue.grants()) && nativeValue.grants().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(GrantListEntry._typeDescriptor()), +- ToDafny.GrantList(nativeValue.grants()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(GrantListEntry._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.GrantList(nativeValue.grants())) ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new ListGrantsResponse(grants, nextMarker, truncated); + } + +@@ -3330,20 +2707,17 @@ public class ToDafny { + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListKeyPoliciesRequest(keyId, limit, marker); + } + +@@ -3356,34 +2730,22 @@ public class ToDafny { + policyNames = + (Objects.nonNull(nativeValue.policyNames()) && + nativeValue.policyNames().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.PolicyNameList(nativeValue.policyNames()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.PolicyNameList(nativeValue.policyNames())) ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new ListKeyPoliciesResponse(policyNames, nextMarker, truncated); + } + +@@ -3398,20 +2760,17 @@ public class ToDafny { + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListKeyRotationsRequest(keyId, limit, marker); + } + +@@ -3422,30 +2781,22 @@ public class ToDafny { + rotations = + (Objects.nonNull(nativeValue.rotations()) && + nativeValue.rotations().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(RotationsListEntry._typeDescriptor()), +- ToDafny.RotationsList(nativeValue.rotations()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(RotationsListEntry._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.RotationsList(nativeValue.rotations())) ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new ListKeyRotationsResponse(rotations, nextMarker, truncated); + } + +@@ -3455,20 +2806,17 @@ public class ToDafny { + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListKeysRequest(limit, marker); + } + +@@ -3478,30 +2826,22 @@ public class ToDafny { + Option> keys; + keys = + (Objects.nonNull(nativeValue.keys()) && nativeValue.keys().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(KeyListEntry._typeDescriptor()), +- ToDafny.KeyList(nativeValue.keys()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(KeyListEntry._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.KeyList(nativeValue.keys())) ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new ListKeysResponse(keys, nextMarker, truncated); + } + +@@ -3516,20 +2856,17 @@ public class ToDafny { + Option limit; + limit = + Objects.nonNull(nativeValue.limit()) +- ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.limit())) ++ : Option.create_None(); + Option> marker; + marker = + Objects.nonNull(nativeValue.marker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.marker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new ListResourceTagsRequest(keyId, limit, marker); + } + +@@ -3539,35 +2876,29 @@ public class ToDafny { + Option> tags; + tags = + (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()), +- ToDafny.TagList(nativeValue.tags()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) ++ : Option.create_None(); + Option> nextMarker; + nextMarker = + Objects.nonNull(nativeValue.nextMarker()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.nextMarker() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option truncated; + truncated = + Objects.nonNull(nativeValue.truncated()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.truncated())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.truncated())) ++ : Option.create_None(); + return new ListResourceTagsResponse(tags, nextMarker, truncated); + } + + public static DafnySequence MacAlgorithmSpecList( +- List nativeValue ++ // BEGIN MANUAL EDIT ++ List nativeValue ++ // END MANUAL EDIT + ) { + return software.amazon.smithy.dafny.conversion.ToDafny.Aggregate.GenericToSequence( + nativeValue, +@@ -3583,29 +2914,22 @@ public class ToDafny { + multiRegionKeyType = + Objects.nonNull(nativeValue.multiRegionKeyType()) + ? Option.create_Some( +- MultiRegionKeyType._typeDescriptor(), + ToDafny.MultiRegionKeyType(nativeValue.multiRegionKeyType()) + ) +- : Option.create_None(MultiRegionKeyType._typeDescriptor()); ++ : Option.create_None(); + Option primaryKey; + primaryKey = + Objects.nonNull(nativeValue.primaryKey()) +- ? Option.create_Some( +- MultiRegionKey._typeDescriptor(), +- ToDafny.MultiRegionKey(nativeValue.primaryKey()) +- ) +- : Option.create_None(MultiRegionKey._typeDescriptor()); ++ ? Option.create_Some(ToDafny.MultiRegionKey(nativeValue.primaryKey())) ++ : Option.create_None(); + Option> replicaKeys; + replicaKeys = + (Objects.nonNull(nativeValue.replicaKeys()) && + nativeValue.replicaKeys().size() > 0) + ? Option.create_Some( +- DafnySequence._typeDescriptor(MultiRegionKey._typeDescriptor()), + ToDafny.MultiRegionKeyList(nativeValue.replicaKeys()) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(MultiRegionKey._typeDescriptor()) +- ); ++ : Option.create_None(); + return new MultiRegionConfiguration( + multiRegionKeyType, + primaryKey, +@@ -3620,26 +2944,20 @@ public class ToDafny { + arn = + Objects.nonNull(nativeValue.arn()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.arn() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> region; + region = + Objects.nonNull(nativeValue.region()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.region() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new MultiRegionKey(arn, region); + } + +@@ -3675,14 +2993,11 @@ public class ToDafny { + policyName = + Objects.nonNull(nativeValue.policyName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policyName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + DafnySequence policy; + policy = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -3691,11 +3006,8 @@ public class ToDafny { + Option bypassPolicyLockoutSafetyCheck; + bypassPolicyLockoutSafetyCheck = + Objects.nonNull(nativeValue.bypassPolicyLockoutSafetyCheck()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.bypassPolicyLockoutSafetyCheck()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.bypassPolicyLockoutSafetyCheck())) ++ : Option.create_None(); + return new PutKeyPolicyRequest( + keyId, + policyName, +@@ -3711,22 +3023,18 @@ public class ToDafny { + keyEncryptionAlgorithm = + Objects.nonNull(nativeValue.keyEncryptionAlgorithm()) + ? Option.create_Some( +- KeyEncryptionMechanism._typeDescriptor(), + ToDafny.KeyEncryptionMechanism(nativeValue.keyEncryptionAlgorithm()) + ) +- : Option.create_None(KeyEncryptionMechanism._typeDescriptor()); ++ : Option.create_None(); + Option> attestationDocument; + attestationDocument = + Objects.nonNull(nativeValue.attestationDocument()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.attestationDocument().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + return new RecipientInfo(keyEncryptionAlgorithm, attestationDocument); + } + +@@ -3748,30 +3056,18 @@ public class ToDafny { + (Objects.nonNull(nativeValue.sourceEncryptionContext()) && + nativeValue.sourceEncryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType(nativeValue.sourceEncryptionContext()) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option> sourceKeyId; + sourceKeyId = + Objects.nonNull(nativeValue.sourceKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.sourceKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + DafnySequence destinationKeyId; + destinationKeyId = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( +@@ -3787,62 +3083,42 @@ public class ToDafny { + (Objects.nonNull(nativeValue.destinationEncryptionContext()) && + nativeValue.destinationEncryptionContext().size() > 0) + ? Option.create_Some( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), + ToDafny.EncryptionContextType( + nativeValue.destinationEncryptionContext() + ) + ) +- : Option.create_None( +- DafnyMap._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ : Option.create_None(); + Option sourceEncryptionAlgorithm; + sourceEncryptionAlgorithm = + Objects.nonNull(nativeValue.sourceEncryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec( + nativeValue.sourceEncryptionAlgorithm() + ) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option destinationEncryptionAlgorithm; + destinationEncryptionAlgorithm = + Objects.nonNull(nativeValue.destinationEncryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec( + nativeValue.destinationEncryptionAlgorithm() + ) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new ReEncryptRequest( + ciphertextBlob, + sourceEncryptionContext, +@@ -3863,58 +3139,47 @@ public class ToDafny { + ciphertextBlob = + Objects.nonNull(nativeValue.ciphertextBlob()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.ciphertextBlob().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option> sourceKeyId; + sourceKeyId = + Objects.nonNull(nativeValue.sourceKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.sourceKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option sourceEncryptionAlgorithm; + sourceEncryptionAlgorithm = + Objects.nonNull(nativeValue.sourceEncryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec( + nativeValue.sourceEncryptionAlgorithm() + ) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + Option destinationEncryptionAlgorithm; + destinationEncryptionAlgorithm = + Objects.nonNull(nativeValue.destinationEncryptionAlgorithm()) + ? Option.create_Some( +- EncryptionAlgorithmSpec._typeDescriptor(), + ToDafny.EncryptionAlgorithmSpec( + nativeValue.destinationEncryptionAlgorithm() + ) + ) +- : Option.create_None(EncryptionAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + return new ReEncryptResponse( + ciphertextBlob, + sourceKeyId, +@@ -3941,44 +3206,30 @@ public class ToDafny { + policy = + Objects.nonNull(nativeValue.policy()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.policy() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option bypassPolicyLockoutSafetyCheck; + bypassPolicyLockoutSafetyCheck = + Objects.nonNull(nativeValue.bypassPolicyLockoutSafetyCheck()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.bypassPolicyLockoutSafetyCheck()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.bypassPolicyLockoutSafetyCheck())) ++ : Option.create_None(); + Option> description; + description = + Objects.nonNull(nativeValue.description()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.description() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> tags; + tags = + (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()), +- ToDafny.TagList(nativeValue.tags()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) ++ : Option.create_None(); + return new ReplicateKeyRequest( + keyId, + replicaRegion, +@@ -3996,33 +3247,24 @@ public class ToDafny { + replicaKeyMetadata = + Objects.nonNull(nativeValue.replicaKeyMetadata()) + ? Option.create_Some( +- KeyMetadata._typeDescriptor(), + ToDafny.KeyMetadata(nativeValue.replicaKeyMetadata()) + ) +- : Option.create_None(KeyMetadata._typeDescriptor()); ++ : Option.create_None(); + Option> replicaPolicy; + replicaPolicy = + Objects.nonNull(nativeValue.replicaPolicy()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.replicaPolicy() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> replicaTags; + replicaTags = + (Objects.nonNull(nativeValue.replicaTags()) && + nativeValue.replicaTags().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()), +- ToDafny.TagList(nativeValue.replicaTags()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor(Tag._typeDescriptor()) +- ); ++ ? Option.create_Some(ToDafny.TagList(nativeValue.replicaTags())) ++ : Option.create_None(); + return new ReplicateKeyResponse( + replicaKeyMetadata, + replicaPolicy, +@@ -4037,43 +3279,34 @@ public class ToDafny { + grantToken = + Objects.nonNull(nativeValue.grantToken()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.grantToken() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keyId; + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> grantId; + grantId = + Objects.nonNull(nativeValue.grantId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.grantId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new RetireGrantRequest(grantToken, keyId, grantId, dryRun); + } + +@@ -4093,8 +3326,8 @@ public class ToDafny { + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new RevokeGrantRequest(keyId, grantId, dryRun); + } + +@@ -4116,14 +3349,11 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new RotateKeyOnDemandResponse(keyId); + } + +@@ -4146,34 +3376,25 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> rotationDate; + rotationDate = + Objects.nonNull(nativeValue.rotationDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.rotationDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option rotationType; + rotationType = + Objects.nonNull(nativeValue.rotationType()) +- ? Option.create_Some( +- RotationType._typeDescriptor(), +- ToDafny.RotationType(nativeValue.rotationType()) +- ) +- : Option.create_None(RotationType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.RotationType(nativeValue.rotationType())) ++ : Option.create_None(); + return new RotationsListEntry(keyId, rotationDate, rotationType); + } + +@@ -4188,11 +3409,8 @@ public class ToDafny { + Option pendingWindowInDays; + pendingWindowInDays = + Objects.nonNull(nativeValue.pendingWindowInDays()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.pendingWindowInDays()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.pendingWindowInDays())) ++ : Option.create_None(); + return new ScheduleKeyDeletionRequest(keyId, pendingWindowInDays); + } + +@@ -4203,42 +3421,30 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> deletionDate; + deletionDate = + Objects.nonNull(nativeValue.deletionDate()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.deletionDate() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option keyState; + keyState = + Objects.nonNull(nativeValue.keyState()) +- ? Option.create_Some( +- KeyState._typeDescriptor(), +- ToDafny.KeyState(nativeValue.keyState()) +- ) +- : Option.create_None(KeyState._typeDescriptor()); ++ ? Option.create_Some(ToDafny.KeyState(nativeValue.keyState())) ++ : Option.create_None(); + Option pendingWindowInDays; + pendingWindowInDays = + Objects.nonNull(nativeValue.pendingWindowInDays()) +- ? Option.create_Some( +- TypeDescriptor.INT, +- (nativeValue.pendingWindowInDays()) +- ) +- : Option.create_None(TypeDescriptor.INT); ++ ? Option.create_Some((nativeValue.pendingWindowInDays())) ++ : Option.create_None(); + return new ScheduleKeyDeletionResponse( + keyId, + deletionDate, +@@ -4277,36 +3483,24 @@ public class ToDafny { + Option messageType; + messageType = + Objects.nonNull(nativeValue.messageType()) +- ? Option.create_Some( +- MessageType._typeDescriptor(), +- ToDafny.MessageType(nativeValue.messageType()) +- ) +- : Option.create_None(MessageType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.MessageType(nativeValue.messageType())) ++ : Option.create_None(); + Option< + DafnySequence> + > grantTokens; + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + SigningAlgorithmSpec signingAlgorithm; + signingAlgorithm = + ToDafny.SigningAlgorithmSpec(nativeValue.signingAlgorithm()); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new SignRequest( + keyId, + message, +@@ -4324,34 +3518,27 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> signature; + signature = + Objects.nonNull(nativeValue.signature()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( + nativeValue.signature().asByteArray() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.BYTE) +- ); ++ : Option.create_None(); + Option signingAlgorithm; + signingAlgorithm = + Objects.nonNull(nativeValue.signingAlgorithm()) + ? Option.create_Some( +- SigningAlgorithmSpec._typeDescriptor(), + ToDafny.SigningAlgorithmSpec(nativeValue.signingAlgorithm()) + ) +- : Option.create_None(SigningAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + return new SignResponse(keyId, signature, signingAlgorithm); + } + +@@ -4445,96 +3632,74 @@ public class ToDafny { + newCustomKeyStoreName = + Objects.nonNull(nativeValue.newCustomKeyStoreName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.newCustomKeyStoreName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> keyStorePassword; + keyStorePassword = + Objects.nonNull(nativeValue.keyStorePassword()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyStorePassword() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> cloudHsmClusterId; + cloudHsmClusterId = + Objects.nonNull(nativeValue.cloudHsmClusterId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.cloudHsmClusterId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> xksProxyUriEndpoint; + xksProxyUriEndpoint = + Objects.nonNull(nativeValue.xksProxyUriEndpoint()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksProxyUriEndpoint() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> xksProxyUriPath; + xksProxyUriPath = + Objects.nonNull(nativeValue.xksProxyUriPath()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksProxyUriPath() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> xksProxyVpcEndpointServiceName; + xksProxyVpcEndpointServiceName = + Objects.nonNull(nativeValue.xksProxyVpcEndpointServiceName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.xksProxyVpcEndpointServiceName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option< + XksProxyAuthenticationCredentialType + > xksProxyAuthenticationCredential; + xksProxyAuthenticationCredential = + Objects.nonNull(nativeValue.xksProxyAuthenticationCredential()) + ? Option.create_Some( +- XksProxyAuthenticationCredentialType._typeDescriptor(), + ToDafny.XksProxyAuthenticationCredentialType( + nativeValue.xksProxyAuthenticationCredential() + ) + ) +- : Option.create_None( +- XksProxyAuthenticationCredentialType._typeDescriptor() +- ); ++ : Option.create_None(); + Option xksProxyConnectivity; + xksProxyConnectivity = + Objects.nonNull(nativeValue.xksProxyConnectivity()) + ? Option.create_Some( +- XksProxyConnectivityType._typeDescriptor(), + ToDafny.XksProxyConnectivityType(nativeValue.xksProxyConnectivity()) + ) +- : Option.create_None(XksProxyConnectivityType._typeDescriptor()); ++ : Option.create_None(); + return new UpdateCustomKeyStoreRequest( + customKeyStoreId, + newCustomKeyStoreName, +@@ -4612,22 +3777,13 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new VerifyMacRequest( + message, + keyId, +@@ -4645,27 +3801,23 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option macValid; + macValid = + Objects.nonNull(nativeValue.macValid()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.macValid())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.macValid())) ++ : Option.create_None(); + Option macAlgorithm; + macAlgorithm = + Objects.nonNull(nativeValue.macAlgorithm()) + ? Option.create_Some( +- MacAlgorithmSpec._typeDescriptor(), + ToDafny.MacAlgorithmSpec(nativeValue.macAlgorithm()) + ) +- : Option.create_None(MacAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + return new VerifyMacResponse(keyId, macValid, macAlgorithm); + } + +@@ -4685,11 +3837,8 @@ public class ToDafny { + Option messageType; + messageType = + Objects.nonNull(nativeValue.messageType()) +- ? Option.create_Some( +- MessageType._typeDescriptor(), +- ToDafny.MessageType(nativeValue.messageType()) +- ) +- : Option.create_None(MessageType._typeDescriptor()); ++ ? Option.create_Some(ToDafny.MessageType(nativeValue.messageType())) ++ : Option.create_None(); + DafnySequence signature; + signature = + software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( +@@ -4704,22 +3853,13 @@ public class ToDafny { + grantTokens = + (Objects.nonNull(nativeValue.grantTokens()) && + nativeValue.grantTokens().size() > 0) +- ? Option.create_Some( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ), +- ToDafny.GrantTokenList(nativeValue.grantTokens()) +- ) +- : Option.create_None( +- DafnySequence._typeDescriptor( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ) +- ); ++ ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) ++ : Option.create_None(); + Option dryRun; + dryRun = + Objects.nonNull(nativeValue.dryRun()) +- ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.dryRun())) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.dryRun())) ++ : Option.create_None(); + return new VerifyRequest( + keyId, + message, +@@ -4738,30 +3878,23 @@ public class ToDafny { + keyId = + Objects.nonNull(nativeValue.keyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.keyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option signatureValid; + signatureValid = + Objects.nonNull(nativeValue.signatureValid()) +- ? Option.create_Some( +- TypeDescriptor.BOOLEAN, +- (nativeValue.signatureValid()) +- ) +- : Option.create_None(TypeDescriptor.BOOLEAN); ++ ? Option.create_Some((nativeValue.signatureValid())) ++ : Option.create_None(); + Option signingAlgorithm; + signingAlgorithm = + Objects.nonNull(nativeValue.signingAlgorithm()) + ? Option.create_Some( +- SigningAlgorithmSpec._typeDescriptor(), + ToDafny.SigningAlgorithmSpec(nativeValue.signingAlgorithm()) + ) +- : Option.create_None(SigningAlgorithmSpec._typeDescriptor()); ++ : Option.create_None(); + return new VerifyResponse(keyId, signatureValid, signingAlgorithm); + } + +@@ -4772,14 +3905,11 @@ public class ToDafny { + id = + Objects.nonNull(nativeValue.id()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.id() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new XksKeyConfigurationType(id); + } + +@@ -4809,58 +3939,45 @@ public class ToDafny { + connectivity = + Objects.nonNull(nativeValue.connectivity()) + ? Option.create_Some( +- XksProxyConnectivityType._typeDescriptor(), + ToDafny.XksProxyConnectivityType(nativeValue.connectivity()) + ) +- : Option.create_None(XksProxyConnectivityType._typeDescriptor()); ++ : Option.create_None(); + Option> accessKeyId; + accessKeyId = + Objects.nonNull(nativeValue.accessKeyId()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.accessKeyId() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> uriEndpoint; + uriEndpoint = + Objects.nonNull(nativeValue.uriEndpoint()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.uriEndpoint() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> uriPath; + uriPath = + Objects.nonNull(nativeValue.uriPath()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.uriPath() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + Option> vpcEndpointServiceName; + vpcEndpointServiceName = + Objects.nonNull(nativeValue.vpcEndpointServiceName()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.vpcEndpointServiceName() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new XksProxyConfigurationType( + connectivity, + accessKeyId, +@@ -4875,14 +3992,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_AlreadyExistsException(message); + } + +@@ -4891,14 +4005,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CloudHsmClusterInUseException(message); + } + +@@ -4909,14 +4020,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CloudHsmClusterInvalidConfigurationException(message); + } + +@@ -4925,14 +4033,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CloudHsmClusterNotActiveException(message); + } + +@@ -4941,14 +4046,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CloudHsmClusterNotFoundException(message); + } + +@@ -4957,14 +4059,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CloudHsmClusterNotRelatedException(message); + } + +@@ -4973,14 +4072,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ConflictException(message); + } + +@@ -4989,14 +4085,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CustomKeyStoreHasCMKsException(message); + } + +@@ -5005,14 +4098,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CustomKeyStoreInvalidStateException(message); + } + +@@ -5021,14 +4111,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CustomKeyStoreNameInUseException(message); + } + +@@ -5037,14 +4124,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_CustomKeyStoreNotFoundException(message); + } + +@@ -5053,14 +4137,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_DependencyTimeoutException(message); + } + +@@ -5069,14 +4150,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_DisabledException(message); + } + +@@ -5085,14 +4163,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_DryRunOperationException(message); + } + +@@ -5101,14 +4176,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_ExpiredImportTokenException(message); + } + +@@ -5117,14 +4189,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_IncorrectKeyException(message); + } + +@@ -5133,14 +4202,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_IncorrectKeyMaterialException(message); + } + +@@ -5149,14 +4215,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_IncorrectTrustAnchorException(message); + } + +@@ -5165,14 +4228,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidAliasNameException(message); + } + +@@ -5181,14 +4241,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidArnException(message); + } + +@@ -5197,14 +4254,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidCiphertextException(message); + } + +@@ -5213,14 +4267,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidGrantIdException(message); + } + +@@ -5229,14 +4280,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidGrantTokenException(message); + } + +@@ -5245,14 +4293,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidImportTokenException(message); + } + +@@ -5261,14 +4306,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidKeyUsageException(message); + } + +@@ -5277,14 +4319,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_InvalidMarkerException(message); + } + +@@ -5293,14 +4332,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_KeyUnavailableException(message); + } + +@@ -5309,14 +4345,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_KMSInternalException(message); + } + +@@ -5325,14 +4358,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_KMSInvalidMacException(message); + } + +@@ -5341,14 +4371,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_KMSInvalidSignatureException(message); + } + +@@ -5357,14 +4384,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_KMSInvalidStateException(message); + } + +@@ -5373,14 +4397,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_LimitExceededException(message); + } + +@@ -5389,14 +4410,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_MalformedPolicyDocumentException(message); + } + +@@ -5405,14 +4423,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_NotFoundException(message); + } + +@@ -5421,14 +4436,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_TagException(message); + } + +@@ -5437,14 +4449,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_UnsupportedOperationException(message); + } + +@@ -5453,14 +4462,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksKeyAlreadyInUseException(message); + } + +@@ -5469,14 +4475,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksKeyInvalidConfigurationException(message); + } + +@@ -5485,14 +4488,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksKeyNotFoundException(message); + } + +@@ -5503,14 +4503,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyIncorrectAuthenticationCredentialException( + message + ); +@@ -5521,14 +4518,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyInvalidConfigurationException(message); + } + +@@ -5537,14 +4531,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyInvalidResponseException(message); + } + +@@ -5553,14 +4544,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyUriEndpointInUseException(message); + } + +@@ -5569,14 +4557,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyUriInUseException(message); + } + +@@ -5585,14 +4570,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyUriUnreachableException(message); + } + +@@ -5603,14 +4585,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyVpcEndpointServiceInUseException(message); + } + +@@ -5621,14 +4600,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyVpcEndpointServiceInvalidConfigurationException( + message + ); +@@ -5641,14 +4617,11 @@ public class ToDafny { + message = + Objects.nonNull(nativeValue.getMessage()) + ? Option.create_Some( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( + nativeValue.getMessage() + ) + ) +- : Option.create_None( +- DafnySequence._typeDescriptor(TypeDescriptor.CHAR) +- ); ++ : Option.create_None(); + return new Error_XksProxyVpcEndpointServiceNotFoundException(message); + } + +@@ -5676,7 +4649,9 @@ public class ToDafny { + { + return AlgorithmSpec.create_RSA__AES__KEY__WRAP__SHA__256(); + } +- case SM2PKE: ++ // BEGIN MANUAL EDIT ++ case SM2_PKE: ++ // END MANUAL EDIT + { + return AlgorithmSpec.create_SM2PKE(); + } +@@ -6483,7 +5458,9 @@ public class ToDafny { + { + return SigningAlgorithmSpec.create_ECDSA__SHA__512(); + } +- case SM2DSA: ++ // BEGIN MANUAL EDIT ++ case SM2_DSA: ++ // END MANUAL EDIT + { + return SigningAlgorithmSpec.create_SM2DSA(); + } +diff --git b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java +index 56979da2..59df5196 100644 +--- b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java ++++ a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java +@@ -4542,6 +4542,196 @@ public class ToNative { + return builder.build(); + } + ++ // BEGIN MANUAL EDIT ++ public static RuntimeException Error( ++ software.amazon.cryptography.services.kms.internaldafny.types.Error dafnyValue ++ ) { ++ if (dafnyValue.is_AlreadyExistsException()) { ++ return ToNative.Error((Error_AlreadyExistsException) dafnyValue); ++ } ++ if (dafnyValue.is_CloudHsmClusterInUseException()) { ++ return ToNative.Error((Error_CloudHsmClusterInUseException) dafnyValue); ++ } ++ if (dafnyValue.is_CloudHsmClusterInvalidConfigurationException()) { ++ return ToNative.Error( ++ (Error_CloudHsmClusterInvalidConfigurationException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_CloudHsmClusterNotActiveException()) { ++ return ToNative.Error( ++ (Error_CloudHsmClusterNotActiveException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_CloudHsmClusterNotFoundException()) { ++ return ToNative.Error( ++ (Error_CloudHsmClusterNotFoundException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_CloudHsmClusterNotRelatedException()) { ++ return ToNative.Error( ++ (Error_CloudHsmClusterNotRelatedException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_ConflictException()) { ++ return ToNative.Error((Error_ConflictException) dafnyValue); ++ } ++ if (dafnyValue.is_CustomKeyStoreHasCMKsException()) { ++ return ToNative.Error((Error_CustomKeyStoreHasCMKsException) dafnyValue); ++ } ++ if (dafnyValue.is_CustomKeyStoreInvalidStateException()) { ++ return ToNative.Error( ++ (Error_CustomKeyStoreInvalidStateException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_CustomKeyStoreNameInUseException()) { ++ return ToNative.Error( ++ (Error_CustomKeyStoreNameInUseException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_CustomKeyStoreNotFoundException()) { ++ return ToNative.Error((Error_CustomKeyStoreNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_DependencyTimeoutException()) { ++ return ToNative.Error((Error_DependencyTimeoutException) dafnyValue); ++ } ++ if (dafnyValue.is_DisabledException()) { ++ return ToNative.Error((Error_DisabledException) dafnyValue); ++ } ++ if (dafnyValue.is_DryRunOperationException()) { ++ return ToNative.Error((Error_DryRunOperationException) dafnyValue); ++ } ++ if (dafnyValue.is_ExpiredImportTokenException()) { ++ return ToNative.Error((Error_ExpiredImportTokenException) dafnyValue); ++ } ++ if (dafnyValue.is_IncorrectKeyException()) { ++ return ToNative.Error((Error_IncorrectKeyException) dafnyValue); ++ } ++ if (dafnyValue.is_IncorrectKeyMaterialException()) { ++ return ToNative.Error((Error_IncorrectKeyMaterialException) dafnyValue); ++ } ++ if (dafnyValue.is_IncorrectTrustAnchorException()) { ++ return ToNative.Error((Error_IncorrectTrustAnchorException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidAliasNameException()) { ++ return ToNative.Error((Error_InvalidAliasNameException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidArnException()) { ++ return ToNative.Error((Error_InvalidArnException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidCiphertextException()) { ++ return ToNative.Error((Error_InvalidCiphertextException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidGrantIdException()) { ++ return ToNative.Error((Error_InvalidGrantIdException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidGrantTokenException()) { ++ return ToNative.Error((Error_InvalidGrantTokenException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidImportTokenException()) { ++ return ToNative.Error((Error_InvalidImportTokenException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidKeyUsageException()) { ++ return ToNative.Error((Error_InvalidKeyUsageException) dafnyValue); ++ } ++ if (dafnyValue.is_InvalidMarkerException()) { ++ return ToNative.Error((Error_InvalidMarkerException) dafnyValue); ++ } ++ if (dafnyValue.is_KeyUnavailableException()) { ++ return ToNative.Error((Error_KeyUnavailableException) dafnyValue); ++ } ++ if (dafnyValue.is_KMSInternalException()) { ++ return ToNative.Error((Error_KMSInternalException) dafnyValue); ++ } ++ if (dafnyValue.is_KMSInvalidMacException()) { ++ return ToNative.Error((Error_KMSInvalidMacException) dafnyValue); ++ } ++ if (dafnyValue.is_KMSInvalidSignatureException()) { ++ return ToNative.Error((Error_KMSInvalidSignatureException) dafnyValue); ++ } ++ if (dafnyValue.is_KMSInvalidStateException()) { ++ return ToNative.Error((Error_KMSInvalidStateException) dafnyValue); ++ } ++ if (dafnyValue.is_LimitExceededException()) { ++ return ToNative.Error((Error_LimitExceededException) dafnyValue); ++ } ++ if (dafnyValue.is_MalformedPolicyDocumentException()) { ++ return ToNative.Error( ++ (Error_MalformedPolicyDocumentException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_NotFoundException()) { ++ return ToNative.Error((Error_NotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_TagException()) { ++ return ToNative.Error((Error_TagException) dafnyValue); ++ } ++ if (dafnyValue.is_UnsupportedOperationException()) { ++ return ToNative.Error((Error_UnsupportedOperationException) dafnyValue); ++ } ++ if (dafnyValue.is_XksKeyAlreadyInUseException()) { ++ return ToNative.Error((Error_XksKeyAlreadyInUseException) dafnyValue); ++ } ++ if (dafnyValue.is_XksKeyInvalidConfigurationException()) { ++ return ToNative.Error( ++ (Error_XksKeyInvalidConfigurationException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_XksKeyNotFoundException()) { ++ return ToNative.Error((Error_XksKeyNotFoundException) dafnyValue); ++ } ++ if (dafnyValue.is_XksProxyIncorrectAuthenticationCredentialException()) { ++ return ToNative.Error( ++ (Error_XksProxyIncorrectAuthenticationCredentialException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_XksProxyInvalidConfigurationException()) { ++ return ToNative.Error( ++ (Error_XksProxyInvalidConfigurationException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_XksProxyInvalidResponseException()) { ++ return ToNative.Error( ++ (Error_XksProxyInvalidResponseException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_XksProxyUriEndpointInUseException()) { ++ return ToNative.Error( ++ (Error_XksProxyUriEndpointInUseException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_XksProxyUriInUseException()) { ++ return ToNative.Error((Error_XksProxyUriInUseException) dafnyValue); ++ } ++ if (dafnyValue.is_XksProxyUriUnreachableException()) { ++ return ToNative.Error((Error_XksProxyUriUnreachableException) dafnyValue); ++ } ++ if (dafnyValue.is_XksProxyVpcEndpointServiceInUseException()) { ++ return ToNative.Error( ++ (Error_XksProxyVpcEndpointServiceInUseException) dafnyValue ++ ); ++ } ++ if ( ++ dafnyValue.is_XksProxyVpcEndpointServiceInvalidConfigurationException() ++ ) { ++ return ToNative.Error( ++ (Error_XksProxyVpcEndpointServiceInvalidConfigurationException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_XksProxyVpcEndpointServiceNotFoundException()) { ++ return ToNative.Error( ++ (Error_XksProxyVpcEndpointServiceNotFoundException) dafnyValue ++ ); ++ } ++ if (dafnyValue.is_Opaque()) { ++ return ToNative.Error((Error_Opaque) dafnyValue); ++ } ++ // TODO This should indicate a codegen bug; every error Should have been taken care of. ++ return new IllegalStateException( ++ String.format("Unknown error thrown while calling KMS. %s", dafnyValue) ++ ); ++ } ++ ++ // END MANUAL EDIT + public static KmsClient TrentService(IKMSClient dafnyValue) { + return ((Shim) dafnyValue).impl(); + } +@@ -4556,17 +4746,9 @@ public class ToNative { + return (KmsException) dafnyValue.dtor_obj(); + } else if (dafnyValue.dtor_obj() instanceof Exception) { + return (RuntimeException) dafnyValue.dtor_obj(); +- } else if (dafnyValue.dtor_message().is_Some()) { +- final String suffix = dafnyValue.dtor_obj() != null +- ? String.format(" Unknown Object: %s", dafnyValue.dtor_obj()) +- : ""; +- final String message = +- software.amazon.smithy.dafny.conversion.ToNative.Simple.String( +- dafnyValue.dtor_message().dtor_value() +- ) + +- suffix; +- return new RuntimeException(message); + } ++ // BEGIN MANUAL EDIT ++ // END MANUAL EDIT + return new IllegalStateException( + String.format( + "Unknown error thrown while calling AWS Key Management Service. %s", diff --git a/ComAmazonawsKms/project.properties b/ComAmazonawsKms/project.properties index dd7eb37b9..b35126df6 100644 --- a/ComAmazonawsKms/project.properties +++ b/ComAmazonawsKms/project.properties @@ -1,3 +1,4 @@ # This file stores the top level dafny version information. # All elements of the project need to agree on this version. dafnyVersion=4.2.0 +dafnyRuntimeJavaVersion=4.2.0 diff --git a/ComAmazonawsKms/runtimes/java/build.gradle.kts b/ComAmazonawsKms/runtimes/java/build.gradle.kts index 3f9a4779a..621bf6015 100644 --- a/ComAmazonawsKms/runtimes/java/build.gradle.kts +++ b/ComAmazonawsKms/runtimes/java/build.gradle.kts @@ -28,6 +28,7 @@ java { } sourceSets["test"].java { srcDir("src/test/dafny-generated") + srcDir("src/test/java") } } @@ -67,6 +68,7 @@ dependencies { implementation(platform("software.amazon.awssdk:bom:2.26.3")) implementation("software.amazon.awssdk:kms") implementation("software.amazon.awssdk:apache-client") + testImplementation("org.testng:testng:7.5") } publishing { @@ -96,4 +98,42 @@ tasks { mainClass.set("TestsFromDafny") classpath = sourceSets["test"].runtimeClasspath } -} \ No newline at end of file +} + +tasks.test { + useTestNG() + + // This will show System.out.println statements + testLogging.showStandardStreams = true + + testLogging { + lifecycle { + events = mutableSetOf(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED, org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED, org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED) + exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL + showExceptions = true + showCauses = true + showStackTraces = true + showStandardStreams = true + } + info.events = lifecycle.events + info.exceptionFormat = lifecycle.exceptionFormat + } + + // See https://github.com/gradle/kotlin-dsl/issues/836 + addTestListener(object : TestListener { + override fun beforeSuite(suite: TestDescriptor) {} + override fun beforeTest(testDescriptor: TestDescriptor) {} + override fun afterTest(testDescriptor: TestDescriptor, result: TestResult) {} + + override fun afterSuite(suite: TestDescriptor, result: TestResult) { + if (suite.parent == null) { // root suite + logger.lifecycle("----") + logger.lifecycle("Test result: ${result.resultType}") + logger.lifecycle("Test summary: ${result.testCount} tests, " + + "${result.successfulTestCount} succeeded, " + + "${result.failedTestCount} failed, " + + "${result.skippedTestCount} skipped") + } + } + }) +} diff --git a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java index fdbc17ce0..946ba4d3d 100644 --- a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java +++ b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/Shim.java @@ -193,7 +193,7 @@ public Result CancelKeyDeletion( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -222,7 +222,7 @@ public Result ConnectCustomKeyStore( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -250,7 +250,7 @@ public Result CreateAlias(CreateAliasRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -303,7 +303,7 @@ public Result CreateCustomKeyStore( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -339,7 +339,7 @@ public Result CreateGrant( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -381,7 +381,7 @@ public Result CreateKey(CreateKeyRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -419,7 +419,7 @@ public Result Decrypt(DecryptRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -441,7 +441,7 @@ public Result DeleteAlias(DeleteAliasRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -468,7 +468,7 @@ public Result DeleteCustomKeyStore( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -496,7 +496,7 @@ public Result DeleteImportedKeyMaterial( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -533,7 +533,7 @@ public Result DeriveSharedSecret( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -558,7 +558,7 @@ public Result DescribeCustomKeyStores( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -584,7 +584,7 @@ public Result DescribeKey( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -608,7 +608,7 @@ public Result DisableKey(DisableKeyRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -638,7 +638,7 @@ public Result DisableKeyRotation( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -664,7 +664,7 @@ > DisconnectCustomKeyStore(DisconnectCustomKeyStoreRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -690,7 +690,7 @@ public Result EnableKey(EnableKeyRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -720,7 +720,7 @@ public Result EnableKeyRotation( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -754,7 +754,7 @@ public Result Encrypt(EncryptRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -792,7 +792,7 @@ public Result GenerateDataKey( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -831,7 +831,7 @@ public Result GenerateDataKeyPair( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -873,7 +873,7 @@ > GenerateDataKeyPairWithoutPlaintext( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -913,7 +913,7 @@ > GenerateDataKeyWithoutPlaintext( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -947,7 +947,7 @@ public Result GenerateMac( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -977,7 +977,7 @@ public Result GenerateRandom( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1005,7 +1005,7 @@ public Result GetKeyPolicy( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1036,7 +1036,7 @@ public Result GetKeyRotationStatus( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1067,7 +1067,7 @@ public Result GetParametersForImport( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1105,7 +1105,7 @@ public Result GetPublicKey( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1144,7 +1144,7 @@ public Result ImportKeyMaterial( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1172,7 +1172,7 @@ public Result ListAliases( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1202,7 +1202,7 @@ public Result ListGrants(ListGrantsRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1232,7 +1232,7 @@ public Result ListKeyPolicies( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1264,7 +1264,7 @@ public Result ListKeyRotations( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1286,7 +1286,7 @@ public Result ListKeys(ListKeysRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1314,7 +1314,7 @@ public Result ListResourceTags( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1344,7 +1344,7 @@ public Result PutKeyPolicy(PutKeyPolicyRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1382,7 +1382,7 @@ public Result ReEncrypt(ReEncryptRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1420,7 +1420,7 @@ public Result ReplicateKey( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1450,7 +1450,7 @@ public Result RetireGrant(RetireGrantRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1478,7 +1478,7 @@ public Result RevokeGrant(RevokeGrantRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1515,7 +1515,7 @@ public Result RotateKeyOnDemand( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1544,7 +1544,7 @@ public Result ScheduleKeyDeletion( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1578,7 +1578,7 @@ public Result Sign(SignRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1604,7 +1604,7 @@ public Result TagResource(TagResourceRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1628,7 +1628,7 @@ public Result UntagResource(UntagResourceRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1652,7 +1652,7 @@ public Result UpdateAlias(UpdateAliasRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1705,7 +1705,7 @@ public Result UpdateCustomKeyStore( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1731,7 +1731,7 @@ public Result UpdateKeyDescription( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1759,7 +1759,7 @@ public Result UpdatePrimaryRegion( } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1795,7 +1795,7 @@ public Result Verify(VerifyRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } @@ -1829,7 +1829,7 @@ public Result VerifyMac(VerifyMacRequest input) { } catch (KmsException ex) { return Result.create_Failure(ToDafny.Error(ex)); } catch (Exception ex) { - return Result.create_Failure(Error.create_Opaque(ex.toString())); + return Result.create_Failure(ToDafny.Error(ex)); } } } diff --git a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java index e0a52bfe2..9d02d3330 100644 --- a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java +++ b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToDafny.java @@ -10,6 +10,7 @@ import java.lang.Boolean; import java.lang.Byte; import java.lang.Character; +import java.lang.Exception; import java.lang.Integer; import java.lang.RuntimeException; import java.lang.String; @@ -142,7 +143,6 @@ import software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException; -import software.amazon.cryptography.services.kms.internaldafny.types.Error_Opaque; import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException; @@ -5730,16 +5730,21 @@ public static XksProxyConnectivityType XksProxyConnectivityType( } public static Error Error(KmsException nativeValue) { - Option> message; - message = - Objects.nonNull(nativeValue.getMessage()) - ? Option.create_Some( - software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( - nativeValue.getMessage() - ) - ) - : Option.create_None(); - return new Error_Opaque(message); + // While this is logically identical to the other Opaque Error case, + // it is semantically distinct. + // An un-modeled Service Error is different from a Java Heap Exhaustion error. + // In the future, Smithy-Dafny MAY allow for this distinction. + // Which would allow Dafny developers to treat the two differently. + return Error.create_Opaque(nativeValue); + } + + public static Error Error(Exception nativeValue) { + // While this is logically identical to the other Opaque Error case, + // it is semantically distinct. + // An un-modeled Service Error is different from a Java Heap Exhaustion error. + // In the future, Smithy-Dafny MAY allow for this distinction. + // Which would allow Dafny developers to treat the two differently. + return Error.create_Opaque(nativeValue); } public static IKMSClient TrentService(KmsClient nativeValue) { diff --git a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java index ac7b1a144..59df51961 100644 --- a/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java +++ b/ComAmazonawsKms/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/services/kms/internaldafny/ToNative.java @@ -6,6 +6,9 @@ import dafny.DafnyMap; import dafny.DafnySequence; import java.lang.Character; +import java.lang.Exception; +import java.lang.IllegalStateException; +import java.lang.RuntimeException; import java.lang.String; import java.util.List; import java.util.Map; @@ -113,9 +116,7 @@ import software.amazon.awssdk.services.kms.model.KeyState; import software.amazon.awssdk.services.kms.model.KeyUnavailableException; import software.amazon.awssdk.services.kms.model.KeyUsageType; -// BEGIN MANUAL EDIT import software.amazon.awssdk.services.kms.model.KmsException; -// END MANUAL EDIT import software.amazon.awssdk.services.kms.model.KmsInternalException; import software.amazon.awssdk.services.kms.model.KmsInvalidMacException; import software.amazon.awssdk.services.kms.model.KmsInvalidSignatureException; @@ -223,9 +224,7 @@ import software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException; -// BEGIN MANUAL EDIT import software.amazon.cryptography.services.kms.internaldafny.types.Error_Opaque; -// END MANUAL EDIT import software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException; import software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException; @@ -244,19 +243,6 @@ public class ToNative { - // BEGIN MANUAL EDIT - public static RuntimeException Error(Error_Opaque dafnyValue) { - if (dafnyValue.dtor_obj() instanceof KmsException) { - return (KmsException) dafnyValue.dtor_obj(); - } - // Because we only ever put `KmsException` into `Error_Opaque`, - // recieving any other type here indicates a bug with the codegen. - // Bubble up some error to indicate this failure state. - return new IllegalStateException("Unknown error recieved from KMS."); - } - - // END MANUAL EDIT - public static AlgorithmSpec AlgorithmSpec( software.amazon.cryptography.services.kms.internaldafny.types.AlgorithmSpec dafnyValue ) { @@ -4739,13 +4725,35 @@ public static RuntimeException Error( if (dafnyValue.is_Opaque()) { return ToNative.Error((Error_Opaque) dafnyValue); } - // TODO This should indicate a codegen bug - return new IllegalStateException("Unknown error recieved from KMS."); + // TODO This should indicate a codegen bug; every error Should have been taken care of. + return new IllegalStateException( + String.format("Unknown error thrown while calling KMS. %s", dafnyValue) + ); } // END MANUAL EDIT - public static KmsClient TrentService(IKMSClient dafnyValue) { return ((Shim) dafnyValue).impl(); } + + public static RuntimeException Error(Error_Opaque dafnyValue) { + // While the first two cases are logically identical, + // there is a semantic distinction. + // An un-modeled Service Error is different from a Java Heap Exhaustion error. + // In the future, Smithy-Dafny MAY allow for this distinction. + // Which would allow Dafny developers to treat the two differently. + if (dafnyValue.dtor_obj() instanceof KmsException) { + return (KmsException) dafnyValue.dtor_obj(); + } else if (dafnyValue.dtor_obj() instanceof Exception) { + return (RuntimeException) dafnyValue.dtor_obj(); + } + // BEGIN MANUAL EDIT + // END MANUAL EDIT + return new IllegalStateException( + String.format( + "Unknown error thrown while calling AWS Key Management Service. %s", + dafnyValue + ) + ); + } } diff --git a/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java b/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java new file mode 100644 index 000000000..c223dcd63 --- /dev/null +++ b/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java @@ -0,0 +1,42 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +import static software.amazon.cryptography.services.kms.internaldafny.__default.KMSClientForRegion; + +import Wrappers_Compile.Option; +import Wrappers_Compile.Result; +import org.testng.Assert; +import org.testng.annotations.Test; +import software.amazon.awssdk.services.kms.model.KmsException; +import software.amazon.cryptography.services.kms.internaldafny.ToNative; +import software.amazon.cryptography.services.kms.internaldafny.types.*; +import software.amazon.cryptography.services.kms.internaldafny.types.Error; +import software.amazon.smithy.dafny.conversion.ToDafny; + +public class UnwrapGenericKmsTests { + + @Test + public void noAccessUnwrappedFromOpaqueProperly() { + final Result kmsClient = KMSClientForRegion( + ToDafny.Simple.CharacterSequence("us-west-2") + ); + final String failingKeyId = + "arn:aws:kms:us-west-2:370957321024:key/e20ac7b8-3d95-46ee-b3d5-f5dca6393945"; + Assert.assertTrue(kmsClient.is_Success()); + IKMSClient ikmsClient = kmsClient.dtor_value(); + Result response = + ikmsClient.GenerateDataKeyWithoutPlaintext( + GenerateDataKeyWithoutPlaintextRequest.create_GenerateDataKeyWithoutPlaintextRequest( + ToDafny.Simple.CharacterSequence(failingKeyId), + Option.create_None(), + Option.create_None(), + Option.create_None(), + Option.create_None(), + Option.create_None() + ) + ); + Assert.assertTrue(response.is_Failure()); + final Exception ex = ToNative.Error(response.dtor_error()); + Assert.assertTrue(ex instanceof KmsException); + } +} diff --git a/ComAmazonawsKms/test/TestComAmazonawsKms.dfy b/ComAmazonawsKms/test/TestComAmazonawsKms.dfy index 3072d99a6..a9528a1c5 100644 --- a/ComAmazonawsKms/test/TestComAmazonawsKms.dfy +++ b/ComAmazonawsKms/test/TestComAmazonawsKms.dfy @@ -7,14 +7,19 @@ module TestComAmazonawsKms { import Com.Amazonaws.Kms import opened StandardLibrary.UInt + // Does not have GenerateDataKeyWithoutPlaintext permission const keyId := "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f" + // No Permissions to call GenerateDataKeyWithoutPlaintext, set on KeyPolicy, not IAM + const failingKeyId := "arn:aws:kms:us-west-2:370957321024:key/e20ac7b8-3d95-46ee-b3d5-f5dca6393945" + // From Keystore's Test Fixtures + const keyIdGenerateWOPlain := "arn:aws:kms:us-west-2:370957321024:key/9d989aa2-2f9c-438c-a745-cc57d3ad0126" // ECC Curve P256 Keys - const senderKmsKey := "arn:aws:kms:us-west-2:370957321024:key/eabdf483-6be2-4d2d-8ee4-8c2583d416e9"; - const recipientKmsKey := "arn:aws:kms:us-west-2:370957321024:key/0265c8e9-5b6a-4055-8f70-63719e09fda5"; + const senderKmsKey := "arn:aws:kms:us-west-2:370957321024:key/eabdf483-6be2-4d2d-8ee4-8c2583d416e9" + const recipientKmsKey := "arn:aws:kms:us-west-2:370957321024:key/0265c8e9-5b6a-4055-8f70-63719e09fda5" // ECC Curve P384 - const incorrectEccCurveKey := "arn:aws:kms:us-west-2:370957321024:key/7f35a704-f4fb-469d-98b1-62a1fa2cc44e"; + const incorrectEccCurveKey := "arn:aws:kms:us-west-2:370957321024:key/7f35a704-f4fb-469d-98b1-62a1fa2cc44e" // One test depends on knowing the region it is being run it. // For now, hardcode this value to the region we are currently using to test, @@ -74,6 +79,18 @@ module TestComAmazonawsKms { ); } + method {:test} BasicGenerateWithoutPlaintextTests() { + BasicGenerateWithoutPlaintextTest( + input := Kms.Types.GenerateDataKeyWithoutPlaintextRequest( + KeyId := keyIdGenerateWOPlain, + EncryptionContext := Kms.Wrappers.None, + NumberOfBytes := Kms.Wrappers.Some(32 as Kms.Types.NumberOfBytesType), + KeySpec := Kms.Wrappers.None, + GrantTokens := Kms.Wrappers.None + ) + ); + } + method {:test} BasicEncryptTests() { BasicEncryptTest( input := Kms.Types.EncryptRequest( @@ -87,6 +104,26 @@ module TestComAmazonawsKms { ); } + const failingInput := Kms.Types.GenerateDataKeyWithoutPlaintextRequest( + KeyId := failingKeyId, + EncryptionContext := Kms.Wrappers.None, + NumberOfBytes := Kms.Wrappers.Some(32 as Kms.Types.NumberOfBytesType), + KeySpec := Kms.Wrappers.None, + GrantTokens := Kms.Wrappers.None + ) + + method {:test} BasicFailTests() { + var client :- expect Kms.KMSClientForRegion(TEST_REGION); + var ret := client.GenerateDataKeyWithoutPlaintext(failingInput); + expect ret.Failure?; + var err: Kms.Types.Error := ret.error; + expect err.Opaque?; + match err { + case Opaque(obj) => expect true; + case _ => expect false, "Failing KMS Key MUST cause an OpaqueError that can later be unwrapped to a proper but generic KMS Exception."; + } + } + method BasicDecryptTest( nameonly input: Kms.Types.DecryptRequest, nameonly expectedPlaintext: Kms.Types.PlaintextType, @@ -97,7 +134,7 @@ module TestComAmazonawsKms { var ret := client.Decrypt(input); - print ret; + // print ret; expect(ret.Success?); @@ -142,6 +179,38 @@ module TestComAmazonawsKms { ); } + method BasicGenerateWithoutPlaintextTest( + nameonly input: Kms.Types.GenerateDataKeyWithoutPlaintextRequest + ) + requires input.NumberOfBytes.Some? + { + var client :- expect Kms.KMSClientForRegion(TEST_REGION); + + var retGenerate := client.GenerateDataKeyWithoutPlaintext(input); + // print retGenerate; + expect(retGenerate.Success?); + + var GenerateDataKeyWithoutPlaintextResponse(CiphertextBlob, KeyId) := retGenerate.value; + + expect CiphertextBlob.Some?; + expect KeyId.Some?; + + var decryptInput := Kms.Types.DecryptRequest( + CiphertextBlob := CiphertextBlob.value, + EncryptionContext := input.EncryptionContext, + GrantTokens := input.GrantTokens, + KeyId := Kms.Wrappers.Some(KeyId.value), + EncryptionAlgorithm := Kms.Wrappers.None + ); + + var ret := client.Decrypt(decryptInput); + expect(ret.Success?); + var DecryptResponse(KeyIdTwo, Plaintext, EncryptionAlgorithm, CiphertextBlobTwo) := ret.value; + + expect KeyIdTwo.Some?; + expect KeyIdTwo.value == KeyId.value; + } + method BasicEncryptTest( nameonly input: Kms.Types.EncryptRequest ) @@ -209,7 +278,7 @@ module TestComAmazonawsKms { } else { expect (ret.Failure?); - print ret.error; + // print ret.error; } } diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/key-vectors.smithy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/key-vectors.smithy index adc56717f..8286072a9 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/key-vectors.smithy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/key-vectors.smithy @@ -1,6 +1,5 @@ namespace aws.cryptography.materialProvidersTestVectorKeys -///////////// // KeyVectors Creation @aws.polymorph#localService( sdkId: "KeyVectors", diff --git a/TestVectorsAwsCryptographicMaterialProviders/project.properties b/TestVectorsAwsCryptographicMaterialProviders/project.properties index dd7eb37b9..b35126df6 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/project.properties +++ b/TestVectorsAwsCryptographicMaterialProviders/project.properties @@ -1,3 +1,4 @@ # This file stores the top level dafny version information. # All elements of the project need to agree on this version. dafnyVersion=4.2.0 +dafnyRuntimeJavaVersion=4.2.0 diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts b/TestVectorsAwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts index 162731369..5317a415a 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/java/build.gradle.kts @@ -66,7 +66,7 @@ repositories { dependencies { implementation("org.dafny:DafnyRuntime:${dafnyVersion}") implementation("software.amazon.smithy.dafny:conversion:0.1") - implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.5.0") + implementation("software.amazon.cryptography:aws-cryptographic-material-providers:1.5.0-SNAPSHOT") implementation(platform("software.amazon.awssdk:bom:2.25.1")) implementation("software.amazon.awssdk:dynamodb") implementation("software.amazon.awssdk:dynamodb-enhanced") diff --git a/smithy-dafny b/smithy-dafny index f94b9a837..2baebfbcb 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit f94b9a83788e1b111b52bb1064b7f1e283b3e77b +Subproject commit 2baebfbcb4b62ed0949c185610316725019a6dae