From c23b765348ffe127180abbe2e176ba8accd360ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Corella?= <39066999+josecorella@users.noreply.github.com> Date: Tue, 10 Sep 2024 14:31:59 -0700 Subject: [PATCH] feat: bump dafny verification and code gen to dafny 4.8.0 (#520) Co-authored-by: Robin Salkeld --- AwsCryptographicMaterialProviders/.gitignore | 2 + .../dafny/dafny-4.3.0.patch | 12 - .../src/CMCs/LocalCMC.dfy | 2 +- .../AwsKms/AwsKmsMrkMatchForDecrypt.dfy | 2 +- .../project.properties | 4 +- .../amazon/cryptography/keystore/ToDafny.java | 60 +- .../BranchKeyIdSupplier.java | 12 +- .../materialproviders/ClientSupplier.java | 13 +- .../CryptographicMaterialsCache.java | 48 +- .../CryptographicMaterialsManager.java | 24 +- .../materialproviders/Keyring.java | 24 +- .../materialproviders/ToDafny.java | 400 +- .../TypeConversion.cs | 4 + .../AwsCryptographyKeyStore/TypeConversion.cs | 4 + .../runtimes/net/MPL.csproj | 2 +- AwsCryptographyPrimitives/.gitignore | 2 + AwsCryptographyPrimitives/Makefile | 1 + AwsCryptographyPrimitives/project.properties | 4 +- .../cryptography/primitives/ToDafny.java | 26 +- .../runtimes/net/Crypto.csproj | 2 +- .../runtimes/net/Generated/TypeConversion.cs | 4 + AwsCryptographyPrimitives/test/TestECDH.dfy | 2 +- ComAmazonawsDynamodb/.gitignore | 3 + ComAmazonawsDynamodb/Makefile | 1 + .../codegen-patches/dotnet/dafny-4.8.0.patch | 118 + .../codegen-patches/java/dafny-4.2.0.patch | 9 - ComAmazonawsDynamodb/project.properties | 4 +- .../services/dynamodb/internaldafny/Shim.java | 2100 ++++++-- .../dynamodb/internaldafny/ToDafny.java | 3558 +++++++++--- .../dynamodb/internaldafny/ToNative.java | 2 - .../runtimes/net/ComAmazonawsDynamodb.csproj | 2 +- .../runtimes/net/Generated/TypeConversion.cs | 72 +- ComAmazonawsKms/.gitignore | 2 + ComAmazonawsKms/Makefile | 1 + .../codegen-patches/dotnet/dafny-4.8.0.patch | 13 + .../codegen-patches/java/dafny-4.8.0.patch | 4757 +++++++++++++++++ .../java => }/dafny-4.2.0.patch | 9 - ComAmazonawsKms/project.properties | 4 +- .../services/kms/internaldafny/Shim.java | 3228 +++++++++-- .../services/kms/internaldafny/ToNative.java | 2 - .../src/test/java/UnwrapGenericKmsTests.java | 4 +- ComAmazonawsKms/runtimes/net/AWS-KMS.csproj | 2 +- .../runtimes/net/Generated/TypeConversion.cs | 10 +- SharedMakefileV2.mk | 10 + StandardLibrary/.gitignore | 4 +- StandardLibrary/Makefile | 1 + .../main/java/String_Compile/__default.java | 51 + StandardLibrary/runtimes/net/Dafny47-Patch.cs | 82 + StandardLibrary/runtimes/net/STD.csproj | 3 +- .../.gitignore | 2 + .../project.properties | 4 +- .../wrapped/TestMaterialProviders.java | 349 +- .../ToDafny.java | 10 +- .../Generated/KeyVectors/TypeConversion.cs | 4 + .../TypeConversion.cs | 4 + .../runtimes/net/TestVectors.csproj | 2 +- libraries | 2 +- project.properties | 4 +- smithy-dafny | 2 +- 59 files changed, 13179 insertions(+), 1910 deletions(-) delete mode 100644 AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dafny/dafny-4.3.0.patch create mode 100644 ComAmazonawsDynamodb/codegen-patches/dotnet/dafny-4.8.0.patch create mode 100644 ComAmazonawsKms/codegen-patches/dotnet/dafny-4.8.0.patch create mode 100644 ComAmazonawsKms/codegen-patches/java/dafny-4.8.0.patch rename ComAmazonawsKms/{codegen-patches/java => }/dafny-4.2.0.patch (96%) create mode 100644 StandardLibrary/runtimes/java/src/main/java/String_Compile/__default.java create mode 100644 StandardLibrary/runtimes/net/Dafny47-Patch.cs diff --git a/AwsCryptographicMaterialProviders/.gitignore b/AwsCryptographicMaterialProviders/.gitignore index 978589597..e00b777e2 100644 --- a/AwsCryptographicMaterialProviders/.gitignore +++ b/AwsCryptographicMaterialProviders/.gitignore @@ -1,6 +1,8 @@ TestResults ImplementationFromDafny.cs TestsFromDafny.cs +ImplementationFromDafny-cs.dtr +TestsFromDafny-cs.dtr **/bin **/obj diff --git a/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dafny/dafny-4.3.0.patch b/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dafny/dafny-4.3.0.patch deleted file mode 100644 index 6d1a7112e..000000000 --- a/AwsCryptographicMaterialProviders/codegen-patches/AwsCryptographicMaterialProviders/dafny/dafny-4.3.0.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy -index f2c3a219..f5511a12 100644 ---- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy -+++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy -@@ -86,6 +86,6 @@ module AwsKmsMrkMatchForDecrypt { - && m.value.service == c.value.service - && m.value.account == c.value.account - && m.value.resource == c.value.resource -- ) -+ ) - {} - } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy index 31bb0e53a..05672be8e 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy @@ -494,7 +494,7 @@ module {:options "/functionSyntax:4" } LocalCMC { assert old@CAN_ADD(cache.Select(k)) != old@CAN_ADD(cache.Select(k')); } } - + assert (forall c <- queue.Items :: c.identifier in cache.Keys() && cache.Select(c.identifier) == c); assert Invariant(); } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy index f2c3a2194..f5511a125 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkMatchForDecrypt.dfy @@ -86,6 +86,6 @@ module AwsKmsMrkMatchForDecrypt { && m.value.service == c.value.service && m.value.account == c.value.account && m.value.resource == c.value.resource - ) + ) {} } diff --git a/AwsCryptographicMaterialProviders/project.properties b/AwsCryptographicMaterialProviders/project.properties index b35126df6..02e193a7d 100644 --- a/AwsCryptographicMaterialProviders/project.properties +++ b/AwsCryptographicMaterialProviders/project.properties @@ -1,4 +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 +dafnyVersion=4.8.0 +dafnyRuntimeJavaVersion=4.8.0 diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/ToDafny.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/ToDafny.java index aff1a2ced..9a949c149 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/ToDafny.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/keystore/ToDafny.java @@ -95,11 +95,14 @@ public static BeaconKeyMaterials BeaconKeyMaterials( beaconKey = Objects.nonNull(nativeValue.beaconKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.beaconKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option< DafnyMap< ? extends DafnySequence, @@ -109,8 +112,19 @@ public static BeaconKeyMaterials BeaconKeyMaterials( hmacKeys = (Objects.nonNull(nativeValue.hmacKeys()) && nativeValue.hmacKeys().size() > 0) - ? Option.create_Some(ToDafny.HmacKeyMap(nativeValue.hmacKeys())) - : Option.create_None(); + ? Option.create_Some( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ), + ToDafny.HmacKeyMap(nativeValue.hmacKeys()) + ) + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ) + ); return new BeaconKeyMaterials( beaconKeyIdentifier, encryptionContext, @@ -158,11 +172,14 @@ public static CreateKeyInput CreateKeyInput( branchKeyIdentifier = Objects.nonNull(nativeValue.branchKeyIdentifier()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.branchKeyIdentifier() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -173,9 +190,18 @@ public static CreateKeyInput CreateKeyInput( (Objects.nonNull(nativeValue.encryptionContext()) && nativeValue.encryptionContext().size() > 0) ? Option.create_Some( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ), ToDafny.EncryptionContext(nativeValue.encryptionContext()) ) - : Option.create_None(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ) + ); return new CreateKeyInput(branchKeyIdentifier, encryptionContext); } @@ -328,37 +354,51 @@ public static KeyStoreConfig KeyStoreConfig( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option ddbClient; ddbClient = Objects.nonNull(nativeValue.ddbClient()) ? Option.create_Some( + TypeDescriptor.reference(IDynamoDBClient.class), software.amazon.cryptography.services.dynamodb.internaldafny.ToDafny.DynamoDB_20120810( nativeValue.ddbClient() ) ) - : Option.create_None(); + : Option.create_None(TypeDescriptor.reference(IDynamoDBClient.class)); Option kmsClient; kmsClient = Objects.nonNull(nativeValue.kmsClient()) ? Option.create_Some( + TypeDescriptor.reference(IKMSClient.class), software.amazon.cryptography.services.kms.internaldafny.ToDafny.TrentService( nativeValue.kmsClient() ) ) - : Option.create_None(); + : Option.create_None(TypeDescriptor.reference(IKMSClient.class)); return new KeyStoreConfig( ddbTableName, kmsConfiguration, diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/BranchKeyIdSupplier.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/BranchKeyIdSupplier.java index d8ae9479c..ca84bda69 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/BranchKeyIdSupplier.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/BranchKeyIdSupplier.java @@ -99,9 +99,17 @@ > GetBranchKeyId( this._impl.GetBranchKeyId(nativeInput); software.amazon.cryptography.materialproviders.internaldafny.types.GetBranchKeyIdOutput dafnyOutput = ToDafny.GetBranchKeyIdOutput(nativeOutput); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + software.amazon.cryptography.materialproviders.internaldafny.types.GetBranchKeyIdOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + software.amazon.cryptography.materialproviders.internaldafny.types.GetBranchKeyIdOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ClientSupplier.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ClientSupplier.java index 75a04238e..127c00189 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ClientSupplier.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ClientSupplier.java @@ -4,6 +4,7 @@ package software.amazon.cryptography.materialproviders; import Wrappers_Compile.Result; +import dafny.TypeDescriptor; import java.lang.IllegalArgumentException; import java.lang.RuntimeException; import java.util.Objects; @@ -93,9 +94,17 @@ public Result GetClient( GetClientInput nativeInput = ToNative.GetClientInput(dafnyInput); KmsClient nativeOutput = this._impl.GetClient(nativeInput); IKMSClient dafnyOutput = new Shim(nativeOutput, null); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + TypeDescriptor.reference(IKMSClient.class), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TypeDescriptor.reference(IKMSClient.class), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsCache.java index 8a2b75ff2..dd3e9462f 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsCache.java @@ -121,9 +121,17 @@ public Result DeleteCacheEntry( dafnyInput ); this._impl.DeleteCacheEntry(nativeInput); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -147,9 +155,17 @@ > GetCacheEntry( this._impl.GetCacheEntry(nativeInput); software.amazon.cryptography.materialproviders.internaldafny.types.GetCacheEntryOutput dafnyOutput = ToDafny.GetCacheEntryOutput(nativeOutput); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + software.amazon.cryptography.materialproviders.internaldafny.types.GetCacheEntryOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + software.amazon.cryptography.materialproviders.internaldafny.types.GetCacheEntryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -170,9 +186,17 @@ public Result PutCacheEntry( dafnyInput ); this._impl.PutCacheEntry(nativeInput); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -189,9 +213,17 @@ public Result UpdateUsageMetadata( UpdateUsageMetadataInput nativeInput = ToNative.UpdateUsageMetadataInput(dafnyInput); this._impl.UpdateUsageMetadata(nativeInput); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsManager.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsManager.java index d600e4fe8..48988b4f7 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsManager.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/CryptographicMaterialsManager.java @@ -113,9 +113,17 @@ > DecryptMaterials( this._impl.DecryptMaterials(nativeInput); software.amazon.cryptography.materialproviders.internaldafny.types.DecryptMaterialsOutput dafnyOutput = ToDafny.DecryptMaterialsOutput(nativeOutput); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + software.amazon.cryptography.materialproviders.internaldafny.types.DecryptMaterialsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + software.amazon.cryptography.materialproviders.internaldafny.types.DecryptMaterialsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -141,9 +149,17 @@ > GetEncryptionMaterials( this._impl.GetEncryptionMaterials(nativeInput); software.amazon.cryptography.materialproviders.internaldafny.types.GetEncryptionMaterialsOutput dafnyOutput = ToDafny.GetEncryptionMaterialsOutput(nativeOutput); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + software.amazon.cryptography.materialproviders.internaldafny.types.GetEncryptionMaterialsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + software.amazon.cryptography.materialproviders.internaldafny.types.GetEncryptionMaterialsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/Keyring.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/Keyring.java index a7e37c4a5..f55b81fe2 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/Keyring.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/Keyring.java @@ -102,9 +102,17 @@ > OnDecrypt( OnDecryptOutput nativeOutput = this._impl.OnDecrypt(nativeInput); software.amazon.cryptography.materialproviders.internaldafny.types.OnDecryptOutput dafnyOutput = ToDafny.OnDecryptOutput(nativeOutput); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + software.amazon.cryptography.materialproviders.internaldafny.types.OnDecryptOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + software.amazon.cryptography.materialproviders.internaldafny.types.OnDecryptOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -128,9 +136,17 @@ > OnEncrypt( OnEncryptOutput nativeOutput = this._impl.OnEncrypt(nativeInput); software.amazon.cryptography.materialproviders.internaldafny.types.OnEncryptOutput dafnyOutput = ToDafny.OnEncryptOutput(nativeOutput); - return Result.create_Success(dafnyOutput); + return Result.create_Success( + software.amazon.cryptography.materialproviders.internaldafny.types.OnEncryptOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyOutput + ); } catch (RuntimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + software.amazon.cryptography.materialproviders.internaldafny.types.OnEncryptOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ToDafny.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ToDafny.java index 245b3667c..ed78a1e59 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ToDafny.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/ToDafny.java @@ -244,17 +244,27 @@ public static CreateAwsKmsDiscoveryKeyringInput CreateAwsKmsDiscoveryKeyringInpu discoveryFilter = Objects.nonNull(nativeValue.discoveryFilter()) ? Option.create_Some( + DiscoveryFilter._typeDescriptor(), ToDafny.DiscoveryFilter(nativeValue.discoveryFilter()) ) - : Option.create_None(); + : Option.create_None(DiscoveryFilter._typeDescriptor()); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsDiscoveryKeyringInput( kmsClient, discoveryFilter, @@ -271,26 +281,43 @@ public static CreateAwsKmsDiscoveryMultiKeyringInput CreateAwsKmsDiscoveryMultiK discoveryFilter = Objects.nonNull(nativeValue.discoveryFilter()) ? Option.create_Some( + DiscoveryFilter._typeDescriptor(), ToDafny.DiscoveryFilter(nativeValue.discoveryFilter()) ) - : Option.create_None(); + : Option.create_None(DiscoveryFilter._typeDescriptor()); Option< software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier > clientSupplier; clientSupplier = Objects.nonNull(nativeValue.clientSupplier()) ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ), ToDafny.ClientSupplier(nativeValue.clientSupplier()) ) - : Option.create_None(); + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ) + ); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsDiscoveryMultiKeyringInput( regions, discoveryFilter, @@ -321,8 +348,17 @@ public static CreateAwsKmsEcdhKeyringInput CreateAwsKmsEcdhKeyringInput( grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsEcdhKeyringInput( keyAgreementScheme, curveSpec, @@ -338,20 +374,30 @@ public static CreateAwsKmsHierarchicalKeyringInput CreateAwsKmsHierarchicalKeyri branchKeyId = Objects.nonNull(nativeValue.branchKeyId()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.branchKeyId() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< software.amazon.cryptography.materialproviders.internaldafny.types.IBranchKeyIdSupplier > branchKeyIdSupplier; branchKeyIdSupplier = Objects.nonNull(nativeValue.branchKeyIdSupplier()) ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IBranchKeyIdSupplier.class + ), ToDafny.BranchKeyIdSupplier(nativeValue.branchKeyIdSupplier()) ) - : Option.create_None(); + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IBranchKeyIdSupplier.class + ) + ); IKeyStoreClient keyStore; keyStore = software.amazon.cryptography.keystore.ToDafny.KeyStore( @@ -362,8 +408,11 @@ public static CreateAwsKmsHierarchicalKeyringInput CreateAwsKmsHierarchicalKeyri Option cache; cache = Objects.nonNull(nativeValue.cache()) - ? Option.create_Some(ToDafny.CacheType(nativeValue.cache())) - : Option.create_None(); + ? Option.create_Some( + CacheType._typeDescriptor(), + ToDafny.CacheType(nativeValue.cache()) + ) + : Option.create_None(CacheType._typeDescriptor()); return new CreateAwsKmsHierarchicalKeyringInput( branchKeyId, branchKeyIdSupplier, @@ -392,8 +441,17 @@ public static CreateAwsKmsKeyringInput CreateAwsKmsKeyringInput( grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsKeyringInput(kmsKeyId, kmsClient, grantTokens); } @@ -409,17 +467,27 @@ public static CreateAwsKmsMrkDiscoveryKeyringInput CreateAwsKmsMrkDiscoveryKeyri discoveryFilter = Objects.nonNull(nativeValue.discoveryFilter()) ? Option.create_Some( + DiscoveryFilter._typeDescriptor(), ToDafny.DiscoveryFilter(nativeValue.discoveryFilter()) ) - : Option.create_None(); + : Option.create_None(DiscoveryFilter._typeDescriptor()); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); DafnySequence region; region = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( @@ -442,26 +510,43 @@ public static CreateAwsKmsMrkDiscoveryMultiKeyringInput CreateAwsKmsMrkDiscovery discoveryFilter = Objects.nonNull(nativeValue.discoveryFilter()) ? Option.create_Some( + DiscoveryFilter._typeDescriptor(), ToDafny.DiscoveryFilter(nativeValue.discoveryFilter()) ) - : Option.create_None(); + : Option.create_None(DiscoveryFilter._typeDescriptor()); Option< software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier > clientSupplier; clientSupplier = Objects.nonNull(nativeValue.clientSupplier()) ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ), ToDafny.ClientSupplier(nativeValue.clientSupplier()) ) - : Option.create_None(); + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ) + ); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsMrkDiscoveryMultiKeyringInput( regions, discoveryFilter, @@ -489,8 +574,17 @@ public static CreateAwsKmsMrkKeyringInput CreateAwsKmsMrkKeyringInput( grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsMrkKeyringInput(kmsKeyId, kmsClient, grantTokens); } @@ -501,36 +595,64 @@ public static CreateAwsKmsMrkMultiKeyringInput CreateAwsKmsMrkMultiKeyringInput( generator = Objects.nonNull(nativeValue.generator()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.generator() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence> > kmsKeyIds; kmsKeyIds = (Objects.nonNull(nativeValue.kmsKeyIds()) && nativeValue.kmsKeyIds().size() > 0) - ? Option.create_Some(ToDafny.KmsKeyIdList(nativeValue.kmsKeyIds())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.KmsKeyIdList(nativeValue.kmsKeyIds()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier > clientSupplier; clientSupplier = Objects.nonNull(nativeValue.clientSupplier()) ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ), ToDafny.ClientSupplier(nativeValue.clientSupplier()) ) - : Option.create_None(); + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ) + ); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsMrkMultiKeyringInput( generator, kmsKeyIds, @@ -546,36 +668,64 @@ public static CreateAwsKmsMultiKeyringInput CreateAwsKmsMultiKeyringInput( generator = Objects.nonNull(nativeValue.generator()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( nativeValue.generator() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence> > kmsKeyIds; kmsKeyIds = (Objects.nonNull(nativeValue.kmsKeyIds()) && nativeValue.kmsKeyIds().size() > 0) - ? Option.create_Some(ToDafny.KmsKeyIdList(nativeValue.kmsKeyIds())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.KmsKeyIdList(nativeValue.kmsKeyIds()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier > clientSupplier; clientSupplier = Objects.nonNull(nativeValue.clientSupplier()) ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ), ToDafny.ClientSupplier(nativeValue.clientSupplier()) ) - : Option.create_None(); + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier.class + ) + ); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsMultiKeyringInput( generator, kmsKeyIds, @@ -591,11 +741,14 @@ public static CreateAwsKmsRsaKeyringInput CreateAwsKmsRsaKeyringInput( publicKey = Objects.nonNull(nativeValue.publicKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.publicKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); DafnySequence kmsKeyId; kmsKeyId = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( @@ -610,19 +763,29 @@ public static CreateAwsKmsRsaKeyringInput CreateAwsKmsRsaKeyringInput( kmsClient = Objects.nonNull(nativeValue.kmsClient()) ? Option.create_Some( + TypeDescriptor.reference(IKMSClient.class), software.amazon.cryptography.services.kms.internaldafny.ToDafny.TrentService( nativeValue.kmsClient() ) ) - : Option.create_None(); + : Option.create_None(TypeDescriptor.reference(IKMSClient.class)); Option< DafnySequence> > grantTokens; grantTokens = (Objects.nonNull(nativeValue.grantTokens()) && nativeValue.grantTokens().size() > 0) - ? Option.create_Some(ToDafny.GrantTokenList(nativeValue.grantTokens())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.GrantTokenList(nativeValue.grantTokens()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CreateAwsKmsRsaKeyringInput( publicKey, kmsKeyId, @@ -662,8 +825,17 @@ public static CreateMultiKeyringInput CreateMultiKeyringInput( > generator; generator = Objects.nonNull(nativeValue.generator()) - ? Option.create_Some(ToDafny.Keyring(nativeValue.generator())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring.class + ), + ToDafny.Keyring(nativeValue.generator()) + ) + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring.class + ) + ); DafnySequence< ? extends software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring > childKeyrings; @@ -732,20 +904,26 @@ public static CreateRawRsaKeyringInput CreateRawRsaKeyringInput( publicKey = Objects.nonNull(nativeValue.publicKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.publicKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option> privateKey; privateKey = Objects.nonNull(nativeValue.privateKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.privateKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); return new CreateRawRsaKeyringInput( keyNamespace, keyName, @@ -764,16 +942,32 @@ public static CreateRequiredEncryptionContextCMMInput CreateRequiredEncryptionCo underlyingCMM = Objects.nonNull(nativeValue.underlyingCMM()) ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager.class + ), ToDafny.CryptographicMaterialsManager(nativeValue.underlyingCMM()) ) - : Option.create_None(); + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager.class + ) + ); Option< software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring > keyring; keyring = Objects.nonNull(nativeValue.keyring()) - ? Option.create_Some(ToDafny.Keyring(nativeValue.keyring())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring.class + ), + ToDafny.Keyring(nativeValue.keyring()) + ) + : Option.create_None( + TypeDescriptor.reference( + software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring.class + ) + ); DafnySequence< ? extends DafnySequence > requiredEncryptionContextKeys; @@ -810,29 +1004,38 @@ public static DecryptionMaterials DecryptionMaterials( plaintextDataKey = Objects.nonNull(nativeValue.plaintextDataKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.plaintextDataKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option> verificationKey; verificationKey = Objects.nonNull(nativeValue.verificationKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.verificationKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option> symmetricSigningKey; symmetricSigningKey = Objects.nonNull(nativeValue.symmetricSigningKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.symmetricSigningKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); return new DecryptionMaterials( algorithmSuite, encryptionContext, @@ -869,9 +1072,18 @@ public static DecryptMaterialsInput DecryptMaterialsInput( (Objects.nonNull(nativeValue.reproducedEncryptionContext()) && nativeValue.reproducedEncryptionContext().size() > 0) ? Option.create_Some( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ), ToDafny.EncryptionContext(nativeValue.reproducedEncryptionContext()) ) - : Option.create_None(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ) + ); return new DecryptMaterialsInput( algorithmSuiteId, commitmentPolicy, @@ -985,20 +1197,26 @@ public static EncryptionMaterials EncryptionMaterials( plaintextDataKey = Objects.nonNull(nativeValue.plaintextDataKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.plaintextDataKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option> signingKey; signingKey = Objects.nonNull(nativeValue.signingKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.signingKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option< DafnySequence> > symmetricSigningKeys; @@ -1006,9 +1224,16 @@ public static EncryptionMaterials EncryptionMaterials( (Objects.nonNull(nativeValue.symmetricSigningKeys()) && nativeValue.symmetricSigningKeys().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ), ToDafny.SymmetricSigningKeyList(nativeValue.symmetricSigningKeys()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ) + ); return new EncryptionMaterials( algorithmSuite, encryptionContext, @@ -1076,8 +1301,8 @@ public static GetCacheEntryInput GetCacheEntryInput( Option bytesUsed; bytesUsed = Objects.nonNull(nativeValue.bytesUsed()) - ? Option.create_Some((nativeValue.bytesUsed())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.bytesUsed())) + : Option.create_None(TypeDescriptor.LONG); return new GetCacheEntryInput(identifier, bytesUsed); } @@ -1129,14 +1354,18 @@ public static GetEncryptionMaterialsInput GetEncryptionMaterialsInput( algorithmSuiteId = Objects.nonNull(nativeValue.algorithmSuiteId()) ? Option.create_Some( + AlgorithmSuiteId._typeDescriptor(), ToDafny.AlgorithmSuiteId(nativeValue.algorithmSuiteId()) ) - : Option.create_None(); + : Option.create_None(AlgorithmSuiteId._typeDescriptor()); Option maxPlaintextLength; maxPlaintextLength = Objects.nonNull(nativeValue.maxPlaintextLength()) - ? Option.create_Some((nativeValue.maxPlaintextLength())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.maxPlaintextLength()) + ) + : Option.create_None(TypeDescriptor.LONG); Option< DafnySequence> > requiredEncryptionContextKeys; @@ -1144,11 +1373,18 @@ public static GetEncryptionMaterialsInput GetEncryptionMaterialsInput( (Objects.nonNull(nativeValue.requiredEncryptionContextKeys()) && nativeValue.requiredEncryptionContextKeys().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ), ToDafny.EncryptionContextKeys( nativeValue.requiredEncryptionContextKeys() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ) + ); return new GetEncryptionMaterialsInput( encryptionContext, commitmentPolicy, @@ -1237,20 +1473,26 @@ public static InitializeEncryptionMaterialsInput InitializeEncryptionMaterialsIn signingKey = Objects.nonNull(nativeValue.signingKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.signingKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option> verificationKey; verificationKey = Objects.nonNull(nativeValue.verificationKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.verificationKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); return new InitializeEncryptionMaterialsInput( algorithmSuiteId, encryptionContext, @@ -1289,11 +1531,14 @@ public static KmsPrivateKeyToStaticPublicKeyInput KmsPrivateKeyToStaticPublicKey senderPublicKey = Objects.nonNull(nativeValue.senderPublicKey()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.senderPublicKey() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); DafnySequence recipientPublicKey; recipientPublicKey = software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( @@ -1331,8 +1576,11 @@ public static MultiThreadedCache MultiThreadedCache( Option entryPruningTailSize; entryPruningTailSize = Objects.nonNull(nativeValue.entryPruningTailSize()) - ? Option.create_Some((nativeValue.entryPruningTailSize())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.entryPruningTailSize()) + ) + : Option.create_None(TypeDescriptor.INT); return new MultiThreadedCache(entryCapacity, entryPruningTailSize); } @@ -1411,13 +1659,13 @@ public static PutCacheEntryInput PutCacheEntryInput( Option messagesUsed; messagesUsed = Objects.nonNull(nativeValue.messagesUsed()) - ? Option.create_Some((nativeValue.messagesUsed())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.messagesUsed())) + : Option.create_None(TypeDescriptor.INT); Option bytesUsed; bytesUsed = Objects.nonNull(nativeValue.bytesUsed()) - ? Option.create_Some((nativeValue.bytesUsed())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.bytesUsed())) + : Option.create_None(TypeDescriptor.INT); return new PutCacheEntryInput( identifier, materials, @@ -1455,8 +1703,11 @@ public static SingleThreadedCache SingleThreadedCache( Option entryPruningTailSize; entryPruningTailSize = Objects.nonNull(nativeValue.entryPruningTailSize()) - ? Option.create_Some((nativeValue.entryPruningTailSize())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.entryPruningTailSize()) + ) + : Option.create_None(TypeDescriptor.INT); return new SingleThreadedCache(entryCapacity, entryPruningTailSize); } @@ -1468,8 +1719,11 @@ public static StormTrackingCache StormTrackingCache( Option entryPruningTailSize; entryPruningTailSize = Objects.nonNull(nativeValue.entryPruningTailSize()) - ? Option.create_Some((nativeValue.entryPruningTailSize())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.entryPruningTailSize()) + ) + : Option.create_None(TypeDescriptor.INT); Integer gracePeriod; gracePeriod = (nativeValue.gracePeriod()); Integer graceInterval; diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs index 7b6ad3a7d..3f953819b 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs @@ -7,6 +7,10 @@ namespace AWS.Cryptography.MaterialProviders { public static class TypeConversion { + private const string ISO8601DateFormat = "yyyy-MM-dd\\THH:mm:ss.fff\\Z"; + + private const string ISO8601DateFormatNoMS = "yyyy-MM-dd\\THH:mm:ss\\Z"; + public static AWS.Cryptography.MaterialProviders.AesWrappingAlg FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_AesWrappingAlg(software.amazon.cryptography.materialproviders.internaldafny.types._IAesWrappingAlg value) { if (value.is_ALG__AES128__GCM__IV12__TAG16) return AWS.Cryptography.MaterialProviders.AesWrappingAlg.ALG_AES128_GCM_IV12_TAG16; diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs index bcd537fb1..832e525e5 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs @@ -7,6 +7,10 @@ namespace AWS.Cryptography.KeyStore { public static class TypeConversion { + private const string ISO8601DateFormat = "yyyy-MM-dd\\THH:mm:ss.fff\\Z"; + + private const string ISO8601DateFormatNoMS = "yyyy-MM-dd\\THH:mm:ss\\Z"; + public static AWS.Cryptography.KeyStore.CreateKeyInput FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_CreateKeyInput(software.amazon.cryptography.keystore.internaldafny.types._ICreateKeyInput value) { software.amazon.cryptography.keystore.internaldafny.types.CreateKeyInput concrete = (software.amazon.cryptography.keystore.internaldafny.types.CreateKeyInput)value; AWS.Cryptography.KeyStore.CreateKeyInput converted = new AWS.Cryptography.KeyStore.CreateKeyInput(); if (concrete._branchKeyIdentifier.is_Some) converted.BranchKeyIdentifier = (string)FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_CreateKeyInput__M19_branchKeyIdentifier(concrete._branchKeyIdentifier); diff --git a/AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj b/AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj index 2ea6f3206..6f22f9d51 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj +++ b/AwsCryptographicMaterialProviders/runtimes/net/MPL.csproj @@ -56,7 +56,7 @@ - + diff --git a/AwsCryptographyPrimitives/.gitignore b/AwsCryptographyPrimitives/.gitignore index 3dae39a02..451658ffc 100644 --- a/AwsCryptographyPrimitives/.gitignore +++ b/AwsCryptographyPrimitives/.gitignore @@ -1,6 +1,8 @@ TestResults ImplementationFromDafny.cs TestsFromDafny.cs +ImplementationFromDafny-cs.dtr +TestsFromDafny-cs.dtr **/bin **/obj diff --git a/AwsCryptographyPrimitives/Makefile b/AwsCryptographyPrimitives/Makefile index 1f6847bbd..9bc61019a 100644 --- a/AwsCryptographyPrimitives/Makefile +++ b/AwsCryptographyPrimitives/Makefile @@ -13,3 +13,4 @@ MAX_RESOURCE_COUNT=10000000 STD_LIBRARY=StandardLibrary SMITHY_DEPS=model + diff --git a/AwsCryptographyPrimitives/project.properties b/AwsCryptographyPrimitives/project.properties index b35126df6..02e193a7d 100644 --- a/AwsCryptographyPrimitives/project.properties +++ b/AwsCryptographyPrimitives/project.properties @@ -1,4 +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 +dafnyVersion=4.8.0 +dafnyRuntimeJavaVersion=4.8.0 diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/ToDafny.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/ToDafny.java index d9b59deb9..3ba9bace3 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/ToDafny.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/ToDafny.java @@ -5,6 +5,7 @@ import Wrappers_Compile.Option; import dafny.DafnySequence; +import dafny.TypeDescriptor; import java.lang.Boolean; import java.lang.Byte; import java.lang.Character; @@ -220,11 +221,14 @@ public static AesKdfCtrInput AesKdfCtrInput( nonce = Objects.nonNull(nativeValue.nonce()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.nonce() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); return new AesKdfCtrInput(ikm, expectedLength, nonce); } @@ -598,11 +602,14 @@ public static HkdfExtractInput HkdfExtractInput( salt = Objects.nonNull(nativeValue.salt()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.salt() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); DafnySequence ikm; ikm = software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( @@ -631,11 +638,14 @@ public static HkdfInput HkdfInput( salt = Objects.nonNull(nativeValue.salt()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.salt() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); DafnySequence ikm; ikm = software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( @@ -707,20 +717,26 @@ public static KdfCtrInput KdfCtrInput( purpose = Objects.nonNull(nativeValue.purpose()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.purpose() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); Option> nonce; nonce = Objects.nonNull(nativeValue.nonce()) ? Option.create_Some( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE), software.amazon.smithy.dafny.conversion.ToDafny.Simple.ByteSequence( nativeValue.nonce() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.BYTE) + ); return new KdfCtrInput( digestAlgorithm, ikm, diff --git a/AwsCryptographyPrimitives/runtimes/net/Crypto.csproj b/AwsCryptographyPrimitives/runtimes/net/Crypto.csproj index 5bad6e87e..9faf18457 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Crypto.csproj +++ b/AwsCryptographyPrimitives/runtimes/net/Crypto.csproj @@ -58,7 +58,7 @@ - + diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs index 9cbd7a436..93391f904 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs @@ -7,6 +7,10 @@ namespace AWS.Cryptography.Primitives { public static class TypeConversion { + private const string ISO8601DateFormat = "yyyy-MM-dd\\THH:mm:ss.fff\\Z"; + + private const string ISO8601DateFormatNoMS = "yyyy-MM-dd\\THH:mm:ss\\Z"; + public static AWS.Cryptography.Primitives.AESDecryptInput FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput(software.amazon.cryptography.primitives.internaldafny.types._IAESDecryptInput value) { software.amazon.cryptography.primitives.internaldafny.types.AESDecryptInput concrete = (software.amazon.cryptography.primitives.internaldafny.types.AESDecryptInput)value; AWS.Cryptography.Primitives.AESDecryptInput converted = new AWS.Cryptography.Primitives.AESDecryptInput(); converted.EncAlg = (AWS.Cryptography.Primitives.AES_GCM)FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M6_encAlg(concrete._encAlg); diff --git a/AwsCryptographyPrimitives/test/TestECDH.dfy b/AwsCryptographyPrimitives/test/TestECDH.dfy index 1f13b4549..fd244a9d2 100644 --- a/AwsCryptographyPrimitives/test/TestECDH.dfy +++ b/AwsCryptographyPrimitives/test/TestECDH.dfy @@ -458,7 +458,7 @@ module TestECDH { } } - method {:test} TestCompressDecompressConstantPublicKeys() { + method {:test} {:vcs_split_on_every_assert} TestCompressDecompressConstantPublicKeys() { var derX509PublicKeys := [ECC_P256_PUBLIC, ECC_384_PUBLIC, ECC_P521_PUBLIC]; var compressedKeys := [ECC_P256_PUBLIC_COMPRESSED, ECC_384_PUBLIC_COMPRESSED, ECC_P521_PUBLIC_COMPRESSED]; var curves := [P256, P384, P521]; diff --git a/ComAmazonawsDynamodb/.gitignore b/ComAmazonawsDynamodb/.gitignore index 4c7055415..9e4ed6799 100644 --- a/ComAmazonawsDynamodb/.gitignore +++ b/ComAmazonawsDynamodb/.gitignore @@ -2,6 +2,9 @@ TestResults ImplementationFromDafny.cs TestsFromDafny.cs Folder.DotSettings.user +ImplementationFromDafny-cs.dtr +TestsFromDafny-cs.dtr + **/bin **/obj diff --git a/ComAmazonawsDynamodb/Makefile b/ComAmazonawsDynamodb/Makefile index b044c3b3f..d1aa246f2 100644 --- a/ComAmazonawsDynamodb/Makefile +++ b/ComAmazonawsDynamodb/Makefile @@ -13,3 +13,4 @@ MAX_RESOURCE_COUNT=10000000 AWS_SDK_CMD := --aws-sdk STD_LIBRARY=StandardLibrary SMITHY_DEPS=model + diff --git a/ComAmazonawsDynamodb/codegen-patches/dotnet/dafny-4.8.0.patch b/ComAmazonawsDynamodb/codegen-patches/dotnet/dafny-4.8.0.patch new file mode 100644 index 000000000..d5bd4a55f --- /dev/null +++ b/ComAmazonawsDynamodb/codegen-patches/dotnet/dafny-4.8.0.patch @@ -0,0 +1,118 @@ +diff --git a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs +index e35ad3d2..9f375b21 100644 +--- a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs ++++ b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs +@@ -5848,7 +5848,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_LastUpdateDateTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_LastUpdateDateTime(System.DateTime value) +@@ -6126,7 +6126,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ExportTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ExportTime(System.DateTime value) +@@ -6252,7 +6252,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeLowerBound(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeLowerBound(System.DateTime value) +@@ -6264,7 +6264,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeUpperBound(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeUpperBound(System.DateTime value) +@@ -6450,7 +6450,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date(System.DateTime value) +@@ -8187,7 +8187,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime(System.DateTime value) +@@ -8595,7 +8595,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportStartTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportStartTime(System.DateTime value) +@@ -8607,7 +8607,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportEndTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportEndTime(System.DateTime value) +@@ -8700,7 +8700,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ImportStartTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ImportStartTime(System.DateTime value) +@@ -8712,7 +8712,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportEndTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportEndTime(System.DateTime value) +@@ -10522,7 +10522,7 @@ namespace Com.Amazonaws.Dynamodb + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime(System.DateTime value) +@@ -10980,7 +10980,13 @@ namespace Com.Amazonaws.Dynamodb + } + public static Wrappers_Compile._IOption>> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection__M16_NonKeyAttributes(System.Collections.Generic.List value) + { +- return value == null ? Wrappers_Compile.Option>>.create_None() : Wrappers_Compile.Option>>.create_Some(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttributeNameList((System.Collections.Generic.List)value)); ++ // BEGIN MANUAL EDIT ++ if (value == null || value.Count == 0) ++ { ++ return Wrappers_Compile.Option>>.create_None(); ++ } ++ return Wrappers_Compile.Option>>.create_Some(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttributeNameList((System.Collections.Generic.List)value)); ++ // END MANUAL EDIT + } + public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_IndexName(Wrappers_Compile._IOption> value) + { diff --git a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch index 99079e516..c601737ae 100644 --- a/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch +++ b/ComAmazonawsDynamodb/codegen-patches/java/dafny-4.2.0.patch @@ -129,12 +129,3 @@ index c30e7cdf..3964b7cb 100644 public static DynamoDbClient DynamoDB_20120810(IDynamoDBClient dafnyValue) { return ((Shim) dafnyValue).impl(); } -@@ -8055,6 +8175,8 @@ public class ToNative { - } 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", diff --git a/ComAmazonawsDynamodb/project.properties b/ComAmazonawsDynamodb/project.properties index b35126df6..02e193a7d 100644 --- a/ComAmazonawsDynamodb/project.properties +++ b/ComAmazonawsDynamodb/project.properties @@ -1,4 +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 +dafnyVersion=4.8.0 +dafnyRuntimeJavaVersion=4.8.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 69b00db9f..635c8cfa0 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 @@ -280,15 +280,35 @@ public Result BatchExecuteStatement( ); BatchExecuteStatementOutput dafnyResponse = ToDafny.BatchExecuteStatementOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + BatchExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -300,19 +320,47 @@ public Result BatchGetItem( try { BatchGetItemResponse result = _impl.batchGetItem(converted); BatchGetItemOutput dafnyResponse = ToDafny.BatchGetItemOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchGetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -324,21 +372,53 @@ public Result BatchWriteItem( try { BatchWriteItemResponse result = _impl.batchWriteItem(converted); BatchWriteItemOutput dafnyResponse = ToDafny.BatchWriteItemOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ItemCollectionSizeLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + BatchWriteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -350,23 +430,59 @@ public Result CreateBackup( try { CreateBackupResponse result = _impl.createBackup(converted); CreateBackupOutput dafnyResponse = ToDafny.CreateBackupOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (BackupInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ContinuousBackupsUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -380,19 +496,47 @@ public Result CreateGlobalTable( CreateGlobalTableOutput dafnyResponse = ToDafny.CreateGlobalTableOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (GlobalTableAlreadyExistsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -402,17 +546,41 @@ public Result CreateTable(CreateTableInput input) { try { CreateTableResponse result = _impl.createTable(converted); CreateTableOutput dafnyResponse = ToDafny.CreateTableOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CreateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -424,19 +592,47 @@ public Result DeleteBackup( try { DeleteBackupResponse result = _impl.deleteBackup(converted); DeleteBackupOutput dafnyResponse = ToDafny.DeleteBackupOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (BackupInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (BackupNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -446,25 +642,65 @@ public Result DeleteItem(DeleteItemInput input) { try { DeleteItemResponse result = _impl.deleteItem(converted); DeleteItemOutput dafnyResponse = ToDafny.DeleteItemOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ConditionalCheckFailedException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ItemCollectionSizeLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -474,19 +710,47 @@ public Result DeleteTable(DeleteTableInput input) { try { DeleteTableResponse result = _impl.deleteTable(converted); DeleteTableOutput dafnyResponse = ToDafny.DeleteTableOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -498,15 +762,35 @@ public Result DescribeBackup( try { DescribeBackupResponse result = _impl.describeBackup(converted); DescribeBackupOutput dafnyResponse = ToDafny.DescribeBackupOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (BackupNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -522,15 +806,35 @@ > DescribeContinuousBackups(DescribeContinuousBackupsInput input) { _impl.describeContinuousBackups(converted); DescribeContinuousBackupsOutput dafnyResponse = ToDafny.DescribeContinuousBackupsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -546,15 +850,35 @@ > DescribeContributorInsights(DescribeContributorInsightsInput input) { _impl.describeContributorInsights(converted); DescribeContributorInsightsOutput dafnyResponse = ToDafny.DescribeContributorInsightsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -569,11 +893,23 @@ public Result DescribeEndpoints( _impl.describeEndpoints(converted); DescribeEndpointsResponse dafnyResponse = ToDafny.DescribeEndpointsResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeEndpointsResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeEndpointsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeEndpointsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -585,17 +921,41 @@ public Result DescribeExport( try { DescribeExportResponse result = _impl.describeExport(converted); DescribeExportOutput dafnyResponse = ToDafny.DescribeExportOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeExportOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ExportNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeExportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeExportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeExportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeExportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeExportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -610,15 +970,35 @@ public Result DescribeGlobalTable( DescribeGlobalTableResponse result = _impl.describeGlobalTable(converted); DescribeGlobalTableOutput dafnyResponse = ToDafny.DescribeGlobalTableOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (GlobalTableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -634,15 +1014,35 @@ > DescribeGlobalTableSettings(DescribeGlobalTableSettingsInput input) { _impl.describeGlobalTableSettings(converted); DescribeGlobalTableSettingsOutput dafnyResponse = ToDafny.DescribeGlobalTableSettingsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (GlobalTableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -654,13 +1054,29 @@ public Result DescribeImport( try { DescribeImportResponse result = _impl.describeImport(converted); DescribeImportOutput dafnyResponse = ToDafny.DescribeImportOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeImportOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ImportNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeImportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeImportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeImportOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -678,15 +1094,35 @@ > DescribeKinesisStreamingDestination( _impl.describeKinesisStreamingDestination(converted); DescribeKinesisStreamingDestinationOutput dafnyResponse = ToDafny.DescribeKinesisStreamingDestinationOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -698,13 +1134,29 @@ public Result DescribeLimits( try { DescribeLimitsResponse result = _impl.describeLimits(converted); DescribeLimitsOutput dafnyResponse = ToDafny.DescribeLimitsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeLimitsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeLimitsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeLimitsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeLimitsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -716,15 +1168,35 @@ public Result DescribeTable( try { DescribeTableResponse result = _impl.describeTable(converted); DescribeTableOutput dafnyResponse = ToDafny.DescribeTableOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -742,15 +1214,35 @@ > DescribeTableReplicaAutoScaling( _impl.describeTableReplicaAutoScaling(converted); DescribeTableReplicaAutoScalingOutput dafnyResponse = ToDafny.DescribeTableReplicaAutoScalingOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -766,15 +1258,35 @@ public Result DescribeTimeToLive( DescribeTimeToLiveOutput dafnyResponse = ToDafny.DescribeTimeToLiveOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -792,19 +1304,47 @@ > DisableKinesisStreamingDestination( _impl.disableKinesisStreamingDestination(converted); DisableKinesisStreamingDestinationOutput dafnyResponse = ToDafny.DisableKinesisStreamingDestinationOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -822,19 +1362,47 @@ > EnableKinesisStreamingDestination( _impl.enableKinesisStreamingDestination(converted); EnableKinesisStreamingDestinationOutput dafnyResponse = ToDafny.EnableKinesisStreamingDestinationOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EnableKinesisStreamingDestinationOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -848,27 +1416,71 @@ public Result ExecuteStatement( ExecuteStatementOutput dafnyResponse = ToDafny.ExecuteStatementOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ConditionalCheckFailedException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DuplicateItemException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ItemCollectionSizeLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteStatementOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -884,25 +1496,65 @@ public Result ExecuteTransaction( ExecuteTransactionOutput dafnyResponse = ToDafny.ExecuteTransactionOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (IdempotentParameterMismatchException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionCanceledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionInProgressException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExecuteTransactionOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -918,23 +1570,59 @@ public Result ExportTableToPointInTime( ); ExportTableToPointInTimeOutput dafnyResponse = ToDafny.ExportTableToPointInTimeOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ExportConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidExportTimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (PointInTimeRecoveryUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ExportTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -944,19 +1632,47 @@ public Result GetItem(GetItemInput input) { try { GetItemResponse result = _impl.getItem(converted); GetItemOutput dafnyResponse = ToDafny.GetItemOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -966,17 +1682,41 @@ public Result ImportTable(ImportTableInput input) { try { ImportTableResponse result = _impl.importTable(converted); ImportTableOutput dafnyResponse = ToDafny.ImportTableOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ImportTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ImportConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -986,13 +1726,29 @@ public Result ListBackups(ListBackupsInput input) { try { ListBackupsResponse result = _impl.listBackups(converted); ListBackupsOutput dafnyResponse = ToDafny.ListBackupsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1008,15 +1764,35 @@ public Result ListContributorInsights( ); ListContributorInsightsOutput dafnyResponse = ToDafny.ListContributorInsightsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1026,15 +1802,35 @@ public Result ListExports(ListExportsInput input) { try { ListExportsResponse result = _impl.listExports(converted); ListExportsOutput dafnyResponse = ToDafny.ListExportsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListExportsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListExportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListExportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListExportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListExportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1048,13 +1844,29 @@ public Result ListGlobalTables( ListGlobalTablesOutput dafnyResponse = ToDafny.ListGlobalTablesOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListGlobalTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGlobalTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGlobalTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGlobalTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1064,13 +1876,29 @@ public Result ListImports(ListImportsInput input) { try { ListImportsResponse result = _impl.listImports(converted); ListImportsOutput dafnyResponse = ToDafny.ListImportsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListImportsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListImportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListImportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListImportsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1080,13 +1908,29 @@ public Result ListTables(ListTablesInput input) { try { ListTablesResponse result = _impl.listTables(converted); ListTablesOutput dafnyResponse = ToDafny.ListTablesOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTablesOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1102,15 +1946,35 @@ public Result ListTagsOfResource( ListTagsOfResourceOutput dafnyResponse = ToDafny.ListTagsOfResourceOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListTagsOfResourceOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTagsOfResourceOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTagsOfResourceOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTagsOfResourceOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListTagsOfResourceOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1120,25 +1984,65 @@ public Result PutItem(PutItemInput input) { try { PutItemResponse result = _impl.putItem(converted); PutItemOutput dafnyResponse = ToDafny.PutItemOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ConditionalCheckFailedException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ItemCollectionSizeLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + PutItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1148,19 +2052,47 @@ public Result Query(QueryInput input) { try { QueryResponse result = _impl.query(converted); QueryOutput dafnyResponse = ToDafny.QueryOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + QueryOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1176,23 +2108,59 @@ public Result RestoreTableFromBackup( ); RestoreTableFromBackupOutput dafnyResponse = ToDafny.RestoreTableFromBackupOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (BackupInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (BackupNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableAlreadyExistsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableFromBackupOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1208,25 +2176,65 @@ > RestoreTableToPointInTime(RestoreTableToPointInTimeInput input) { _impl.restoreTableToPointInTime(converted); RestoreTableToPointInTimeOutput dafnyResponse = ToDafny.RestoreTableToPointInTimeOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidRestoreTimeException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (PointInTimeRecoveryUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableAlreadyExistsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RestoreTableToPointInTimeOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1236,19 +2244,47 @@ public Result Scan(ScanInput input) { try { ScanResponse result = _impl.scan(converted); ScanOutput dafnyResponse = ToDafny.ScanOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScanOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1257,19 +2293,47 @@ public Result TagResource(TagResourceInput input) { TagResourceRequest converted = ToNative.TagResourceInput(input); try { _impl.tagResource(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1283,21 +2347,53 @@ public Result TransactGetItems( TransactGetItemsOutput dafnyResponse = ToDafny.TransactGetItemsOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionCanceledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactGetItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1313,25 +2409,65 @@ public Result TransactWriteItems( TransactWriteItemsOutput dafnyResponse = ToDafny.TransactWriteItemsOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (IdempotentParameterMismatchException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionCanceledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionInProgressException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + TransactWriteItemsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1340,19 +2476,47 @@ public Result UntagResource(UntagResourceInput input) { UntagResourceRequest converted = ToNative.UntagResourceInput(input); try { _impl.untagResource(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1368,17 +2532,41 @@ public Result UpdateContinuousBackups( ); UpdateContinuousBackupsOutput dafnyResponse = ToDafny.UpdateContinuousBackupsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ContinuousBackupsUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContinuousBackupsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1394,15 +2582,35 @@ > UpdateContributorInsights(UpdateContributorInsightsInput input) { _impl.updateContributorInsights(converted); UpdateContributorInsightsOutput dafnyResponse = ToDafny.UpdateContributorInsightsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateContributorInsightsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1416,21 +2624,53 @@ public Result UpdateGlobalTable( UpdateGlobalTableOutput dafnyResponse = ToDafny.UpdateGlobalTableOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (GlobalTableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ReplicaAlreadyExistsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ReplicaNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1446,23 +2686,59 @@ > UpdateGlobalTableSettings(UpdateGlobalTableSettingsInput input) { _impl.updateGlobalTableSettings(converted); UpdateGlobalTableSettingsOutput dafnyResponse = ToDafny.UpdateGlobalTableSettingsOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (GlobalTableNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (IndexNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ReplicaNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateGlobalTableSettingsOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1472,25 +2748,65 @@ public Result UpdateItem(UpdateItemInput input) { try { UpdateItemResponse result = _impl.updateItem(converted); UpdateItemOutput dafnyResponse = ToDafny.UpdateItemOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ConditionalCheckFailedException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ItemCollectionSizeLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ProvisionedThroughputExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (RequestLimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TransactionConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateItemOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1500,19 +2816,47 @@ public Result UpdateTable(UpdateTableInput input) { try { UpdateTableResponse result = _impl.updateTable(converted); UpdateTableOutput dafnyResponse = ToDafny.UpdateTableOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1528,19 +2872,47 @@ > UpdateTableReplicaAutoScaling(UpdateTableReplicaAutoScalingInput input) { _impl.updateTableReplicaAutoScaling(converted); UpdateTableReplicaAutoScalingOutput dafnyResponse = ToDafny.UpdateTableReplicaAutoScalingOutput(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTableReplicaAutoScalingOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1554,19 +2926,47 @@ public Result UpdateTimeToLive( UpdateTimeToLiveOutput dafnyResponse = ToDafny.UpdateTimeToLiveOutput( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InternalServerErrorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ResourceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DynamoDbException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateTimeToLiveOutput._typeDescriptor(), + Error._typeDescriptor(), + 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 914b78be7..3a03325a4 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 @@ -193,6 +193,7 @@ 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; @@ -442,29 +443,38 @@ public static ArchivalSummary ArchivalSummary( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ArchivalSummary( archivalDateTime, archivalReason, @@ -642,13 +652,19 @@ public static AttributeValueUpdate AttributeValueUpdate( Option value; value = Objects.nonNull(nativeValue.value()) - ? Option.create_Some(ToDafny.AttributeValue(nativeValue.value())) - : Option.create_None(); + ? Option.create_Some( + AttributeValue._typeDescriptor(), + ToDafny.AttributeValue(nativeValue.value()) + ) + : Option.create_None(AttributeValue._typeDescriptor()); Option action; action = Objects.nonNull(nativeValue.action()) - ? Option.create_Some(ToDafny.AttributeAction(nativeValue.action())) - : Option.create_None(); + ? Option.create_Some( + AttributeAction._typeDescriptor(), + ToDafny.AttributeAction(nativeValue.action()) + ) + : Option.create_None(AttributeAction._typeDescriptor()); return new AttributeValueUpdate(value, action); } @@ -659,22 +675,28 @@ public static AutoScalingPolicyDescription AutoScalingPolicyDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< AutoScalingTargetTrackingScalingPolicyConfigurationDescription > targetTrackingScalingPolicyConfiguration; targetTrackingScalingPolicyConfiguration = Objects.nonNull(nativeValue.targetTrackingScalingPolicyConfiguration()) ? Option.create_Some( + AutoScalingTargetTrackingScalingPolicyConfigurationDescription._typeDescriptor(), ToDafny.AutoScalingTargetTrackingScalingPolicyConfigurationDescription( nativeValue.targetTrackingScalingPolicyConfiguration() ) ) - : Option.create_None(); + : Option.create_None( + AutoScalingTargetTrackingScalingPolicyConfigurationDescription._typeDescriptor() + ); return new AutoScalingPolicyDescription( policyName, targetTrackingScalingPolicyConfiguration @@ -702,11 +724,14 @@ public static AutoScalingPolicyUpdate AutoScalingPolicyUpdate( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); AutoScalingTargetTrackingScalingPolicyConfigurationUpdate targetTrackingScalingPolicyConfiguration; targetTrackingScalingPolicyConfiguration = ToDafny.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( @@ -724,27 +749,33 @@ public static AutoScalingSettingsDescription AutoScalingSettingsDescription( Option minimumUnits; minimumUnits = Objects.nonNull(nativeValue.minimumUnits()) - ? Option.create_Some((nativeValue.minimumUnits())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.minimumUnits())) + : Option.create_None(TypeDescriptor.LONG); Option maximumUnits; maximumUnits = Objects.nonNull(nativeValue.maximumUnits()) - ? Option.create_Some((nativeValue.maximumUnits())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.maximumUnits())) + : Option.create_None(TypeDescriptor.LONG); Option autoScalingDisabled; autoScalingDisabled = Objects.nonNull(nativeValue.autoScalingDisabled()) - ? Option.create_Some((nativeValue.autoScalingDisabled())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.autoScalingDisabled()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence > scalingPolicies; @@ -752,11 +783,18 @@ public static AutoScalingSettingsDescription AutoScalingSettingsDescription( (Objects.nonNull(nativeValue.scalingPolicies()) && nativeValue.scalingPolicies().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + AutoScalingPolicyDescription._typeDescriptor() + ), ToDafny.AutoScalingPolicyDescriptionList( nativeValue.scalingPolicies() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + AutoScalingPolicyDescription._typeDescriptor() + ) + ); return new AutoScalingSettingsDescription( minimumUnits, maximumUnits, @@ -772,34 +810,41 @@ public static AutoScalingSettingsUpdate AutoScalingSettingsUpdate( Option minimumUnits; minimumUnits = Objects.nonNull(nativeValue.minimumUnits()) - ? Option.create_Some((nativeValue.minimumUnits())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.minimumUnits())) + : Option.create_None(TypeDescriptor.LONG); Option maximumUnits; maximumUnits = Objects.nonNull(nativeValue.maximumUnits()) - ? Option.create_Some((nativeValue.maximumUnits())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.maximumUnits())) + : Option.create_None(TypeDescriptor.LONG); Option autoScalingDisabled; autoScalingDisabled = Objects.nonNull(nativeValue.autoScalingDisabled()) - ? Option.create_Some((nativeValue.autoScalingDisabled())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.autoScalingDisabled()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option scalingPolicyUpdate; scalingPolicyUpdate = Objects.nonNull(nativeValue.scalingPolicyUpdate()) ? Option.create_Some( + AutoScalingPolicyUpdate._typeDescriptor(), ToDafny.AutoScalingPolicyUpdate(nativeValue.scalingPolicyUpdate()) ) - : Option.create_None(); + : Option.create_None(AutoScalingPolicyUpdate._typeDescriptor()); return new AutoScalingSettingsUpdate( minimumUnits, maximumUnits, @@ -815,18 +860,27 @@ public static AutoScalingTargetTrackingScalingPolicyConfigurationDescription Aut Option disableScaleIn; disableScaleIn = Objects.nonNull(nativeValue.disableScaleIn()) - ? Option.create_Some((nativeValue.disableScaleIn())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.disableScaleIn()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); Option scaleInCooldown; scaleInCooldown = Objects.nonNull(nativeValue.scaleInCooldown()) - ? Option.create_Some((nativeValue.scaleInCooldown())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.scaleInCooldown()) + ) + : Option.create_None(TypeDescriptor.INT); Option scaleOutCooldown; scaleOutCooldown = Objects.nonNull(nativeValue.scaleOutCooldown()) - ? Option.create_Some((nativeValue.scaleOutCooldown())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.scaleOutCooldown()) + ) + : Option.create_None(TypeDescriptor.INT); DafnySequence targetValue; targetValue = software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( @@ -846,18 +900,27 @@ public static AutoScalingTargetTrackingScalingPolicyConfigurationUpdate AutoScal Option disableScaleIn; disableScaleIn = Objects.nonNull(nativeValue.disableScaleIn()) - ? Option.create_Some((nativeValue.disableScaleIn())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.disableScaleIn()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); Option scaleInCooldown; scaleInCooldown = Objects.nonNull(nativeValue.scaleInCooldown()) - ? Option.create_Some((nativeValue.scaleInCooldown())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.scaleInCooldown()) + ) + : Option.create_None(TypeDescriptor.INT); Option scaleOutCooldown; scaleOutCooldown = Objects.nonNull(nativeValue.scaleOutCooldown()) - ? Option.create_Some((nativeValue.scaleOutCooldown())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.INT, + (nativeValue.scaleOutCooldown()) + ) + : Option.create_None(TypeDescriptor.INT); DafnySequence targetValue; targetValue = software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( @@ -877,24 +940,29 @@ public static BackupDescription BackupDescription( Option backupDetails; backupDetails = Objects.nonNull(nativeValue.backupDetails()) - ? Option.create_Some(ToDafny.BackupDetails(nativeValue.backupDetails())) - : Option.create_None(); + ? Option.create_Some( + BackupDetails._typeDescriptor(), + ToDafny.BackupDetails(nativeValue.backupDetails()) + ) + : Option.create_None(BackupDetails._typeDescriptor()); Option sourceTableDetails; sourceTableDetails = Objects.nonNull(nativeValue.sourceTableDetails()) ? Option.create_Some( + SourceTableDetails._typeDescriptor(), ToDafny.SourceTableDetails(nativeValue.sourceTableDetails()) ) - : Option.create_None(); + : Option.create_None(SourceTableDetails._typeDescriptor()); Option sourceTableFeatureDetails; sourceTableFeatureDetails = Objects.nonNull(nativeValue.sourceTableFeatureDetails()) ? Option.create_Some( + SourceTableFeatureDetails._typeDescriptor(), ToDafny.SourceTableFeatureDetails( nativeValue.sourceTableFeatureDetails() ) ) - : Option.create_None(); + : Option.create_None(SourceTableFeatureDetails._typeDescriptor()); return new BackupDescription( backupDetails, sourceTableDetails, @@ -918,8 +986,11 @@ public static BackupDetails BackupDetails( Option backupSizeBytes; backupSizeBytes = Objects.nonNull(nativeValue.backupSizeBytes()) - ? Option.create_Some((nativeValue.backupSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.backupSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); BackupStatus backupStatus; backupStatus = ToDafny.BackupStatus(nativeValue.backupStatus()); BackupType backupType; @@ -933,11 +1004,14 @@ public static BackupDetails BackupDetails( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new BackupDetails( backupArn, backupName, @@ -968,80 +1042,110 @@ public static BackupSummary BackupSummary( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option backupStatus; backupStatus = Objects.nonNull(nativeValue.backupStatus()) - ? Option.create_Some(ToDafny.BackupStatus(nativeValue.backupStatus())) - : Option.create_None(); + ? Option.create_Some( + BackupStatus._typeDescriptor(), + ToDafny.BackupStatus(nativeValue.backupStatus()) + ) + : Option.create_None(BackupStatus._typeDescriptor()); Option backupType; backupType = Objects.nonNull(nativeValue.backupType()) - ? Option.create_Some(ToDafny.BackupType(nativeValue.backupType())) - : Option.create_None(); + ? Option.create_Some( + BackupType._typeDescriptor(), + ToDafny.BackupType(nativeValue.backupType()) + ) + : Option.create_None(BackupType._typeDescriptor()); Option backupSizeBytes; backupSizeBytes = Objects.nonNull(nativeValue.backupSizeBytes()) - ? Option.create_Some((nativeValue.backupSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.backupSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); return new BackupSummary( tableName, tableId, @@ -1065,9 +1169,10 @@ public static BatchExecuteStatementInput BatchExecuteStatementInput( returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); return new BatchExecuteStatementInput(statements, returnConsumedCapacity); } @@ -1079,17 +1184,27 @@ public static BatchExecuteStatementOutput BatchExecuteStatementOutput( (Objects.nonNull(nativeValue.responses()) && nativeValue.responses().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + BatchStatementResponse._typeDescriptor() + ), ToDafny.PartiQLBatchResponse(nativeValue.responses()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + BatchStatementResponse._typeDescriptor() + ) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) + ); return new BatchExecuteStatementOutput(responses, consumedCapacity); } @@ -1105,9 +1220,10 @@ public static BatchGetItemInput BatchGetItemInput( returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); return new BatchGetItemInput(requestItems, returnConsumedCapacity); } @@ -1129,9 +1245,36 @@ public static BatchGetItemOutput BatchGetItemOutput( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor( + TypeDescriptor.referenceWithInitializer( + dafny.DafnyMap.class, + () -> + dafny.DafnyMap.< + dafny.DafnySequence, + AttributeValue + >empty() + ) + ) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -1142,17 +1285,29 @@ public static BatchGetItemOutput BatchGetItemOutput( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + KeysAndAttributes._typeDescriptor() + ) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) + ); return new BatchGetItemOutput(responses, unprocessedKeys, consumedCapacity); } @@ -1205,18 +1360,22 @@ public static BatchStatementError BatchStatementError( code = Objects.nonNull(nativeValue.code()) ? Option.create_Some( + BatchStatementErrorCodeEnum._typeDescriptor(), ToDafny.BatchStatementErrorCodeEnum(nativeValue.code()) ) - : Option.create_None(); + : Option.create_None(BatchStatementErrorCodeEnum._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new BatchStatementError(code, message); } @@ -1233,14 +1392,20 @@ public static BatchStatementRequest BatchStatementRequest( (Objects.nonNull(nativeValue.parameters()) && nativeValue.parameters().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), ToDafny.PreparedStatementParameters(nativeValue.parameters()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) + ); Option consistentRead; consistentRead = Objects.nonNull(nativeValue.consistentRead()) - ? Option.create_Some((nativeValue.consistentRead())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.consistentRead()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); return new BatchStatementRequest(statement, parameters, consistentRead); } @@ -1250,17 +1415,23 @@ public static BatchStatementResponse BatchStatementResponse( Option error; error = Objects.nonNull(nativeValue.error()) - ? Option.create_Some(ToDafny.BatchStatementError(nativeValue.error())) - : Option.create_None(); + ? Option.create_Some( + BatchStatementError._typeDescriptor(), + ToDafny.BatchStatementError(nativeValue.error()) + ) + : Option.create_None(BatchStatementError._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -1269,8 +1440,27 @@ public static BatchStatementResponse BatchStatementResponse( > item; item = (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) - : Option.create_None(); + ? 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() + ) + ); return new BatchStatementResponse(error, tableName, item); } @@ -1286,18 +1476,20 @@ public static BatchWriteItemInput BatchWriteItemInput( returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option returnItemCollectionMetrics; returnItemCollectionMetrics = Objects.nonNull(nativeValue.returnItemCollectionMetrics()) ? Option.create_Some( + ReturnItemCollectionMetrics._typeDescriptor(), ToDafny.ReturnItemCollectionMetrics( nativeValue.returnItemCollectionMetrics() ) ) - : Option.create_None(); + : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); return new BatchWriteItemInput( requestItems, returnConsumedCapacity, @@ -1318,9 +1510,18 @@ public static BatchWriteItemOutput BatchWriteItemOutput( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(WriteRequest._typeDescriptor()) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -1331,19 +1532,35 @@ public static BatchWriteItemOutput BatchWriteItemOutput( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor( + ItemCollectionMetrics._typeDescriptor() + ) + ) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) + ); return new BatchWriteItemOutput( unprocessedItems, itemCollectionMetrics, @@ -1373,19 +1590,25 @@ public static BillingModeSummary BillingModeSummary( Option billingMode; billingMode = Objects.nonNull(nativeValue.billingMode()) - ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) - : Option.create_None(); + ? Option.create_Some( + BillingMode._typeDescriptor(), + ToDafny.BillingMode(nativeValue.billingMode()) + ) + : Option.create_None(BillingMode._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new BillingModeSummary( billingMode, lastUpdateToPayPerRequestDateTime @@ -1413,26 +1636,51 @@ public static CancellationReason CancellationReason( > item; item = (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) - : Option.create_None(); + ? 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> 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new CancellationReason(item, code, message); } @@ -1457,29 +1705,32 @@ public static Capacity Capacity( readCapacityUnits = Objects.nonNull(nativeValue.readCapacityUnits()) ? Option.create_Some( + ConsumedCapacityUnits._typeDescriptor(), software.amazon.smithy.dafny.conversion.ToDafny.Simple.Double( nativeValue.readCapacityUnits() ) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); 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(); + : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); 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(); + : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); return new Capacity(readCapacityUnits, writeCapacityUnits, capacityUnits); } @@ -1491,9 +1742,12 @@ public static Condition Condition( (Objects.nonNull(nativeValue.attributeValueList()) && nativeValue.attributeValueList().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), ToDafny.AttributeValueList(nativeValue.attributeValueList()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) + ); ComparisonOperator comparisonOperator; comparisonOperator = ToDafny.ComparisonOperator(nativeValue.comparisonOperator()); @@ -1528,11 +1782,20 @@ public static ConditionCheck ConditionCheck( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -1543,22 +1806,34 @@ public static ConditionCheck ConditionCheck( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); Option< ReturnValuesOnConditionCheckFailure > returnValuesOnConditionCheckFailure; returnValuesOnConditionCheckFailure = Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), ToDafny.ReturnValuesOnConditionCheckFailure( nativeValue.returnValuesOnConditionCheckFailure() ) ) - : Option.create_None(); + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new ConditionCheck( key, tableName, @@ -1576,43 +1851,52 @@ public static ConsumedCapacity ConsumedCapacity( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); 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(); + : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); 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(); + : Option.create_None(ConsumedCapacityUnits._typeDescriptor()); Option table; table = Objects.nonNull(nativeValue.table()) - ? Option.create_Some(ToDafny.Capacity(nativeValue.table())) - : Option.create_None(); + ? Option.create_Some( + Capacity._typeDescriptor(), + ToDafny.Capacity(nativeValue.table()) + ) + : Option.create_None(Capacity._typeDescriptor()); Option< DafnyMap, ? extends Capacity> > localSecondaryIndexes; @@ -1620,11 +1904,20 @@ public static ConsumedCapacity ConsumedCapacity( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + Capacity._typeDescriptor() + ) + ); Option< DafnyMap, ? extends Capacity> > globalSecondaryIndexes; @@ -1632,11 +1925,20 @@ public static ConsumedCapacity ConsumedCapacity( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + Capacity._typeDescriptor() + ) + ); return new ConsumedCapacity( tableName, capacityUnits, @@ -1672,11 +1974,12 @@ public static ContinuousBackupsDescription ContinuousBackupsDescription( pointInTimeRecoveryDescription = Objects.nonNull(nativeValue.pointInTimeRecoveryDescription()) ? Option.create_Some( + PointInTimeRecoveryDescription._typeDescriptor(), ToDafny.PointInTimeRecoveryDescription( nativeValue.pointInTimeRecoveryDescription() ) ) - : Option.create_None(); + : Option.create_None(PointInTimeRecoveryDescription._typeDescriptor()); return new ContinuousBackupsDescription( continuousBackupsStatus, pointInTimeRecoveryDescription @@ -1714,29 +2017,36 @@ public static ContributorInsightsSummary ContributorInsightsSummary( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option contributorInsightsStatus; contributorInsightsStatus = Objects.nonNull(nativeValue.contributorInsightsStatus()) ? Option.create_Some( + ContributorInsightsStatus._typeDescriptor(), ToDafny.ContributorInsightsStatus( nativeValue.contributorInsightsStatus() ) ) - : Option.create_None(); + : Option.create_None(ContributorInsightsStatus._typeDescriptor()); return new ContributorInsightsSummary( tableName, indexName, @@ -1766,8 +2076,11 @@ public static CreateBackupOutput CreateBackupOutput( Option backupDetails; backupDetails = Objects.nonNull(nativeValue.backupDetails()) - ? Option.create_Some(ToDafny.BackupDetails(nativeValue.backupDetails())) - : Option.create_None(); + ? Option.create_Some( + BackupDetails._typeDescriptor(), + ToDafny.BackupDetails(nativeValue.backupDetails()) + ) + : Option.create_None(BackupDetails._typeDescriptor()); return new CreateBackupOutput(backupDetails); } @@ -1787,9 +2100,10 @@ public static CreateGlobalSecondaryIndexAction CreateGlobalSecondaryIndexAction( provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughput._typeDescriptor()); return new CreateGlobalSecondaryIndexAction( indexName, keySchema, @@ -1818,9 +2132,10 @@ public static CreateGlobalTableOutput CreateGlobalTableOutput( globalTableDescription = Objects.nonNull(nativeValue.globalTableDescription()) ? Option.create_Some( + GlobalTableDescription._typeDescriptor(), ToDafny.GlobalTableDescription(nativeValue.globalTableDescription()) ) - : Option.create_None(); + : Option.create_None(GlobalTableDescription._typeDescriptor()); return new CreateGlobalTableOutput(globalTableDescription); } @@ -1847,20 +2162,24 @@ public static CreateReplicationGroupMemberAction CreateReplicationGroupMemberAct 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option provisionedThroughputOverride; provisionedThroughputOverride = Objects.nonNull(nativeValue.provisionedThroughputOverride()) ? Option.create_Some( + ProvisionedThroughputOverride._typeDescriptor(), ToDafny.ProvisionedThroughputOverride( nativeValue.provisionedThroughputOverride() ) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexes; @@ -1868,18 +2187,26 @@ public static CreateReplicationGroupMemberAction CreateReplicationGroupMemberAct (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && nativeValue.globalSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + ReplicaGlobalSecondaryIndex._typeDescriptor() + ), ToDafny.ReplicaGlobalSecondaryIndexList( nativeValue.globalSecondaryIndexes() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicaGlobalSecondaryIndex._typeDescriptor() + ) + ); Option tableClassOverride; tableClassOverride = Objects.nonNull(nativeValue.tableClassOverride()) ? Option.create_Some( + TableClass._typeDescriptor(), ToDafny.TableClass(nativeValue.tableClassOverride()) ) - : Option.create_None(); + : Option.create_None(TableClass._typeDescriptor()); return new CreateReplicationGroupMemberAction( regionName, kMSMasterKeyId, @@ -1907,9 +2234,12 @@ public static CreateTableInput CreateTableInput( (Objects.nonNull(nativeValue.localSecondaryIndexes()) && nativeValue.localSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(LocalSecondaryIndex._typeDescriptor()), ToDafny.LocalSecondaryIndexList(nativeValue.localSecondaryIndexes()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(LocalSecondaryIndex._typeDescriptor()) + ); Option< DafnySequence > globalSecondaryIndexes; @@ -1917,45 +2247,62 @@ public static CreateTableInput CreateTableInput( (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && nativeValue.globalSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()), ToDafny.GlobalSecondaryIndexList(nativeValue.globalSecondaryIndexes()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()) + ); Option billingMode; billingMode = Objects.nonNull(nativeValue.billingMode()) - ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) - : Option.create_None(); + ? Option.create_Some( + BillingMode._typeDescriptor(), + ToDafny.BillingMode(nativeValue.billingMode()) + ) + : Option.create_None(BillingMode._typeDescriptor()); Option provisionedThroughput; provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughput._typeDescriptor()); Option streamSpecification; streamSpecification = Objects.nonNull(nativeValue.streamSpecification()) ? Option.create_Some( + StreamSpecification._typeDescriptor(), ToDafny.StreamSpecification(nativeValue.streamSpecification()) ) - : Option.create_None(); + : Option.create_None(StreamSpecification._typeDescriptor()); Option sSESpecification; sSESpecification = Objects.nonNull(nativeValue.sseSpecification()) ? Option.create_Some( + SSESpecification._typeDescriptor(), ToDafny.SSESpecification(nativeValue.sseSpecification()) ) - : Option.create_None(); + : Option.create_None(SSESpecification._typeDescriptor()); Option> tags; tags = (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) - ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(Tag._typeDescriptor()), + ToDafny.TagList(nativeValue.tags()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(Tag._typeDescriptor()) + ); Option tableClass; tableClass = Objects.nonNull(nativeValue.tableClass()) - ? Option.create_Some(ToDafny.TableClass(nativeValue.tableClass())) - : Option.create_None(); + ? Option.create_Some( + TableClass._typeDescriptor(), + ToDafny.TableClass(nativeValue.tableClass()) + ) + : Option.create_None(TableClass._typeDescriptor()); return new CreateTableInput( attributeDefinitions, tableName, @@ -1978,9 +2325,10 @@ public static CreateTableOutput CreateTableOutput( tableDescription = Objects.nonNull(nativeValue.tableDescription()) ? Option.create_Some( + TableDescription._typeDescriptor(), ToDafny.TableDescription(nativeValue.tableDescription()) ) - : Option.create_None(); + : Option.create_None(TableDescription._typeDescriptor()); return new CreateTableOutput(tableDescription); } @@ -2001,19 +2349,31 @@ public static CsvOptions CsvOptions( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence> > headerList; headerList = (Objects.nonNull(nativeValue.headerList()) && nativeValue.headerList().size() > 0) - ? Option.create_Some(ToDafny.CsvHeaderList(nativeValue.headerList())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.CsvHeaderList(nativeValue.headerList()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new CsvOptions(delimiter, headerList); } @@ -2034,11 +2394,14 @@ public static Delete Delete( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -2049,11 +2412,20 @@ public static Delete Delete( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -2064,22 +2436,34 @@ public static Delete Delete( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); Option< ReturnValuesOnConditionCheckFailure > returnValuesOnConditionCheckFailure; returnValuesOnConditionCheckFailure = Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), ToDafny.ReturnValuesOnConditionCheckFailure( nativeValue.returnValuesOnConditionCheckFailure() ) ) - : Option.create_None(); + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new Delete( key, tableName, @@ -2108,9 +2492,10 @@ public static DeleteBackupOutput DeleteBackupOutput( backupDescription = Objects.nonNull(nativeValue.backupDescription()) ? Option.create_Some( + BackupDescription._typeDescriptor(), ToDafny.BackupDescription(nativeValue.backupDescription()) ) - : Option.create_None(); + : Option.create_None(BackupDescription._typeDescriptor()); return new DeleteBackupOutput(backupDescription); } @@ -2146,46 +2531,64 @@ public static DeleteItemInput DeleteItemInput(DeleteItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + ExpectedAttributeValue._typeDescriptor() + ) + ); Option conditionalOperator; conditionalOperator = Objects.nonNull(nativeValue.conditionalOperator()) ? Option.create_Some( + ConditionalOperator._typeDescriptor(), ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) ) - : Option.create_None(); + : Option.create_None(ConditionalOperator._typeDescriptor()); Option returnValues; returnValues = Objects.nonNull(nativeValue.returnValues()) - ? Option.create_Some(ToDafny.ReturnValue(nativeValue.returnValues())) - : Option.create_None(); + ? Option.create_Some( + ReturnValue._typeDescriptor(), + ToDafny.ReturnValue(nativeValue.returnValues()) + ) + : Option.create_None(ReturnValue._typeDescriptor()); Option returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option returnItemCollectionMetrics; returnItemCollectionMetrics = Objects.nonNull(nativeValue.returnItemCollectionMetrics()) ? Option.create_Some( + ReturnItemCollectionMetrics._typeDescriptor(), ToDafny.ReturnItemCollectionMetrics( nativeValue.returnItemCollectionMetrics() ) ) - : Option.create_None(); + : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -2196,11 +2599,20 @@ public static DeleteItemInput DeleteItemInput(DeleteItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -2211,11 +2623,20 @@ public static DeleteItemInput DeleteItemInput(DeleteItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); return new DeleteItemInput( tableName, key, @@ -2242,22 +2663,43 @@ public static DeleteItemOutput DeleteItemOutput( attributes = (Objects.nonNull(nativeValue.attributes()) && nativeValue.attributes().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.attributes())) - : Option.create_None(); + ? 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 consumedCapacity; consumedCapacity = Objects.nonNull(nativeValue.consumedCapacity()) ? Option.create_Some( + ConsumedCapacity._typeDescriptor(), ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacity._typeDescriptor()); Option itemCollectionMetrics; itemCollectionMetrics = Objects.nonNull(nativeValue.itemCollectionMetrics()) ? Option.create_Some( + ItemCollectionMetrics._typeDescriptor(), ToDafny.ItemCollectionMetrics(nativeValue.itemCollectionMetrics()) ) - : Option.create_None(); + : Option.create_None(ItemCollectionMetrics._typeDescriptor()); return new DeleteItemOutput( attributes, consumedCapacity, @@ -2316,9 +2758,10 @@ public static DeleteTableOutput DeleteTableOutput( tableDescription = Objects.nonNull(nativeValue.tableDescription()) ? Option.create_Some( + TableDescription._typeDescriptor(), ToDafny.TableDescription(nativeValue.tableDescription()) ) - : Option.create_None(); + : Option.create_None(TableDescription._typeDescriptor()); return new DeleteTableOutput(tableDescription); } @@ -2340,9 +2783,10 @@ public static DescribeBackupOutput DescribeBackupOutput( backupDescription = Objects.nonNull(nativeValue.backupDescription()) ? Option.create_Some( + BackupDescription._typeDescriptor(), ToDafny.BackupDescription(nativeValue.backupDescription()) ) - : Option.create_None(); + : Option.create_None(BackupDescription._typeDescriptor()); return new DescribeBackupOutput(backupDescription); } @@ -2364,11 +2808,12 @@ public static DescribeContinuousBackupsOutput DescribeContinuousBackupsOutput( continuousBackupsDescription = Objects.nonNull(nativeValue.continuousBackupsDescription()) ? Option.create_Some( + ContinuousBackupsDescription._typeDescriptor(), ToDafny.ContinuousBackupsDescription( nativeValue.continuousBackupsDescription() ) ) - : Option.create_None(); + : Option.create_None(ContinuousBackupsDescription._typeDescriptor()); return new DescribeContinuousBackupsOutput(continuousBackupsDescription); } @@ -2384,11 +2829,14 @@ public static DescribeContributorInsightsInput DescribeContributorInsightsInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new DescribeContributorInsightsInput(tableName, indexName); } @@ -2399,20 +2847,26 @@ public static DescribeContributorInsightsOutput DescribeContributorInsightsOutpu 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence> > contributorInsightsRuleList; @@ -2420,36 +2874,48 @@ public static DescribeContributorInsightsOutput DescribeContributorInsightsOutpu (Objects.nonNull(nativeValue.contributorInsightsRuleList()) && nativeValue.contributorInsightsRuleList().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), ToDafny.ContributorInsightsRuleList( nativeValue.contributorInsightsRuleList() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option contributorInsightsStatus; contributorInsightsStatus = Objects.nonNull(nativeValue.contributorInsightsStatus()) ? Option.create_Some( + ContributorInsightsStatus._typeDescriptor(), ToDafny.ContributorInsightsStatus( nativeValue.contributorInsightsStatus() ) ) - : Option.create_None(); + : Option.create_None(ContributorInsightsStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option failureException; failureException = Objects.nonNull(nativeValue.failureException()) ? Option.create_Some( + FailureException._typeDescriptor(), ToDafny.FailureException(nativeValue.failureException()) ) - : Option.create_None(); + : Option.create_None(FailureException._typeDescriptor()); return new DescribeContributorInsightsOutput( tableName, indexName, @@ -2492,9 +2958,10 @@ public static DescribeExportOutput DescribeExportOutput( exportDescription = Objects.nonNull(nativeValue.exportDescription()) ? Option.create_Some( + ExportDescription._typeDescriptor(), ToDafny.ExportDescription(nativeValue.exportDescription()) ) - : Option.create_None(); + : Option.create_None(ExportDescription._typeDescriptor()); return new DescribeExportOutput(exportDescription); } @@ -2516,9 +2983,10 @@ public static DescribeGlobalTableOutput DescribeGlobalTableOutput( globalTableDescription = Objects.nonNull(nativeValue.globalTableDescription()) ? Option.create_Some( + GlobalTableDescription._typeDescriptor(), ToDafny.GlobalTableDescription(nativeValue.globalTableDescription()) ) - : Option.create_None(); + : Option.create_None(GlobalTableDescription._typeDescriptor()); return new DescribeGlobalTableOutput(globalTableDescription); } @@ -2540,19 +3008,29 @@ public static DescribeGlobalTableSettingsOutput DescribeGlobalTableSettingsOutpu 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicaSettingsDescription._typeDescriptor() + ) + ); return new DescribeGlobalTableSettingsOutput( globalTableName, replicaSettings @@ -2597,11 +3075,14 @@ public static DescribeKinesisStreamingDestinationOutput DescribeKinesisStreaming 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnySequence > kinesisDataStreamDestinations; @@ -2609,11 +3090,18 @@ public static DescribeKinesisStreamingDestinationOutput DescribeKinesisStreaming (Objects.nonNull(nativeValue.kinesisDataStreamDestinations()) && nativeValue.kinesisDataStreamDestinations().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + KinesisDataStreamDestination._typeDescriptor() + ), ToDafny.KinesisDataStreamDestinations( nativeValue.kinesisDataStreamDestinations() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + KinesisDataStreamDestination._typeDescriptor() + ) + ); return new DescribeKinesisStreamingDestinationOutput( tableName, kinesisDataStreamDestinations @@ -2632,23 +3120,35 @@ public static DescribeLimitsOutput DescribeLimitsOutput( Option accountMaxReadCapacityUnits; accountMaxReadCapacityUnits = Objects.nonNull(nativeValue.accountMaxReadCapacityUnits()) - ? Option.create_Some((nativeValue.accountMaxReadCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.accountMaxReadCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); Option accountMaxWriteCapacityUnits; accountMaxWriteCapacityUnits = Objects.nonNull(nativeValue.accountMaxWriteCapacityUnits()) - ? Option.create_Some((nativeValue.accountMaxWriteCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.accountMaxWriteCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); Option tableMaxReadCapacityUnits; tableMaxReadCapacityUnits = Objects.nonNull(nativeValue.tableMaxReadCapacityUnits()) - ? Option.create_Some((nativeValue.tableMaxReadCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.tableMaxReadCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); Option tableMaxWriteCapacityUnits; tableMaxWriteCapacityUnits = Objects.nonNull(nativeValue.tableMaxWriteCapacityUnits()) - ? Option.create_Some((nativeValue.tableMaxWriteCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.tableMaxWriteCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); return new DescribeLimitsOutput( accountMaxReadCapacityUnits, accountMaxWriteCapacityUnits, @@ -2674,8 +3174,11 @@ public static DescribeTableOutput DescribeTableOutput( Option table; table = Objects.nonNull(nativeValue.table()) - ? Option.create_Some(ToDafny.TableDescription(nativeValue.table())) - : Option.create_None(); + ? Option.create_Some( + TableDescription._typeDescriptor(), + ToDafny.TableDescription(nativeValue.table()) + ) + : Option.create_None(TableDescription._typeDescriptor()); return new DescribeTableOutput(table); } @@ -2697,11 +3200,12 @@ public static DescribeTableReplicaAutoScalingOutput DescribeTableReplicaAutoScal tableAutoScalingDescription = Objects.nonNull(nativeValue.tableAutoScalingDescription()) ? Option.create_Some( + TableAutoScalingDescription._typeDescriptor(), ToDafny.TableAutoScalingDescription( nativeValue.tableAutoScalingDescription() ) ) - : Option.create_None(); + : Option.create_None(TableAutoScalingDescription._typeDescriptor()); return new DescribeTableReplicaAutoScalingOutput( tableAutoScalingDescription ); @@ -2725,9 +3229,10 @@ public static DescribeTimeToLiveOutput DescribeTimeToLiveOutput( timeToLiveDescription = Objects.nonNull(nativeValue.timeToLiveDescription()) ? Option.create_Some( + TimeToLiveDescription._typeDescriptor(), ToDafny.TimeToLiveDescription(nativeValue.timeToLiveDescription()) ) - : Option.create_None(); + : Option.create_None(TimeToLiveDescription._typeDescriptor()); return new DescribeTimeToLiveOutput(timeToLiveDescription); } @@ -2754,27 +3259,34 @@ public static DisableKinesisStreamingDestinationOutput DisableKinesisStreamingDe 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option destinationStatus; destinationStatus = Objects.nonNull(nativeValue.destinationStatus()) ? Option.create_Some( + DestinationStatus._typeDescriptor(), ToDafny.DestinationStatus(nativeValue.destinationStatus()) ) - : Option.create_None(); + : Option.create_None(DestinationStatus._typeDescriptor()); return new DisableKinesisStreamingDestinationOutput( tableName, streamArn, @@ -2805,27 +3317,34 @@ public static EnableKinesisStreamingDestinationOutput EnableKinesisStreamingDest 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option destinationStatus; destinationStatus = Objects.nonNull(nativeValue.destinationStatus()) ? Option.create_Some( + DestinationStatus._typeDescriptor(), ToDafny.DestinationStatus(nativeValue.destinationStatus()) ) - : Option.create_None(); + : Option.create_None(DestinationStatus._typeDescriptor()); return new EnableKinesisStreamingDestinationOutput( tableName, streamArn, @@ -2869,35 +3388,45 @@ public static ExecuteStatementInput ExecuteStatementInput( (Objects.nonNull(nativeValue.parameters()) && nativeValue.parameters().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), ToDafny.PreparedStatementParameters(nativeValue.parameters()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) + ); Option consistentRead; consistentRead = Objects.nonNull(nativeValue.consistentRead()) - ? Option.create_Some((nativeValue.consistentRead())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.consistentRead()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option limit; limit = Objects.nonNull(nativeValue.limit()) - ? Option.create_Some((nativeValue.limit())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) + : Option.create_None(TypeDescriptor.INT); return new ExecuteStatementInput( statement, parameters, @@ -2921,24 +3450,51 @@ public static ExecuteStatementOutput ExecuteStatementOutput( > items; items = (Objects.nonNull(nativeValue.items()) && nativeValue.items().size() > 0) - ? Option.create_Some(ToDafny.ItemList(nativeValue.items())) - : Option.create_None(); + ? 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> 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option consumedCapacity; consumedCapacity = Objects.nonNull(nativeValue.consumedCapacity()) ? Option.create_Some( + ConsumedCapacity._typeDescriptor(), ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacity._typeDescriptor()); Option< DafnyMap< ? extends DafnySequence, @@ -2948,8 +3504,27 @@ public static ExecuteStatementOutput ExecuteStatementOutput( lastEvaluatedKey = (Objects.nonNull(nativeValue.lastEvaluatedKey()) && nativeValue.lastEvaluatedKey().size() > 0) - ? Option.create_Some(ToDafny.Key(nativeValue.lastEvaluatedKey())) - : Option.create_None(); + ? 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() + ) + ); return new ExecuteStatementOutput( items, nextToken, @@ -2968,18 +3543,22 @@ public static ExecuteTransactionInput ExecuteTransactionInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); return new ExecuteTransactionInput( transactStatements, clientRequestToken, @@ -2994,16 +3573,24 @@ public static ExecuteTransactionOutput ExecuteTransactionOutput( responses = (Objects.nonNull(nativeValue.responses()) && nativeValue.responses().size() > 0) - ? Option.create_Some(ToDafny.ItemResponseList(nativeValue.responses())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()), + ToDafny.ItemResponseList(nativeValue.responses()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) + ); return new ExecuteTransactionOutput(responses, consumedCapacity); } @@ -3029,28 +3616,35 @@ public static ExpectedAttributeValue ExpectedAttributeValue( Option value; value = Objects.nonNull(nativeValue.value()) - ? Option.create_Some(ToDafny.AttributeValue(nativeValue.value())) - : Option.create_None(); + ? Option.create_Some( + AttributeValue._typeDescriptor(), + ToDafny.AttributeValue(nativeValue.value()) + ) + : Option.create_None(AttributeValue._typeDescriptor()); Option exists; exists = Objects.nonNull(nativeValue.exists()) - ? Option.create_Some((nativeValue.exists())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.exists())) + : Option.create_None(TypeDescriptor.BOOLEAN); Option comparisonOperator; comparisonOperator = Objects.nonNull(nativeValue.comparisonOperator()) ? Option.create_Some( + ComparisonOperator._typeDescriptor(), ToDafny.ComparisonOperator(nativeValue.comparisonOperator()) ) - : Option.create_None(); + : Option.create_None(ComparisonOperator._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) + ); return new ExpectedAttributeValue( value, exists, @@ -3066,155 +3660,207 @@ public static ExportDescription ExportDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option exportStatus; exportStatus = Objects.nonNull(nativeValue.exportStatus()) - ? Option.create_Some(ToDafny.ExportStatus(nativeValue.exportStatus())) - : Option.create_None(); + ? Option.create_Some( + ExportStatus._typeDescriptor(), + ToDafny.ExportStatus(nativeValue.exportStatus()) + ) + : Option.create_None(ExportStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option s3SseAlgorithm; s3SseAlgorithm = Objects.nonNull(nativeValue.s3SseAlgorithm()) ? Option.create_Some( + S3SseAlgorithm._typeDescriptor(), ToDafny.S3SseAlgorithm(nativeValue.s3SseAlgorithm()) ) - : Option.create_None(); + : Option.create_None(S3SseAlgorithm._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option exportFormat; exportFormat = Objects.nonNull(nativeValue.exportFormat()) - ? Option.create_Some(ToDafny.ExportFormat(nativeValue.exportFormat())) - : Option.create_None(); + ? Option.create_Some( + ExportFormat._typeDescriptor(), + ToDafny.ExportFormat(nativeValue.exportFormat()) + ) + : Option.create_None(ExportFormat._typeDescriptor()); Option billedSizeBytes; billedSizeBytes = Objects.nonNull(nativeValue.billedSizeBytes()) - ? Option.create_Some((nativeValue.billedSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.billedSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); Option itemCount; itemCount = Objects.nonNull(nativeValue.itemCount()) - ? Option.create_Some((nativeValue.itemCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) + : Option.create_None(TypeDescriptor.LONG); return new ExportDescription( exportArn, exportStatus, @@ -3257,16 +3903,22 @@ public static ExportSummary ExportSummary( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option exportStatus; exportStatus = Objects.nonNull(nativeValue.exportStatus()) - ? Option.create_Some(ToDafny.ExportStatus(nativeValue.exportStatus())) - : Option.create_None(); + ? Option.create_Some( + ExportStatus._typeDescriptor(), + ToDafny.ExportStatus(nativeValue.exportStatus()) + ) + : Option.create_None(ExportStatus._typeDescriptor()); return new ExportSummary(exportArn, exportStatus); } @@ -3282,20 +3934,26 @@ public static ExportTableToPointInTimeInput ExportTableToPointInTimeInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); DafnySequence s3Bucket; s3Bucket = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( @@ -3305,41 +3963,54 @@ public static ExportTableToPointInTimeInput ExportTableToPointInTimeInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option s3SseAlgorithm; s3SseAlgorithm = Objects.nonNull(nativeValue.s3SseAlgorithm()) ? Option.create_Some( + S3SseAlgorithm._typeDescriptor(), ToDafny.S3SseAlgorithm(nativeValue.s3SseAlgorithm()) ) - : Option.create_None(); + : Option.create_None(S3SseAlgorithm._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option exportFormat; exportFormat = Objects.nonNull(nativeValue.exportFormat()) - ? Option.create_Some(ToDafny.ExportFormat(nativeValue.exportFormat())) - : Option.create_None(); + ? Option.create_Some( + ExportFormat._typeDescriptor(), + ToDafny.ExportFormat(nativeValue.exportFormat()) + ) + : Option.create_None(ExportFormat._typeDescriptor()); return new ExportTableToPointInTimeInput( tableArn, exportTime, @@ -3360,9 +4031,10 @@ public static ExportTableToPointInTimeOutput ExportTableToPointInTimeOutput( exportDescription = Objects.nonNull(nativeValue.exportDescription()) ? Option.create_Some( + ExportDescription._typeDescriptor(), ToDafny.ExportDescription(nativeValue.exportDescription()) ) - : Option.create_None(); + : Option.create_None(ExportDescription._typeDescriptor()); return new ExportTableToPointInTimeOutput(exportDescription); } @@ -3400,20 +4072,26 @@ public static FailureException FailureException( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new FailureException(exceptionName, exceptionDescription); } @@ -3450,11 +4128,14 @@ public static Get Get( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -3465,11 +4146,20 @@ public static Get Get( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new Get( key, tableName, @@ -3496,30 +4186,44 @@ public static GetItemInput GetItemInput(GetItemRequest nativeValue) { (Objects.nonNull(nativeValue.attributesToGet()) && nativeValue.attributesToGet().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), ToDafny.AttributeNameList(nativeValue.attributesToGet()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option consistentRead; consistentRead = Objects.nonNull(nativeValue.consistentRead()) - ? Option.create_Some((nativeValue.consistentRead())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.consistentRead()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); Option returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -3530,11 +4234,20 @@ public static GetItemInput GetItemInput(GetItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new GetItemInput( tableName, key, @@ -3555,15 +4268,35 @@ public static GetItemOutput GetItemOutput(GetItemResponse nativeValue) { > item; item = (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) - : Option.create_None(); + ? 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 consumedCapacity; consumedCapacity = Objects.nonNull(nativeValue.consumedCapacity()) ? Option.create_Some( + ConsumedCapacity._typeDescriptor(), ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacity._typeDescriptor()); return new GetItemOutput(item, consumedCapacity); } @@ -3583,9 +4316,10 @@ public static GlobalSecondaryIndex GlobalSecondaryIndex( provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughput._typeDescriptor()); return new GlobalSecondaryIndex( indexName, keySchema, @@ -3601,20 +4335,24 @@ public static GlobalSecondaryIndexAutoScalingUpdate GlobalSecondaryIndexAutoScal 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option provisionedWriteCapacityAutoScalingUpdate; provisionedWriteCapacityAutoScalingUpdate = Objects.nonNull(nativeValue.provisionedWriteCapacityAutoScalingUpdate()) ? Option.create_Some( + AutoScalingSettingsUpdate._typeDescriptor(), ToDafny.AutoScalingSettingsUpdate( nativeValue.provisionedWriteCapacityAutoScalingUpdate() ) ) - : Option.create_None(); + : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); return new GlobalSecondaryIndexAutoScalingUpdate( indexName, provisionedWriteCapacityAutoScalingUpdate @@ -3642,60 +4380,86 @@ public static GlobalSecondaryIndexDescription GlobalSecondaryIndexDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option> keySchema; keySchema = (Objects.nonNull(nativeValue.keySchema()) && nativeValue.keySchema().size() > 0) - ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), + ToDafny.KeySchema(nativeValue.keySchema()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) + ); Option projection; projection = Objects.nonNull(nativeValue.projection()) - ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) - : Option.create_None(); + ? Option.create_Some( + Projection._typeDescriptor(), + ToDafny.Projection(nativeValue.projection()) + ) + : Option.create_None(Projection._typeDescriptor()); Option indexStatus; indexStatus = Objects.nonNull(nativeValue.indexStatus()) - ? Option.create_Some(ToDafny.IndexStatus(nativeValue.indexStatus())) - : Option.create_None(); + ? Option.create_Some( + IndexStatus._typeDescriptor(), + ToDafny.IndexStatus(nativeValue.indexStatus()) + ) + : Option.create_None(IndexStatus._typeDescriptor()); Option backfilling; backfilling = Objects.nonNull(nativeValue.backfilling()) - ? Option.create_Some((nativeValue.backfilling())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.backfilling()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); Option provisionedThroughput; provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughputDescription._typeDescriptor(), ToDafny.ProvisionedThroughputDescription( nativeValue.provisionedThroughput() ) ) - : Option.create_None(); + : Option.create_None( + ProvisionedThroughputDescription._typeDescriptor() + ); Option indexSizeBytes; indexSizeBytes = Objects.nonNull(nativeValue.indexSizeBytes()) - ? Option.create_Some((nativeValue.indexSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.indexSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); Option itemCount; itemCount = Objects.nonNull(nativeValue.itemCount()) - ? Option.create_Some((nativeValue.itemCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) + : Option.create_None(TypeDescriptor.LONG); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new GlobalSecondaryIndexDescription( indexName, keySchema, @@ -3744,29 +4508,41 @@ public static GlobalSecondaryIndexInfo GlobalSecondaryIndexInfo( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option> keySchema; keySchema = (Objects.nonNull(nativeValue.keySchema()) && nativeValue.keySchema().size() > 0) - ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), + ToDafny.KeySchema(nativeValue.keySchema()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) + ); Option projection; projection = Objects.nonNull(nativeValue.projection()) - ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) - : Option.create_None(); + ? Option.create_Some( + Projection._typeDescriptor(), + ToDafny.Projection(nativeValue.projection()) + ) + : Option.create_None(Projection._typeDescriptor()); Option provisionedThroughput; provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughput._typeDescriptor()); return new GlobalSecondaryIndexInfo( indexName, keySchema, @@ -3796,23 +4572,32 @@ public static GlobalSecondaryIndexUpdate GlobalSecondaryIndexUpdate( update = Objects.nonNull(nativeValue.update()) ? Option.create_Some( + UpdateGlobalSecondaryIndexAction._typeDescriptor(), ToDafny.UpdateGlobalSecondaryIndexAction(nativeValue.update()) ) - : Option.create_None(); + : Option.create_None( + UpdateGlobalSecondaryIndexAction._typeDescriptor() + ); Option create; create = Objects.nonNull(nativeValue.create()) ? Option.create_Some( + CreateGlobalSecondaryIndexAction._typeDescriptor(), ToDafny.CreateGlobalSecondaryIndexAction(nativeValue.create()) ) - : Option.create_None(); + : Option.create_None( + CreateGlobalSecondaryIndexAction._typeDescriptor() + ); Option delete; delete = Objects.nonNull(nativeValue.delete()) ? Option.create_Some( + DeleteGlobalSecondaryIndexAction._typeDescriptor(), ToDafny.DeleteGlobalSecondaryIndexAction(nativeValue.delete()) ) - : Option.create_None(); + : Option.create_None( + DeleteGlobalSecondaryIndexAction._typeDescriptor() + ); return new GlobalSecondaryIndexUpdate(update, create, delete); } @@ -3837,19 +4622,25 @@ public static GlobalTable GlobalTable( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(Replica._typeDescriptor()) + ); return new GlobalTable(globalTableName, replicationGroup); } @@ -3861,43 +4652,56 @@ public static GlobalTableDescription GlobalTableDescription( (Objects.nonNull(nativeValue.replicationGroup()) && nativeValue.replicationGroup().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()), ToDafny.ReplicaDescriptionList(nativeValue.replicationGroup()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option globalTableStatus; globalTableStatus = Objects.nonNull(nativeValue.globalTableStatus()) ? Option.create_Some( + GlobalTableStatus._typeDescriptor(), ToDafny.GlobalTableStatus(nativeValue.globalTableStatus()) ) - : Option.create_None(); + : Option.create_None(GlobalTableStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new GlobalTableDescription( replicationGroup, globalTableArn, @@ -3918,8 +4722,11 @@ public static GlobalTableGlobalSecondaryIndexSettingsUpdate GlobalTableGlobalSec Option provisionedWriteCapacityUnits; provisionedWriteCapacityUnits = Objects.nonNull(nativeValue.provisionedWriteCapacityUnits()) - ? Option.create_Some((nativeValue.provisionedWriteCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.provisionedWriteCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); Option< AutoScalingSettingsUpdate > provisionedWriteCapacityAutoScalingSettingsUpdate; @@ -3928,11 +4735,12 @@ public static GlobalTableGlobalSecondaryIndexSettingsUpdate GlobalTableGlobalSec nativeValue.provisionedWriteCapacityAutoScalingSettingsUpdate() ) ? Option.create_Some( + AutoScalingSettingsUpdate._typeDescriptor(), ToDafny.AutoScalingSettingsUpdate( nativeValue.provisionedWriteCapacityAutoScalingSettingsUpdate() ) ) - : Option.create_None(); + : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); return new GlobalTableGlobalSecondaryIndexSettingsUpdate( indexName, provisionedWriteCapacityUnits, @@ -3971,64 +4779,86 @@ public static ImportSummary ImportSummary( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option importStatus; importStatus = Objects.nonNull(nativeValue.importStatus()) - ? Option.create_Some(ToDafny.ImportStatus(nativeValue.importStatus())) - : Option.create_None(); + ? Option.create_Some( + ImportStatus._typeDescriptor(), + ToDafny.ImportStatus(nativeValue.importStatus()) + ) + : Option.create_None(ImportStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option s3BucketSource; s3BucketSource = Objects.nonNull(nativeValue.s3BucketSource()) ? Option.create_Some( + S3BucketSource._typeDescriptor(), ToDafny.S3BucketSource(nativeValue.s3BucketSource()) ) - : Option.create_None(); + : Option.create_None(S3BucketSource._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option inputFormat; inputFormat = Objects.nonNull(nativeValue.inputFormat()) - ? Option.create_Some(ToDafny.InputFormat(nativeValue.inputFormat())) - : Option.create_None(); + ? Option.create_Some( + InputFormat._typeDescriptor(), + ToDafny.InputFormat(nativeValue.inputFormat()) + ) + : Option.create_None(InputFormat._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ImportSummary( importArn, importStatus, @@ -4060,141 +4890,187 @@ public static ImportTableDescription ImportTableDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option importStatus; importStatus = Objects.nonNull(nativeValue.importStatus()) - ? Option.create_Some(ToDafny.ImportStatus(nativeValue.importStatus())) - : Option.create_None(); + ? Option.create_Some( + ImportStatus._typeDescriptor(), + ToDafny.ImportStatus(nativeValue.importStatus()) + ) + : Option.create_None(ImportStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option s3BucketSource; s3BucketSource = Objects.nonNull(nativeValue.s3BucketSource()) ? Option.create_Some( + S3BucketSource._typeDescriptor(), ToDafny.S3BucketSource(nativeValue.s3BucketSource()) ) - : Option.create_None(); + : Option.create_None(S3BucketSource._typeDescriptor()); Option errorCount; errorCount = Objects.nonNull(nativeValue.errorCount()) - ? Option.create_Some((nativeValue.errorCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.errorCount())) + : Option.create_None(TypeDescriptor.LONG); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option inputFormat; inputFormat = Objects.nonNull(nativeValue.inputFormat()) - ? Option.create_Some(ToDafny.InputFormat(nativeValue.inputFormat())) - : Option.create_None(); + ? Option.create_Some( + InputFormat._typeDescriptor(), + ToDafny.InputFormat(nativeValue.inputFormat()) + ) + : Option.create_None(InputFormat._typeDescriptor()); Option inputFormatOptions; inputFormatOptions = Objects.nonNull(nativeValue.inputFormatOptions()) ? Option.create_Some( + InputFormatOptions._typeDescriptor(), ToDafny.InputFormatOptions(nativeValue.inputFormatOptions()) ) - : Option.create_None(); + : Option.create_None(InputFormatOptions._typeDescriptor()); Option inputCompressionType; inputCompressionType = Objects.nonNull(nativeValue.inputCompressionType()) ? Option.create_Some( + InputCompressionType._typeDescriptor(), ToDafny.InputCompressionType(nativeValue.inputCompressionType()) ) - : Option.create_None(); + : Option.create_None(InputCompressionType._typeDescriptor()); Option tableCreationParameters; tableCreationParameters = Objects.nonNull(nativeValue.tableCreationParameters()) ? Option.create_Some( + TableCreationParameters._typeDescriptor(), ToDafny.TableCreationParameters(nativeValue.tableCreationParameters()) ) - : Option.create_None(); + : Option.create_None(TableCreationParameters._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option processedSizeBytes; processedSizeBytes = Objects.nonNull(nativeValue.processedSizeBytes()) - ? Option.create_Some((nativeValue.processedSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.processedSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); Option processedItemCount; processedItemCount = Objects.nonNull(nativeValue.processedItemCount()) - ? Option.create_Some((nativeValue.processedItemCount())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.processedItemCount()) + ) + : Option.create_None(TypeDescriptor.LONG); Option importedItemCount; importedItemCount = Objects.nonNull(nativeValue.importedItemCount()) - ? Option.create_Some((nativeValue.importedItemCount())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.importedItemCount()) + ) + : Option.create_None(TypeDescriptor.LONG); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ImportTableDescription( importArn, importStatus, @@ -4225,11 +5101,14 @@ public static ImportTableInput ImportTableInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); S3BucketSource s3BucketSource; s3BucketSource = ToDafny.S3BucketSource(nativeValue.s3BucketSource()); InputFormat inputFormat; @@ -4238,16 +5117,18 @@ public static ImportTableInput ImportTableInput( inputFormatOptions = Objects.nonNull(nativeValue.inputFormatOptions()) ? Option.create_Some( + InputFormatOptions._typeDescriptor(), ToDafny.InputFormatOptions(nativeValue.inputFormatOptions()) ) - : Option.create_None(); + : Option.create_None(InputFormatOptions._typeDescriptor()); Option inputCompressionType; inputCompressionType = Objects.nonNull(nativeValue.inputCompressionType()) ? Option.create_Some( + InputCompressionType._typeDescriptor(), ToDafny.InputCompressionType(nativeValue.inputCompressionType()) ) - : Option.create_None(); + : Option.create_None(InputCompressionType._typeDescriptor()); TableCreationParameters tableCreationParameters; tableCreationParameters = ToDafny.TableCreationParameters(nativeValue.tableCreationParameters()); @@ -4276,8 +5157,11 @@ public static InputFormatOptions InputFormatOptions( Option csv; csv = Objects.nonNull(nativeValue.csv()) - ? Option.create_Some(ToDafny.CsvOptions(nativeValue.csv())) - : Option.create_None(); + ? Option.create_Some( + CsvOptions._typeDescriptor(), + ToDafny.CsvOptions(nativeValue.csv()) + ) + : Option.create_None(CsvOptions._typeDescriptor()); return new InputFormatOptions(csv); } @@ -4310,9 +5194,18 @@ public static ItemCollectionMetrics ItemCollectionMetrics( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); Option< DafnySequence> > sizeEstimateRangeGB; @@ -4320,11 +5213,18 @@ public static ItemCollectionMetrics ItemCollectionMetrics( (Objects.nonNull(nativeValue.sizeEstimateRangeGB()) && nativeValue.sizeEstimateRangeGB().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + ItemCollectionSizeEstimateBound._typeDescriptor() + ), ToDafny.ItemCollectionSizeEstimateRange( nativeValue.sizeEstimateRangeGB() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + ItemCollectionSizeEstimateBound._typeDescriptor() + ) + ); return new ItemCollectionMetrics(itemCollectionKey, sizeEstimateRangeGB); } @@ -4409,8 +5309,27 @@ public static ItemResponse ItemResponse( > item; item = (Objects.nonNull(nativeValue.item()) && nativeValue.item().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.item())) - : Option.create_None(); + ? 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() + ) + ); return new ItemResponse(item); } @@ -4505,23 +5424,36 @@ public static KeysAndAttributes KeysAndAttributes( (Objects.nonNull(nativeValue.attributesToGet()) && nativeValue.attributesToGet().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), ToDafny.AttributeNameList(nativeValue.attributesToGet()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option consistentRead; consistentRead = Objects.nonNull(nativeValue.consistentRead()) - ? Option.create_Some((nativeValue.consistentRead())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.consistentRead()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -4532,11 +5464,20 @@ public static KeysAndAttributes KeysAndAttributes( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new KeysAndAttributes( keys, attributesToGet, @@ -4578,27 +5519,34 @@ public static KinesisDataStreamDestination KinesisDataStreamDestination( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option destinationStatus; destinationStatus = Objects.nonNull(nativeValue.destinationStatus()) ? Option.create_Some( + DestinationStatus._typeDescriptor(), ToDafny.DestinationStatus(nativeValue.destinationStatus()) ) - : Option.create_None(); + : Option.create_None(DestinationStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new KinesisDataStreamDestination( streamArn, destinationStatus, @@ -4639,48 +5587,63 @@ public static ListBackupsInput ListBackupsInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option limit; limit = Objects.nonNull(nativeValue.limit()) - ? Option.create_Some((nativeValue.limit())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) + : Option.create_None(TypeDescriptor.INT); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option backupType; backupType = Objects.nonNull(nativeValue.backupType()) - ? Option.create_Some(ToDafny.BackupTypeFilter(nativeValue.backupType())) - : Option.create_None(); + ? Option.create_Some( + BackupTypeFilter._typeDescriptor(), + ToDafny.BackupTypeFilter(nativeValue.backupType()) + ) + : Option.create_None(BackupTypeFilter._typeDescriptor()); return new ListBackupsInput( tableName, limit, @@ -4699,18 +5662,24 @@ public static ListBackupsOutput ListBackupsOutput( (Objects.nonNull(nativeValue.backupSummaries()) && nativeValue.backupSummaries().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(BackupSummary._typeDescriptor()), ToDafny.BackupSummaries(nativeValue.backupSummaries()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(BackupSummary._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListBackupsOutput(backupSummaries, lastEvaluatedBackupArn); } @@ -4721,25 +5690,31 @@ public static ListContributorInsightsInput ListContributorInsightsInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option maxResults; maxResults = Objects.nonNull(nativeValue.maxResults()) - ? Option.create_Some((nativeValue.maxResults())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.maxResults())) + : Option.create_None(TypeDescriptor.INT); return new ListContributorInsightsInput(tableName, nextToken, maxResults); } @@ -4753,20 +5728,30 @@ public static ListContributorInsightsOutput ListContributorInsightsOutput( (Objects.nonNull(nativeValue.contributorInsightsSummaries()) && nativeValue.contributorInsightsSummaries().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + ContributorInsightsSummary._typeDescriptor() + ), ToDafny.ContributorInsightsSummaries( nativeValue.contributorInsightsSummaries() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + ContributorInsightsSummary._typeDescriptor() + ) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListContributorInsightsOutput( contributorInsightsSummaries, nextToken @@ -4780,25 +5765,31 @@ public static ListExportsInput ListExportsInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option maxResults; maxResults = Objects.nonNull(nativeValue.maxResults()) - ? Option.create_Some((nativeValue.maxResults())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.maxResults())) + : Option.create_None(TypeDescriptor.INT); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListExportsInput(tableArn, maxResults, nextToken); } @@ -4810,18 +5801,24 @@ public static ListExportsOutput ListExportsOutput( (Objects.nonNull(nativeValue.exportSummaries()) && nativeValue.exportSummaries().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(ExportSummary._typeDescriptor()), ToDafny.ExportSummaries(nativeValue.exportSummaries()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(ExportSummary._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListExportsOutput(exportSummaries, nextToken); } @@ -4832,25 +5829,31 @@ public static ListGlobalTablesInput ListGlobalTablesInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option limit; limit = Objects.nonNull(nativeValue.limit()) - ? Option.create_Some((nativeValue.limit())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) + : Option.create_None(TypeDescriptor.INT); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListGlobalTablesInput( exclusiveStartGlobalTableName, limit, @@ -4866,18 +5869,24 @@ public static ListGlobalTablesOutput ListGlobalTablesOutput( (Objects.nonNull(nativeValue.globalTables()) && nativeValue.globalTables().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(GlobalTable._typeDescriptor()), ToDafny.GlobalTableList(nativeValue.globalTables()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(GlobalTable._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListGlobalTablesOutput( globalTables, lastEvaluatedGlobalTableName @@ -4891,25 +5900,31 @@ public static ListImportsInput ListImportsInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option pageSize; pageSize = Objects.nonNull(nativeValue.pageSize()) - ? Option.create_Some((nativeValue.pageSize())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.pageSize())) + : Option.create_None(TypeDescriptor.INT); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListImportsInput(tableArn, pageSize, nextToken); } @@ -4921,18 +5936,24 @@ public static ListImportsOutput ListImportsOutput( (Objects.nonNull(nativeValue.importSummaryList()) && nativeValue.importSummaryList().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(ImportSummary._typeDescriptor()), ToDafny.ImportSummaryList(nativeValue.importSummaryList()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(ImportSummary._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListImportsOutput(importSummaryList, nextToken); } @@ -4941,16 +5962,19 @@ public static ListTablesInput ListTablesInput(ListTablesRequest nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option limit; limit = Objects.nonNull(nativeValue.limit()) - ? Option.create_Some((nativeValue.limit())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.limit())) + : Option.create_None(TypeDescriptor.INT); return new ListTablesInput(exclusiveStartTableName, limit); } @@ -4963,17 +5987,29 @@ public static ListTablesOutput ListTablesOutput( tableNames = (Objects.nonNull(nativeValue.tableNames()) && nativeValue.tableNames().size() > 0) - ? Option.create_Some(ToDafny.TableNameList(nativeValue.tableNames())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), + ToDafny.TableNameList(nativeValue.tableNames()) + ) + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListTablesOutput(tableNames, lastEvaluatedTableName); } @@ -4989,11 +6025,14 @@ public static ListTagsOfResourceInput ListTagsOfResourceInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListTagsOfResourceInput(resourceArn, nextToken); } @@ -5003,17 +6042,25 @@ public static ListTagsOfResourceOutput ListTagsOfResourceOutput( Option> tags; tags = (Objects.nonNull(nativeValue.tags()) && nativeValue.tags().size() > 0) - ? Option.create_Some(ToDafny.TagList(nativeValue.tags())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(Tag._typeDescriptor()), + ToDafny.TagList(nativeValue.tags()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(Tag._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new ListTagsOfResourceOutput(tags, nextToken); } @@ -5039,41 +6086,58 @@ public static LocalSecondaryIndexDescription LocalSecondaryIndexDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option> keySchema; keySchema = (Objects.nonNull(nativeValue.keySchema()) && nativeValue.keySchema().size() > 0) - ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), + ToDafny.KeySchema(nativeValue.keySchema()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) + ); Option projection; projection = Objects.nonNull(nativeValue.projection()) - ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) - : Option.create_None(); + ? Option.create_Some( + Projection._typeDescriptor(), + ToDafny.Projection(nativeValue.projection()) + ) + : Option.create_None(Projection._typeDescriptor()); Option indexSizeBytes; indexSizeBytes = Objects.nonNull(nativeValue.indexSizeBytes()) - ? Option.create_Some((nativeValue.indexSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.indexSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); Option itemCount; itemCount = Objects.nonNull(nativeValue.itemCount()) - ? Option.create_Some((nativeValue.itemCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) + : Option.create_None(TypeDescriptor.LONG); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new LocalSecondaryIndexDescription( indexName, keySchema, @@ -5119,22 +6183,33 @@ public static LocalSecondaryIndexInfo LocalSecondaryIndexInfo( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option> keySchema; keySchema = (Objects.nonNull(nativeValue.keySchema()) && nativeValue.keySchema().size() > 0) - ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), + ToDafny.KeySchema(nativeValue.keySchema()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) + ); Option projection; projection = Objects.nonNull(nativeValue.projection()) - ? Option.create_Some(ToDafny.Projection(nativeValue.projection())) - : Option.create_None(); + ? Option.create_Some( + Projection._typeDescriptor(), + ToDafny.Projection(nativeValue.projection()) + ) + : Option.create_None(Projection._typeDescriptor()); return new LocalSecondaryIndexInfo(indexName, keySchema, projection); } @@ -5201,9 +6276,12 @@ public static ParameterizedStatement ParameterizedStatement( (Objects.nonNull(nativeValue.parameters()) && nativeValue.parameters().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()), ToDafny.PreparedStatementParameters(nativeValue.parameters()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeValue._typeDescriptor()) + ); return new ParameterizedStatement(statement, parameters); } @@ -5256,29 +6334,36 @@ public static PointInTimeRecoveryDescription PointInTimeRecoveryDescription( pointInTimeRecoveryStatus = Objects.nonNull(nativeValue.pointInTimeRecoveryStatus()) ? Option.create_Some( + PointInTimeRecoveryStatus._typeDescriptor(), ToDafny.PointInTimeRecoveryStatus( nativeValue.pointInTimeRecoveryStatus() ) ) - : Option.create_None(); + : Option.create_None(PointInTimeRecoveryStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new PointInTimeRecoveryDescription( pointInTimeRecoveryStatus, earliestRestorableDateTime, @@ -5315,9 +6400,10 @@ public static Projection Projection( projectionType = Objects.nonNull(nativeValue.projectionType()) ? Option.create_Some( + ProjectionType._typeDescriptor(), ToDafny.ProjectionType(nativeValue.projectionType()) ) - : Option.create_None(); + : Option.create_None(ProjectionType._typeDescriptor()); Option< DafnySequence> > nonKeyAttributes; @@ -5325,9 +6411,16 @@ public static Projection Projection( (Objects.nonNull(nativeValue.nonKeyAttributes()) && nativeValue.nonKeyAttributes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ), ToDafny.NonKeyAttributeNameList(nativeValue.nonKeyAttributes()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); return new Projection(projectionType, nonKeyAttributes); } @@ -5348,35 +6441,50 @@ public static ProvisionedThroughputDescription ProvisionedThroughputDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option numberOfDecreasesToday; numberOfDecreasesToday = Objects.nonNull(nativeValue.numberOfDecreasesToday()) - ? Option.create_Some((nativeValue.numberOfDecreasesToday())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.numberOfDecreasesToday()) + ) + : Option.create_None(TypeDescriptor.LONG); Option readCapacityUnits; readCapacityUnits = Objects.nonNull(nativeValue.readCapacityUnits()) - ? Option.create_Some((nativeValue.readCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.readCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); Option writeCapacityUnits; writeCapacityUnits = Objects.nonNull(nativeValue.writeCapacityUnits()) - ? Option.create_Some((nativeValue.writeCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.writeCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); return new ProvisionedThroughputDescription( lastIncreaseDateTime, lastDecreaseDateTime, @@ -5392,8 +6500,11 @@ public static ProvisionedThroughputOverride ProvisionedThroughputOverride( Option readCapacityUnits; readCapacityUnits = Objects.nonNull(nativeValue.readCapacityUnits()) - ? Option.create_Some((nativeValue.readCapacityUnits())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.readCapacityUnits()) + ) + : Option.create_None(TypeDescriptor.LONG); return new ProvisionedThroughputOverride(readCapacityUnits); } @@ -5414,11 +6525,14 @@ public static Put Put( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -5429,11 +6543,20 @@ public static Put Put( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -5444,22 +6567,34 @@ public static Put Put( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); Option< ReturnValuesOnConditionCheckFailure > returnValuesOnConditionCheckFailure; returnValuesOnConditionCheckFailure = Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), ToDafny.ReturnValuesOnConditionCheckFailure( nativeValue.returnValuesOnConditionCheckFailure() ) ) - : Option.create_None(); + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new Put( item, tableName, @@ -5491,46 +6626,64 @@ public static PutItemInput PutItemInput(PutItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + ExpectedAttributeValue._typeDescriptor() + ) + ); Option returnValues; returnValues = Objects.nonNull(nativeValue.returnValues()) - ? Option.create_Some(ToDafny.ReturnValue(nativeValue.returnValues())) - : Option.create_None(); + ? Option.create_Some( + ReturnValue._typeDescriptor(), + ToDafny.ReturnValue(nativeValue.returnValues()) + ) + : Option.create_None(ReturnValue._typeDescriptor()); Option returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option returnItemCollectionMetrics; returnItemCollectionMetrics = Objects.nonNull(nativeValue.returnItemCollectionMetrics()) ? Option.create_Some( + ReturnItemCollectionMetrics._typeDescriptor(), ToDafny.ReturnItemCollectionMetrics( nativeValue.returnItemCollectionMetrics() ) ) - : Option.create_None(); + : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); Option conditionalOperator; conditionalOperator = Objects.nonNull(nativeValue.conditionalOperator()) ? Option.create_Some( + ConditionalOperator._typeDescriptor(), ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) ) - : Option.create_None(); + : Option.create_None(ConditionalOperator._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -5541,11 +6694,20 @@ public static PutItemInput PutItemInput(PutItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -5556,11 +6718,20 @@ public static PutItemInput PutItemInput(PutItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); return new PutItemInput( tableName, item, @@ -5601,22 +6772,43 @@ public static PutItemOutput PutItemOutput(PutItemResponse nativeValue) { attributes = (Objects.nonNull(nativeValue.attributes()) && nativeValue.attributes().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.attributes())) - : Option.create_None(); + ? 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 consumedCapacity; consumedCapacity = Objects.nonNull(nativeValue.consumedCapacity()) ? Option.create_Some( + ConsumedCapacity._typeDescriptor(), ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacity._typeDescriptor()); Option itemCollectionMetrics; itemCollectionMetrics = Objects.nonNull(nativeValue.itemCollectionMetrics()) ? Option.create_Some( + ItemCollectionMetrics._typeDescriptor(), ToDafny.ItemCollectionMetrics(nativeValue.itemCollectionMetrics()) ) - : Option.create_None(); + : Option.create_None(ItemCollectionMetrics._typeDescriptor()); return new PutItemOutput( attributes, consumedCapacity, @@ -5645,16 +6837,22 @@ public static QueryInput QueryInput(QueryRequest nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option select; select = Objects.nonNull(nativeValue.select()) - ? Option.create_Some(ToDafny.Select(nativeValue.select())) - : Option.create_None(); + ? Option.create_Some( + Select._typeDescriptor(), + ToDafny.Select(nativeValue.select()) + ) + : Option.create_None(Select._typeDescriptor()); Option< DafnyMap< ? extends DafnySequence, @@ -6973,16 +8478,26 @@ public static ScanInput ScanInput(ScanRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + Condition._typeDescriptor() + ) + ); Option conditionalOperator; conditionalOperator = Objects.nonNull(nativeValue.conditionalOperator()) ? Option.create_Some( + ConditionalOperator._typeDescriptor(), ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) ) - : Option.create_None(); + : Option.create_None(ConditionalOperator._typeDescriptor()); Option< DafnyMap< ? extends DafnySequence, @@ -6992,43 +8507,69 @@ public static ScanInput ScanInput(ScanRequest nativeValue) { exclusiveStartKey = (Objects.nonNull(nativeValue.exclusiveStartKey()) && nativeValue.exclusiveStartKey().size() > 0) - ? Option.create_Some(ToDafny.Key(nativeValue.exclusiveStartKey())) - : Option.create_None(); + ? 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 returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option totalSegments; totalSegments = Objects.nonNull(nativeValue.totalSegments()) - ? Option.create_Some((nativeValue.totalSegments())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.totalSegments())) + : Option.create_None(TypeDescriptor.INT); Option segment; segment = Objects.nonNull(nativeValue.segment()) - ? Option.create_Some((nativeValue.segment())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.segment())) + : Option.create_None(TypeDescriptor.INT); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -7039,11 +8580,20 @@ public static ScanInput ScanInput(ScanRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -7054,16 +8604,28 @@ public static ScanInput ScanInput(ScanRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); Option consistentRead; consistentRead = Objects.nonNull(nativeValue.consistentRead()) - ? Option.create_Some((nativeValue.consistentRead())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.BOOLEAN, + (nativeValue.consistentRead()) + ) + : Option.create_None(TypeDescriptor.BOOLEAN); return new ScanInput( tableName, indexName, @@ -7095,18 +8657,41 @@ public static ScanOutput ScanOutput(ScanResponse nativeValue) { > items; items = (Objects.nonNull(nativeValue.items()) && nativeValue.items().size() > 0) - ? Option.create_Some(ToDafny.ItemList(nativeValue.items())) - : Option.create_None(); + ? 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 count; count = Objects.nonNull(nativeValue.count()) - ? Option.create_Some((nativeValue.count())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.count())) + : Option.create_None(TypeDescriptor.INT); Option scannedCount; scannedCount = Objects.nonNull(nativeValue.scannedCount()) - ? Option.create_Some((nativeValue.scannedCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.INT, (nativeValue.scannedCount())) + : Option.create_None(TypeDescriptor.INT); Option< DafnyMap< ? extends DafnySequence, @@ -7116,15 +8701,35 @@ public static ScanOutput ScanOutput(ScanResponse nativeValue) { lastEvaluatedKey = (Objects.nonNull(nativeValue.lastEvaluatedKey()) && nativeValue.lastEvaluatedKey().size() > 0) - ? Option.create_Some(ToDafny.Key(nativeValue.lastEvaluatedKey())) - : Option.create_None(); + ? 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 consumedCapacity; consumedCapacity = Objects.nonNull(nativeValue.consumedCapacity()) ? Option.create_Some( + ConsumedCapacity._typeDescriptor(), ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacity._typeDescriptor()); return new ScanOutput( items, count, @@ -7167,16 +8772,22 @@ public static SourceTableDetails SourceTableDetails( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option tableSizeBytes; tableSizeBytes = Objects.nonNull(nativeValue.tableSizeBytes()) - ? Option.create_Some((nativeValue.tableSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.tableSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); DafnySequence keySchema; keySchema = ToDafny.KeySchema(nativeValue.keySchema()); DafnySequence tableCreationDateTime; @@ -7190,13 +8801,16 @@ public static SourceTableDetails SourceTableDetails( Option itemCount; itemCount = Objects.nonNull(nativeValue.itemCount()) - ? Option.create_Some((nativeValue.itemCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) + : Option.create_None(TypeDescriptor.LONG); Option billingMode; billingMode = Objects.nonNull(nativeValue.billingMode()) - ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) - : Option.create_None(); + ? Option.create_Some( + BillingMode._typeDescriptor(), + ToDafny.BillingMode(nativeValue.billingMode()) + ) + : Option.create_None(BillingMode._typeDescriptor()); return new SourceTableDetails( tableName, tableId, @@ -7220,9 +8834,16 @@ public static SourceTableFeatureDetails SourceTableFeatureDetails( (Objects.nonNull(nativeValue.localSecondaryIndexes()) && nativeValue.localSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + LocalSecondaryIndexInfo._typeDescriptor() + ), ToDafny.LocalSecondaryIndexes(nativeValue.localSecondaryIndexes()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + LocalSecondaryIndexInfo._typeDescriptor() + ) + ); Option< DafnySequence > globalSecondaryIndexes; @@ -7230,30 +8851,40 @@ public static SourceTableFeatureDetails SourceTableFeatureDetails( (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && nativeValue.globalSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexInfo._typeDescriptor() + ), ToDafny.GlobalSecondaryIndexes(nativeValue.globalSecondaryIndexes()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexInfo._typeDescriptor() + ) + ); Option streamDescription; streamDescription = Objects.nonNull(nativeValue.streamDescription()) ? Option.create_Some( + StreamSpecification._typeDescriptor(), ToDafny.StreamSpecification(nativeValue.streamDescription()) ) - : Option.create_None(); + : Option.create_None(StreamSpecification._typeDescriptor()); Option timeToLiveDescription; timeToLiveDescription = Objects.nonNull(nativeValue.timeToLiveDescription()) ? Option.create_Some( + TimeToLiveDescription._typeDescriptor(), ToDafny.TimeToLiveDescription(nativeValue.timeToLiveDescription()) ) - : Option.create_None(); + : Option.create_None(TimeToLiveDescription._typeDescriptor()); Option sSEDescription; sSEDescription = Objects.nonNull(nativeValue.sseDescription()) ? Option.create_Some( + SSEDescription._typeDescriptor(), ToDafny.SSEDescription(nativeValue.sseDescription()) ) - : Option.create_None(); + : Option.create_None(SSEDescription._typeDescriptor()); return new SourceTableFeatureDetails( localSecondaryIndexes, globalSecondaryIndexes, @@ -7269,31 +8900,43 @@ public static SSEDescription SSEDescription( Option status; status = Objects.nonNull(nativeValue.status()) - ? Option.create_Some(ToDafny.SSEStatus(nativeValue.status())) - : Option.create_None(); + ? Option.create_Some( + SSEStatus._typeDescriptor(), + ToDafny.SSEStatus(nativeValue.status()) + ) + : Option.create_None(SSEStatus._typeDescriptor()); Option sSEType; sSEType = Objects.nonNull(nativeValue.sseType()) - ? Option.create_Some(ToDafny.SSEType(nativeValue.sseType())) - : Option.create_None(); + ? Option.create_Some( + SSEType._typeDescriptor(), + ToDafny.SSEType(nativeValue.sseType()) + ) + : Option.create_None(SSEType._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new SSEDescription( status, sSEType, @@ -7308,22 +8951,28 @@ public static SSESpecification SSESpecification( Option enabled; enabled = Objects.nonNull(nativeValue.enabled()) - ? Option.create_Some((nativeValue.enabled())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.BOOLEAN, (nativeValue.enabled())) + : Option.create_None(TypeDescriptor.BOOLEAN); Option sSEType; sSEType = Objects.nonNull(nativeValue.sseType()) - ? Option.create_Some(ToDafny.SSEType(nativeValue.sseType())) - : Option.create_None(); + ? Option.create_Some( + SSEType._typeDescriptor(), + ToDafny.SSEType(nativeValue.sseType()) + ) + : Option.create_None(SSEType._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new SSESpecification(enabled, sSEType, kMSMasterKeyId); } @@ -7336,9 +8985,10 @@ public static StreamSpecification StreamSpecification( streamViewType = Objects.nonNull(nativeValue.streamViewType()) ? Option.create_Some( + StreamViewType._typeDescriptor(), ToDafny.StreamViewType(nativeValue.streamViewType()) ) - : Option.create_None(); + : Option.create_None(StreamViewType._typeDescriptor()); return new StreamSpecification(streamEnabled, streamViewType); } @@ -7359,24 +9009,37 @@ public static TableAutoScalingDescription TableAutoScalingDescription( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option tableStatus; tableStatus = Objects.nonNull(nativeValue.tableStatus()) - ? Option.create_Some(ToDafny.TableStatus(nativeValue.tableStatus())) - : Option.create_None(); + ? Option.create_Some( + TableStatus._typeDescriptor(), + ToDafny.TableStatus(nativeValue.tableStatus()) + ) + : Option.create_None(TableStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicaAutoScalingDescription._typeDescriptor() + ) + ); return new TableAutoScalingDescription(tableName, tableStatus, replicas); } @@ -7386,17 +9049,23 @@ public static TableClassSummary TableClassSummary( Option tableClass; tableClass = Objects.nonNull(nativeValue.tableClass()) - ? Option.create_Some(ToDafny.TableClass(nativeValue.tableClass())) - : Option.create_None(); + ? Option.create_Some( + TableClass._typeDescriptor(), + ToDafny.TableClass(nativeValue.tableClass()) + ) + : Option.create_None(TableClass._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new TableClassSummary(tableClass, lastUpdateDateTime); } @@ -7416,22 +9085,27 @@ public static TableCreationParameters TableCreationParameters( Option billingMode; billingMode = Objects.nonNull(nativeValue.billingMode()) - ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) - : Option.create_None(); + ? Option.create_Some( + BillingMode._typeDescriptor(), + ToDafny.BillingMode(nativeValue.billingMode()) + ) + : Option.create_None(BillingMode._typeDescriptor()); Option provisionedThroughput; provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughput._typeDescriptor()); Option sSESpecification; sSESpecification = Objects.nonNull(nativeValue.sseSpecification()) ? Option.create_Some( + SSESpecification._typeDescriptor(), ToDafny.SSESpecification(nativeValue.sseSpecification()) ) - : Option.create_None(); + : Option.create_None(SSESpecification._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexes; @@ -7439,9 +9113,12 @@ public static TableCreationParameters TableCreationParameters( (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && nativeValue.globalSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()), ToDafny.GlobalSecondaryIndexList(nativeValue.globalSecondaryIndexes()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(GlobalSecondaryIndex._typeDescriptor()) + ); return new TableCreationParameters( tableName, attributeDefinitions, @@ -7461,82 +9138,112 @@ public static TableDescription TableDescription( (Objects.nonNull(nativeValue.attributeDefinitions()) && nativeValue.attributeDefinitions().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()), ToDafny.AttributeDefinitions(nativeValue.attributeDefinitions()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option> keySchema; keySchema = (Objects.nonNull(nativeValue.keySchema()) && nativeValue.keySchema().size() > 0) - ? Option.create_Some(ToDafny.KeySchema(nativeValue.keySchema())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()), + ToDafny.KeySchema(nativeValue.keySchema()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(KeySchemaElement._typeDescriptor()) + ); Option tableStatus; tableStatus = Objects.nonNull(nativeValue.tableStatus()) - ? Option.create_Some(ToDafny.TableStatus(nativeValue.tableStatus())) - : Option.create_None(); + ? Option.create_Some( + TableStatus._typeDescriptor(), + ToDafny.TableStatus(nativeValue.tableStatus()) + ) + : Option.create_None(TableStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option provisionedThroughput; provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughputDescription._typeDescriptor(), ToDafny.ProvisionedThroughputDescription( nativeValue.provisionedThroughput() ) ) - : Option.create_None(); + : Option.create_None( + ProvisionedThroughputDescription._typeDescriptor() + ); Option tableSizeBytes; tableSizeBytes = Objects.nonNull(nativeValue.tableSizeBytes()) - ? Option.create_Some((nativeValue.tableSizeBytes())) - : Option.create_None(); + ? Option.create_Some( + TypeDescriptor.LONG, + (nativeValue.tableSizeBytes()) + ) + : Option.create_None(TypeDescriptor.LONG); Option itemCount; itemCount = Objects.nonNull(nativeValue.itemCount()) - ? Option.create_Some((nativeValue.itemCount())) - : Option.create_None(); + ? Option.create_Some(TypeDescriptor.LONG, (nativeValue.itemCount())) + : Option.create_None(TypeDescriptor.LONG); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option billingModeSummary; billingModeSummary = Objects.nonNull(nativeValue.billingModeSummary()) ? Option.create_Some( + BillingModeSummary._typeDescriptor(), ToDafny.BillingModeSummary(nativeValue.billingModeSummary()) ) - : Option.create_None(); + : Option.create_None(BillingModeSummary._typeDescriptor()); Option< DafnySequence > localSecondaryIndexes; @@ -7544,11 +9251,18 @@ public static TableDescription TableDescription( (Objects.nonNull(nativeValue.localSecondaryIndexes()) && nativeValue.localSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + LocalSecondaryIndexDescription._typeDescriptor() + ), ToDafny.LocalSecondaryIndexDescriptionList( nativeValue.localSecondaryIndexes() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + LocalSecondaryIndexDescription._typeDescriptor() + ) + ); Option< DafnySequence > globalSecondaryIndexes; @@ -7556,81 +9270,105 @@ public static TableDescription TableDescription( (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && nativeValue.globalSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexDescription._typeDescriptor() + ), ToDafny.GlobalSecondaryIndexDescriptionList( nativeValue.globalSecondaryIndexes() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexDescription._typeDescriptor() + ) + ); Option streamSpecification; streamSpecification = Objects.nonNull(nativeValue.streamSpecification()) ? Option.create_Some( + StreamSpecification._typeDescriptor(), ToDafny.StreamSpecification(nativeValue.streamSpecification()) ) - : Option.create_None(); + : Option.create_None(StreamSpecification._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(ReplicaDescription._typeDescriptor()) + ); Option restoreSummary; restoreSummary = Objects.nonNull(nativeValue.restoreSummary()) ? Option.create_Some( + RestoreSummary._typeDescriptor(), ToDafny.RestoreSummary(nativeValue.restoreSummary()) ) - : Option.create_None(); + : Option.create_None(RestoreSummary._typeDescriptor()); Option sSEDescription; sSEDescription = Objects.nonNull(nativeValue.sseDescription()) ? Option.create_Some( + SSEDescription._typeDescriptor(), ToDafny.SSEDescription(nativeValue.sseDescription()) ) - : Option.create_None(); + : Option.create_None(SSEDescription._typeDescriptor()); Option archivalSummary; archivalSummary = Objects.nonNull(nativeValue.archivalSummary()) ? Option.create_Some( + ArchivalSummary._typeDescriptor(), ToDafny.ArchivalSummary(nativeValue.archivalSummary()) ) - : Option.create_None(); + : Option.create_None(ArchivalSummary._typeDescriptor()); Option tableClassSummary; tableClassSummary = Objects.nonNull(nativeValue.tableClassSummary()) ? Option.create_Some( + TableClassSummary._typeDescriptor(), ToDafny.TableClassSummary(nativeValue.tableClassSummary()) ) - : Option.create_None(); + : Option.create_None(TableClassSummary._typeDescriptor()); return new TableDescription( attributeDefinitions, tableName, @@ -7723,18 +9461,22 @@ public static TimeToLiveDescription TimeToLiveDescription( timeToLiveStatus = Objects.nonNull(nativeValue.timeToLiveStatus()) ? Option.create_Some( + TimeToLiveStatus._typeDescriptor(), ToDafny.TimeToLiveStatus(nativeValue.timeToLiveStatus()) ) - : Option.create_None(); + : Option.create_None(TimeToLiveStatus._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new TimeToLiveDescription(timeToLiveStatus, attributeName); } @@ -7780,9 +9522,10 @@ public static TransactGetItemsInput TransactGetItemsInput( returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); return new TransactGetItemsInput(transactItems, returnConsumedCapacity); } @@ -7794,15 +9537,23 @@ public static TransactGetItemsOutput TransactGetItemsOutput( (Objects.nonNull(nativeValue.consumedCapacity()) && nativeValue.consumedCapacity().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) + ); Option> responses; responses = (Objects.nonNull(nativeValue.responses()) && nativeValue.responses().size() > 0) - ? Option.create_Some(ToDafny.ItemResponseList(nativeValue.responses())) - : Option.create_None(); + ? Option.create_Some( + DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()), + ToDafny.ItemResponseList(nativeValue.responses()) + ) + : Option.create_None( + DafnySequence._typeDescriptor(ItemResponse._typeDescriptor()) + ); return new TransactGetItemsOutput(consumedCapacity, responses); } @@ -7813,24 +9564,34 @@ public static TransactWriteItem TransactWriteItem( conditionCheck = Objects.nonNull(nativeValue.conditionCheck()) ? Option.create_Some( + ConditionCheck._typeDescriptor(), ToDafny.ConditionCheck(nativeValue.conditionCheck()) ) - : Option.create_None(); + : Option.create_None(ConditionCheck._typeDescriptor()); Option put; put = Objects.nonNull(nativeValue.put()) - ? Option.create_Some(ToDafny.Put(nativeValue.put())) - : Option.create_None(); + ? Option.create_Some( + Put._typeDescriptor(), + ToDafny.Put(nativeValue.put()) + ) + : Option.create_None(Put._typeDescriptor()); Option delete; delete = Objects.nonNull(nativeValue.delete()) - ? Option.create_Some(ToDafny.Delete(nativeValue.delete())) - : Option.create_None(); + ? Option.create_Some( + Delete._typeDescriptor(), + ToDafny.Delete(nativeValue.delete()) + ) + : Option.create_None(Delete._typeDescriptor()); Option update; update = Objects.nonNull(nativeValue.update()) - ? Option.create_Some(ToDafny.Update(nativeValue.update())) - : Option.create_None(); + ? Option.create_Some( + Update._typeDescriptor(), + ToDafny.Update(nativeValue.update()) + ) + : Option.create_None(Update._typeDescriptor()); return new TransactWriteItem(conditionCheck, put, delete, update); } @@ -7857,27 +9618,32 @@ public static TransactWriteItemsInput TransactWriteItemsInput( returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option returnItemCollectionMetrics; returnItemCollectionMetrics = Objects.nonNull(nativeValue.returnItemCollectionMetrics()) ? Option.create_Some( + ReturnItemCollectionMetrics._typeDescriptor(), ToDafny.ReturnItemCollectionMetrics( nativeValue.returnItemCollectionMetrics() ) ) - : Option.create_None(); + : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new TransactWriteItemsInput( transactItems, returnConsumedCapacity, @@ -7894,9 +9660,12 @@ public static TransactWriteItemsOutput TransactWriteItemsOutput( (Objects.nonNull(nativeValue.consumedCapacity()) && nativeValue.consumedCapacity().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()), ToDafny.ConsumedCapacityMultiple(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(ConsumedCapacity._typeDescriptor()) + ); Option< DafnyMap< ? extends DafnySequence, @@ -7907,11 +9676,24 @@ public static TransactWriteItemsOutput TransactWriteItemsOutput( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor( + ItemCollectionMetrics._typeDescriptor() + ) + ) + ); return new TransactWriteItemsOutput( consumedCapacity, itemCollectionMetrics @@ -7953,11 +9735,14 @@ public static Update Update( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -7968,11 +9753,20 @@ public static Update Update( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -7983,22 +9777,34 @@ public static Update Update( (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); Option< ReturnValuesOnConditionCheckFailure > returnValuesOnConditionCheckFailure; returnValuesOnConditionCheckFailure = Objects.nonNull(nativeValue.returnValuesOnConditionCheckFailure()) ? Option.create_Some( + ReturnValuesOnConditionCheckFailure._typeDescriptor(), ToDafny.ReturnValuesOnConditionCheckFailure( nativeValue.returnValuesOnConditionCheckFailure() ) ) - : Option.create_None(); + : Option.create_None( + ReturnValuesOnConditionCheckFailure._typeDescriptor() + ); return new Update( key, updateExpression, @@ -8036,11 +9842,12 @@ public static UpdateContinuousBackupsOutput UpdateContinuousBackupsOutput( continuousBackupsDescription = Objects.nonNull(nativeValue.continuousBackupsDescription()) ? Option.create_Some( + ContinuousBackupsDescription._typeDescriptor(), ToDafny.ContinuousBackupsDescription( nativeValue.continuousBackupsDescription() ) ) - : Option.create_None(); + : Option.create_None(ContinuousBackupsDescription._typeDescriptor()); return new UpdateContinuousBackupsOutput(continuousBackupsDescription); } @@ -8056,11 +9863,14 @@ public static UpdateContributorInsightsInput UpdateContributorInsightsInput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); ContributorInsightsAction contributorInsightsAction; contributorInsightsAction = ToDafny.ContributorInsightsAction( @@ -8080,29 +9890,36 @@ public static UpdateContributorInsightsOutput UpdateContributorInsightsOutput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option contributorInsightsStatus; contributorInsightsStatus = Objects.nonNull(nativeValue.contributorInsightsStatus()) ? Option.create_Some( + ContributorInsightsStatus._typeDescriptor(), ToDafny.ContributorInsightsStatus( nativeValue.contributorInsightsStatus() ) ) - : Option.create_None(); + : Option.create_None(ContributorInsightsStatus._typeDescriptor()); return new UpdateContributorInsightsOutput( tableName, indexName, @@ -8147,9 +9964,10 @@ public static UpdateGlobalTableOutput UpdateGlobalTableOutput( globalTableDescription = Objects.nonNull(nativeValue.globalTableDescription()) ? Option.create_Some( + GlobalTableDescription._typeDescriptor(), ToDafny.GlobalTableDescription(nativeValue.globalTableDescription()) ) - : Option.create_None(); + : Option.create_None(GlobalTableDescription._typeDescriptor()); return new UpdateGlobalTableOutput(globalTableDescription); } @@ -8165,16 +9983,18 @@ public static UpdateGlobalTableSettingsInput UpdateGlobalTableSettingsInput( globalTableBillingMode = Objects.nonNull(nativeValue.globalTableBillingMode()) ? Option.create_Some( + BillingMode._typeDescriptor(), ToDafny.BillingMode(nativeValue.globalTableBillingMode()) ) - : Option.create_None(); + : Option.create_None(BillingMode._typeDescriptor()); Option globalTableProvisionedWriteCapacityUnits; globalTableProvisionedWriteCapacityUnits = Objects.nonNull(nativeValue.globalTableProvisionedWriteCapacityUnits()) ? Option.create_Some( + TypeDescriptor.LONG, (nativeValue.globalTableProvisionedWriteCapacityUnits()) ) - : Option.create_None(); + : Option.create_None(TypeDescriptor.LONG); Option< AutoScalingSettingsUpdate > globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate; @@ -8183,11 +10003,12 @@ public static UpdateGlobalTableSettingsInput UpdateGlobalTableSettingsInput( nativeValue.globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate() ) ? Option.create_Some( + AutoScalingSettingsUpdate._typeDescriptor(), ToDafny.AutoScalingSettingsUpdate( nativeValue.globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate() ) ) - : Option.create_None(); + : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); Option< DafnySequence > globalTableGlobalSecondaryIndexSettingsUpdate; @@ -8198,11 +10019,18 @@ public static UpdateGlobalTableSettingsInput UpdateGlobalTableSettingsInput( nativeValue.globalTableGlobalSecondaryIndexSettingsUpdate().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + GlobalTableGlobalSecondaryIndexSettingsUpdate._typeDescriptor() + ), ToDafny.GlobalTableGlobalSecondaryIndexSettingsUpdateList( nativeValue.globalTableGlobalSecondaryIndexSettingsUpdate() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + GlobalTableGlobalSecondaryIndexSettingsUpdate._typeDescriptor() + ) + ); Option< DafnySequence > replicaSettingsUpdate; @@ -8210,9 +10038,14 @@ public static UpdateGlobalTableSettingsInput UpdateGlobalTableSettingsInput( (Objects.nonNull(nativeValue.replicaSettingsUpdate()) && nativeValue.replicaSettingsUpdate().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + ReplicaSettingsUpdate._typeDescriptor() + ), ToDafny.ReplicaSettingsUpdateList(nativeValue.replicaSettingsUpdate()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(ReplicaSettingsUpdate._typeDescriptor()) + ); return new UpdateGlobalTableSettingsInput( globalTableName, globalTableBillingMode, @@ -8230,19 +10063,29 @@ public static UpdateGlobalTableSettingsOutput UpdateGlobalTableSettingsOutput( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicaSettingsDescription._typeDescriptor() + ) + ); return new UpdateGlobalTableSettingsOutput( globalTableName, replicaSettings @@ -8270,9 +10113,18 @@ public static UpdateItemInput UpdateItemInput(UpdateItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValueUpdate._typeDescriptor() + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -8283,55 +10135,76 @@ public static UpdateItemInput UpdateItemInput(UpdateItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + ExpectedAttributeValue._typeDescriptor() + ) + ); Option conditionalOperator; conditionalOperator = Objects.nonNull(nativeValue.conditionalOperator()) ? Option.create_Some( + ConditionalOperator._typeDescriptor(), ToDafny.ConditionalOperator(nativeValue.conditionalOperator()) ) - : Option.create_None(); + : Option.create_None(ConditionalOperator._typeDescriptor()); Option returnValues; returnValues = Objects.nonNull(nativeValue.returnValues()) - ? Option.create_Some(ToDafny.ReturnValue(nativeValue.returnValues())) - : Option.create_None(); + ? Option.create_Some( + ReturnValue._typeDescriptor(), + ToDafny.ReturnValue(nativeValue.returnValues()) + ) + : Option.create_None(ReturnValue._typeDescriptor()); Option returnConsumedCapacity; returnConsumedCapacity = Objects.nonNull(nativeValue.returnConsumedCapacity()) ? Option.create_Some( + ReturnConsumedCapacity._typeDescriptor(), ToDafny.ReturnConsumedCapacity(nativeValue.returnConsumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ReturnConsumedCapacity._typeDescriptor()); Option returnItemCollectionMetrics; returnItemCollectionMetrics = Objects.nonNull(nativeValue.returnItemCollectionMetrics()) ? Option.create_Some( + ReturnItemCollectionMetrics._typeDescriptor(), ToDafny.ReturnItemCollectionMetrics( nativeValue.returnItemCollectionMetrics() ) ) - : Option.create_None(); + : Option.create_None(ReturnItemCollectionMetrics._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option< DafnyMap< ? extends DafnySequence, @@ -8342,11 +10215,20 @@ public static UpdateItemInput UpdateItemInput(UpdateItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ) + ); Option< DafnyMap< ? extends DafnySequence, @@ -8357,11 +10239,20 @@ public static UpdateItemInput UpdateItemInput(UpdateItemRequest nativeValue) { (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(); + : Option.create_None( + DafnyMap._typeDescriptor( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR), + AttributeValue._typeDescriptor() + ) + ); return new UpdateItemInput( tableName, key, @@ -8390,22 +10281,43 @@ public static UpdateItemOutput UpdateItemOutput( attributes = (Objects.nonNull(nativeValue.attributes()) && nativeValue.attributes().size() > 0) - ? Option.create_Some(ToDafny.AttributeMap(nativeValue.attributes())) - : Option.create_None(); + ? 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 consumedCapacity; consumedCapacity = Objects.nonNull(nativeValue.consumedCapacity()) ? Option.create_Some( + ConsumedCapacity._typeDescriptor(), ToDafny.ConsumedCapacity(nativeValue.consumedCapacity()) ) - : Option.create_None(); + : Option.create_None(ConsumedCapacity._typeDescriptor()); Option itemCollectionMetrics; itemCollectionMetrics = Objects.nonNull(nativeValue.itemCollectionMetrics()) ? Option.create_Some( + ItemCollectionMetrics._typeDescriptor(), ToDafny.ItemCollectionMetrics(nativeValue.itemCollectionMetrics()) ) - : Option.create_None(); + : Option.create_None(ItemCollectionMetrics._typeDescriptor()); return new UpdateItemOutput( attributes, consumedCapacity, @@ -8425,20 +10337,24 @@ public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAct 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); Option provisionedThroughputOverride; provisionedThroughputOverride = Objects.nonNull(nativeValue.provisionedThroughputOverride()) ? Option.create_Some( + ProvisionedThroughputOverride._typeDescriptor(), ToDafny.ProvisionedThroughputOverride( nativeValue.provisionedThroughputOverride() ) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughputOverride._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexes; @@ -8446,18 +10362,26 @@ public static UpdateReplicationGroupMemberAction UpdateReplicationGroupMemberAct (Objects.nonNull(nativeValue.globalSecondaryIndexes()) && nativeValue.globalSecondaryIndexes().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + ReplicaGlobalSecondaryIndex._typeDescriptor() + ), ToDafny.ReplicaGlobalSecondaryIndexList( nativeValue.globalSecondaryIndexes() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicaGlobalSecondaryIndex._typeDescriptor() + ) + ); Option tableClassOverride; tableClassOverride = Objects.nonNull(nativeValue.tableClassOverride()) ? Option.create_Some( + TableClass._typeDescriptor(), ToDafny.TableClass(nativeValue.tableClassOverride()) ) - : Option.create_None(); + : Option.create_None(TableClass._typeDescriptor()); return new UpdateReplicationGroupMemberAction( regionName, kMSMasterKeyId, @@ -8475,9 +10399,12 @@ public static UpdateTableInput UpdateTableInput( (Objects.nonNull(nativeValue.attributeDefinitions()) && nativeValue.attributeDefinitions().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()), ToDafny.AttributeDefinitions(nativeValue.attributeDefinitions()) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor(AttributeDefinition._typeDescriptor()) + ); DafnySequence tableName; tableName = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( @@ -8486,15 +10413,19 @@ public static UpdateTableInput UpdateTableInput( Option billingMode; billingMode = Objects.nonNull(nativeValue.billingMode()) - ? Option.create_Some(ToDafny.BillingMode(nativeValue.billingMode())) - : Option.create_None(); + ? Option.create_Some( + BillingMode._typeDescriptor(), + ToDafny.BillingMode(nativeValue.billingMode()) + ) + : Option.create_None(BillingMode._typeDescriptor()); Option provisionedThroughput; provisionedThroughput = Objects.nonNull(nativeValue.provisionedThroughput()) ? Option.create_Some( + ProvisionedThroughput._typeDescriptor(), ToDafny.ProvisionedThroughput(nativeValue.provisionedThroughput()) ) - : Option.create_None(); + : Option.create_None(ProvisionedThroughput._typeDescriptor()); Option< DafnySequence > globalSecondaryIndexUpdates; @@ -8502,38 +10433,57 @@ public static UpdateTableInput UpdateTableInput( (Objects.nonNull(nativeValue.globalSecondaryIndexUpdates()) && nativeValue.globalSecondaryIndexUpdates().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexUpdate._typeDescriptor() + ), ToDafny.GlobalSecondaryIndexUpdateList( nativeValue.globalSecondaryIndexUpdates() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexUpdate._typeDescriptor() + ) + ); Option streamSpecification; streamSpecification = Objects.nonNull(nativeValue.streamSpecification()) ? Option.create_Some( + StreamSpecification._typeDescriptor(), ToDafny.StreamSpecification(nativeValue.streamSpecification()) ) - : Option.create_None(); + : Option.create_None(StreamSpecification._typeDescriptor()); Option sSESpecification; sSESpecification = Objects.nonNull(nativeValue.sseSpecification()) ? Option.create_Some( + SSESpecification._typeDescriptor(), ToDafny.SSESpecification(nativeValue.sseSpecification()) ) - : Option.create_None(); + : Option.create_None(SSESpecification._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicationGroupUpdate._typeDescriptor() + ) + ); Option tableClass; tableClass = Objects.nonNull(nativeValue.tableClass()) - ? Option.create_Some(ToDafny.TableClass(nativeValue.tableClass())) - : Option.create_None(); + ? Option.create_Some( + TableClass._typeDescriptor(), + ToDafny.TableClass(nativeValue.tableClass()) + ) + : Option.create_None(TableClass._typeDescriptor()); return new UpdateTableInput( attributeDefinitions, tableName, @@ -8554,9 +10504,10 @@ public static UpdateTableOutput UpdateTableOutput( tableDescription = Objects.nonNull(nativeValue.tableDescription()) ? Option.create_Some( + TableDescription._typeDescriptor(), ToDafny.TableDescription(nativeValue.tableDescription()) ) - : Option.create_None(); + : Option.create_None(TableDescription._typeDescriptor()); return new UpdateTableOutput(tableDescription); } @@ -8570,11 +10521,18 @@ public static UpdateTableReplicaAutoScalingInput UpdateTableReplicaAutoScalingIn (Objects.nonNull(nativeValue.globalSecondaryIndexUpdates()) && nativeValue.globalSecondaryIndexUpdates().size() > 0) ? Option.create_Some( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexAutoScalingUpdate._typeDescriptor() + ), ToDafny.GlobalSecondaryIndexAutoScalingUpdateList( nativeValue.globalSecondaryIndexUpdates() ) ) - : Option.create_None(); + : Option.create_None( + DafnySequence._typeDescriptor( + GlobalSecondaryIndexAutoScalingUpdate._typeDescriptor() + ) + ); DafnySequence tableName; tableName = software.amazon.smithy.dafny.conversion.ToDafny.Simple.CharacterSequence( @@ -8584,19 +10542,27 @@ public static UpdateTableReplicaAutoScalingInput UpdateTableReplicaAutoScalingIn provisionedWriteCapacityAutoScalingUpdate = Objects.nonNull(nativeValue.provisionedWriteCapacityAutoScalingUpdate()) ? Option.create_Some( + AutoScalingSettingsUpdate._typeDescriptor(), ToDafny.AutoScalingSettingsUpdate( nativeValue.provisionedWriteCapacityAutoScalingUpdate() ) ) - : Option.create_None(); + : Option.create_None(AutoScalingSettingsUpdate._typeDescriptor()); 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(); + : Option.create_None( + DafnySequence._typeDescriptor( + ReplicaAutoScalingUpdate._typeDescriptor() + ) + ); return new UpdateTableReplicaAutoScalingInput( globalSecondaryIndexUpdates, tableName, @@ -8612,11 +10578,12 @@ public static UpdateTableReplicaAutoScalingOutput UpdateTableReplicaAutoScalingO tableAutoScalingDescription = Objects.nonNull(nativeValue.tableAutoScalingDescription()) ? Option.create_Some( + TableAutoScalingDescription._typeDescriptor(), ToDafny.TableAutoScalingDescription( nativeValue.tableAutoScalingDescription() ) ) - : Option.create_None(); + : Option.create_None(TableAutoScalingDescription._typeDescriptor()); return new UpdateTableReplicaAutoScalingOutput(tableAutoScalingDescription); } @@ -8641,9 +10608,10 @@ public static UpdateTimeToLiveOutput UpdateTimeToLiveOutput( timeToLiveSpecification = Objects.nonNull(nativeValue.timeToLiveSpecification()) ? Option.create_Some( + TimeToLiveSpecification._typeDescriptor(), ToDafny.TimeToLiveSpecification(nativeValue.timeToLiveSpecification()) ) - : Option.create_None(); + : Option.create_None(TimeToLiveSpecification._typeDescriptor()); return new UpdateTimeToLiveOutput(timeToLiveSpecification); } @@ -8653,13 +10621,19 @@ public static WriteRequest WriteRequest( Option putRequest; putRequest = Objects.nonNull(nativeValue.putRequest()) - ? Option.create_Some(ToDafny.PutRequest(nativeValue.putRequest())) - : Option.create_None(); + ? Option.create_Some( + PutRequest._typeDescriptor(), + ToDafny.PutRequest(nativeValue.putRequest()) + ) + : Option.create_None(PutRequest._typeDescriptor()); Option deleteRequest; deleteRequest = Objects.nonNull(nativeValue.deleteRequest()) - ? Option.create_Some(ToDafny.DeleteRequest(nativeValue.deleteRequest())) - : Option.create_None(); + ? Option.create_Some( + DeleteRequest._typeDescriptor(), + ToDafny.DeleteRequest(nativeValue.deleteRequest()) + ) + : Option.create_None(DeleteRequest._typeDescriptor()); return new WriteRequest(putRequest, deleteRequest); } @@ -8680,11 +10654,14 @@ public static Error Error(BackupInUseException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_BackupInUseException(message); } @@ -8693,11 +10670,14 @@ public static Error Error(BackupNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_BackupNotFoundException(message); } @@ -8706,11 +10686,14 @@ public static Error Error(ConditionalCheckFailedException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ConditionalCheckFailedException(message); } @@ -8719,11 +10702,14 @@ public static Error Error(ContinuousBackupsUnavailableException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ContinuousBackupsUnavailableException(message); } @@ -8732,11 +10718,14 @@ public static Error Error(DuplicateItemException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_DuplicateItemException(message); } @@ -8745,11 +10734,14 @@ public static Error Error(ExportConflictException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ExportConflictException(message); } @@ -8758,11 +10750,14 @@ public static Error Error(ExportNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ExportNotFoundException(message); } @@ -8771,11 +10766,14 @@ public static Error Error(GlobalTableAlreadyExistsException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_GlobalTableAlreadyExistsException(message); } @@ -8784,11 +10782,14 @@ public static Error Error(GlobalTableNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_GlobalTableNotFoundException(message); } @@ -8797,11 +10798,14 @@ public static Error Error(IdempotentParameterMismatchException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_IdempotentParameterMismatchException(message); } @@ -8810,11 +10814,14 @@ public static Error Error(ImportConflictException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ImportConflictException(message); } @@ -8823,11 +10830,14 @@ public static Error Error(ImportNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ImportNotFoundException(message); } @@ -8836,11 +10846,14 @@ public static Error Error(IndexNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_IndexNotFoundException(message); } @@ -8849,11 +10862,14 @@ public static Error Error(InternalServerErrorException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_InternalServerError(message); } @@ -8862,11 +10878,14 @@ public static Error Error(InvalidExportTimeException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_InvalidExportTimeException(message); } @@ -8875,11 +10894,14 @@ public static Error Error(InvalidRestoreTimeException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_InvalidRestoreTimeException(message); } @@ -8890,11 +10912,14 @@ public static Error Error( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ItemCollectionSizeLimitExceededException(message); } @@ -8903,11 +10928,14 @@ public static Error Error(LimitExceededException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_LimitExceededException(message); } @@ -8918,11 +10946,14 @@ public static Error Error( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_PointInTimeRecoveryUnavailableException(message); } @@ -8933,11 +10964,14 @@ public static Error Error( 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ProvisionedThroughputExceededException(message); } @@ -8946,11 +10980,14 @@ public static Error Error(ReplicaAlreadyExistsException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ReplicaAlreadyExistsException(message); } @@ -8959,11 +10996,14 @@ public static Error Error(ReplicaNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ReplicaNotFoundException(message); } @@ -8972,11 +11012,14 @@ public static Error Error(RequestLimitExceededException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_RequestLimitExceeded(message); } @@ -8985,11 +11028,14 @@ public static Error Error(ResourceInUseException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ResourceInUseException(message); } @@ -8998,11 +11044,14 @@ public static Error Error(ResourceNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_ResourceNotFoundException(message); } @@ -9011,11 +11060,14 @@ public static Error Error(TableAlreadyExistsException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_TableAlreadyExistsException(message); } @@ -9024,11 +11076,14 @@ public static Error Error(TableInUseException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_TableInUseException(message); } @@ -9037,11 +11092,14 @@ public static Error Error(TableNotFoundException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_TableNotFoundException(message); } @@ -9050,19 +11108,25 @@ public static Error Error(TransactionCanceledException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); 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(); + : Option.create_None( + DafnySequence._typeDescriptor(CancellationReason._typeDescriptor()) + ); return new Error_TransactionCanceledException(message, cancellationReasons); } @@ -9071,11 +11135,14 @@ public static Error Error(TransactionConflictException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_TransactionConflictException(message); } @@ -9084,11 +11151,14 @@ public static Error Error(TransactionInProgressException nativeValue) { 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(); + : Option.create_None( + DafnySequence._typeDescriptor(TypeDescriptor.CHAR) + ); return new Error_TransactionInProgressException(message); } 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 3964b7cb1..89e444e05 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 @@ -8175,8 +8175,6 @@ public static RuntimeException Error(Error_Opaque dafnyValue) { } 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", diff --git a/ComAmazonawsDynamodb/runtimes/net/ComAmazonawsDynamodb.csproj b/ComAmazonawsDynamodb/runtimes/net/ComAmazonawsDynamodb.csproj index e2f624fdd..cdbcaa302 100644 --- a/ComAmazonawsDynamodb/runtimes/net/ComAmazonawsDynamodb.csproj +++ b/ComAmazonawsDynamodb/runtimes/net/ComAmazonawsDynamodb.csproj @@ -57,7 +57,7 @@ - + diff --git a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs index 76f8023e9..9f375b21c 100644 --- a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs +++ b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs @@ -7,6 +7,10 @@ namespace Com.Amazonaws.Dynamodb { public static class TypeConversion { + private const string ISO8601DateFormat = "yyyy-MM-dd\\THH:mm:ss.fff\\Z"; + + private const string ISO8601DateFormatNoMS = "yyyy-MM-dd\\THH:mm:ss\\Z"; + public static Amazon.DynamoDBv2.AttributeAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_AttributeAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeAction value) { if (value.is_ADD) return Amazon.DynamoDBv2.AttributeAction.ADD; @@ -1316,8 +1320,6 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_InternalServerError__M7_message(var_message) ); } - - public static Amazon.DynamoDBv2.Model.InvalidExportTimeException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_InvalidExportTimeException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidExportTimeException value) { return new Amazon.DynamoDBv2.Model.InvalidExportTimeException( @@ -5845,15 +5847,13 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_LastUpdateDateTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_LastUpdateDateTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -6125,15 +6125,13 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ExportTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ExportTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -6253,29 +6251,25 @@ public static int ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupsInputLim } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeLowerBound(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeLowerBound(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeUpperBound(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TimeRangeUpperBound(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -6455,15 +6449,13 @@ public static int ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Integer(int valu } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -8194,15 +8186,13 @@ public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_BackupSizeByte } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -8604,29 +8594,25 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportStartTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportStartTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportEndTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportEndTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -8713,29 +8699,25 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ImportStartTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ImportStartTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportEndTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportEndTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } @@ -10539,15 +10521,13 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } diff --git a/ComAmazonawsKms/.gitignore b/ComAmazonawsKms/.gitignore index 3dae39a02..451658ffc 100644 --- a/ComAmazonawsKms/.gitignore +++ b/ComAmazonawsKms/.gitignore @@ -1,6 +1,8 @@ TestResults ImplementationFromDafny.cs TestsFromDafny.cs +ImplementationFromDafny-cs.dtr +TestsFromDafny-cs.dtr **/bin **/obj diff --git a/ComAmazonawsKms/Makefile b/ComAmazonawsKms/Makefile index 3e66f4dc1..3b9d392b6 100644 --- a/ComAmazonawsKms/Makefile +++ b/ComAmazonawsKms/Makefile @@ -13,3 +13,4 @@ MAX_RESOURCE_COUNT=10000000 AWS_SDK_CMD := --aws-sdk STD_LIBRARY=StandardLibrary SMITHY_DEPS=model + diff --git a/ComAmazonawsKms/codegen-patches/dotnet/dafny-4.8.0.patch b/ComAmazonawsKms/codegen-patches/dotnet/dafny-4.8.0.patch new file mode 100644 index 000000000..2cd90de49 --- /dev/null +++ b/ComAmazonawsKms/codegen-patches/dotnet/dafny-4.8.0.patch @@ -0,0 +1,13 @@ +diff --git a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs +index f479e07b..46aff0c7 100644 +--- a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs ++++ b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs +@@ -5510,7 +5510,7 @@ namespace Com.Amazonaws.Kms + public static System.DateTime FromDafny_N3_com__N9_amazonaws__N3_kms__S8_DateType(Dafny.ISequence value) + { + string timestampString = new string(value.Elements); +- return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }, System.Globalization.CultureInfo.InvariantCulture); ++ return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); + + } + public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S8_DateType(System.DateTime value) diff --git a/ComAmazonawsKms/codegen-patches/java/dafny-4.8.0.patch b/ComAmazonawsKms/codegen-patches/java/dafny-4.8.0.patch new file mode 100644 index 000000000..5561d5337 --- /dev/null +++ b/ComAmazonawsKms/codegen-patches/java/dafny-4.8.0.patch @@ -0,0 +1,4757 @@ +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 5e894e4e..9d02d333 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 +@@ -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 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 e8eddd3c..399865e7 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 +@@ -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(); + } diff --git a/ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch b/ComAmazonawsKms/dafny-4.2.0.patch similarity index 96% rename from ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch rename to ComAmazonawsKms/dafny-4.2.0.patch index 0c4751be4..e18a7090f 100644 --- a/ComAmazonawsKms/codegen-patches/java/dafny-4.2.0.patch +++ b/ComAmazonawsKms/dafny-4.2.0.patch @@ -251,12 +251,3 @@ index e8eddd3c..59df5196 100644 public static KmsClient TrentService(IKMSClient dafnyValue) { return ((Shim) dafnyValue).impl(); } -@@ -4557,6 +4747,8 @@ public class ToNative { - } 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", diff --git a/ComAmazonawsKms/project.properties b/ComAmazonawsKms/project.properties index b35126df6..02e193a7d 100644 --- a/ComAmazonawsKms/project.properties +++ b/ComAmazonawsKms/project.properties @@ -1,4 +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 +dafnyVersion=4.8.0 +dafnyRuntimeJavaVersion=4.8.0 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 946ba4d3d..1b6da0262 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 @@ -179,21 +179,53 @@ public Result CancelKeyDeletion( _impl.cancelKeyDeletion(converted); CancelKeyDeletionResponse dafnyResponse = ToDafny.CancelKeyDeletionResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CancelKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -208,21 +240,53 @@ public Result ConnectCustomKeyStore( _impl.connectCustomKeyStore(converted); ConnectCustomKeyStoreResponse dafnyResponse = ToDafny.ConnectCustomKeyStoreResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CloudHsmClusterInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterNotActiveException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ConnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -232,25 +296,65 @@ public Result CreateAlias(CreateAliasRequest input) { ToNative.CreateAliasRequest(input); try { _impl.createAlias(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (AlreadyExistsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidAliasNameException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -265,45 +369,125 @@ public Result CreateCustomKeyStore( _impl.createCustomKeyStore(converted); CreateCustomKeyStoreResponse dafnyResponse = ToDafny.CreateCustomKeyStoreResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CloudHsmClusterInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterNotActiveException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNameInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (IncorrectTrustAnchorException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyIncorrectAuthenticationCredentialException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyInvalidResponseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyUriEndpointInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyUriInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyUriUnreachableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyVpcEndpointServiceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyVpcEndpointServiceInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyVpcEndpointServiceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -317,29 +501,77 @@ public Result CreateGrant( software.amazon.awssdk.services.kms.model.CreateGrantResponse result = _impl.createGrant(converted); CreateGrantResponse dafnyResponse = ToDafny.CreateGrantResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateGrantResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -351,37 +583,101 @@ public Result CreateKey(CreateKeyRequest input) { software.amazon.awssdk.services.kms.model.CreateKeyResponse result = _impl.createKey(converted); CreateKeyResponse dafnyResponse = ToDafny.CreateKeyResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CloudHsmClusterInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (MalformedPolicyDocumentException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TagException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksKeyAlreadyInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksKeyInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksKeyNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + CreateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -393,33 +689,89 @@ public Result Decrypt(DecryptRequest input) { software.amazon.awssdk.services.kms.model.DecryptResponse result = _impl.decrypt(converted); DecryptResponse dafnyResponse = ToDafny.DecryptResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (IncorrectKeyException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidCiphertextException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DecryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -429,19 +781,47 @@ public Result DeleteAlias(DeleteAliasRequest input) { ToNative.DeleteAliasRequest(input); try { _impl.deleteAlias(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -456,19 +836,47 @@ public Result DeleteCustomKeyStore( _impl.deleteCustomKeyStore(converted); DeleteCustomKeyStoreResponse dafnyResponse = ToDafny.DeleteCustomKeyStoreResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CustomKeyStoreHasCmKsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeleteCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -480,23 +888,59 @@ public Result DeleteImportedKeyMaterial( ToNative.DeleteImportedKeyMaterialRequest(input); try { _impl.deleteImportedKeyMaterial(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -511,29 +955,77 @@ public Result DeriveSharedSecret( _impl.deriveSharedSecret(converted); DeriveSharedSecretResponse dafnyResponse = ToDafny.DeriveSharedSecretResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DeriveSharedSecretResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -548,17 +1040,41 @@ public Result DescribeCustomKeyStores( _impl.describeCustomKeyStores(converted); DescribeCustomKeyStoresResponse dafnyResponse = ToDafny.DescribeCustomKeyStoresResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeCustomKeyStoresResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeCustomKeyStoresResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidMarkerException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeCustomKeyStoresResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeCustomKeyStoresResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeCustomKeyStoresResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeCustomKeyStoresResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -572,19 +1088,47 @@ public Result DescribeKey( software.amazon.awssdk.services.kms.model.DescribeKeyResponse result = _impl.describeKey(converted); DescribeKeyResponse dafnyResponse = ToDafny.DescribeKeyResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DescribeKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -594,21 +1138,53 @@ public Result DisableKey(DisableKeyRequest input) { ToNative.DisableKeyRequest(input); try { _impl.disableKey(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -620,25 +1196,65 @@ public Result DisableKeyRotation( ToNative.DisableKeyRotationRequest(input); try { _impl.disableKeyRotation(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -654,17 +1270,41 @@ > DisconnectCustomKeyStore(DisconnectCustomKeyStoreRequest input) { _impl.disconnectCustomKeyStore(converted); DisconnectCustomKeyStoreResponse dafnyResponse = ToDafny.DisconnectCustomKeyStoreResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + DisconnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CustomKeyStoreInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisconnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisconnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisconnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisconnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + DisconnectCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -674,23 +1314,59 @@ public Result EnableKey(EnableKeyRequest input) { ToNative.EnableKeyRequest(input); try { _impl.enableKey(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -702,25 +1378,65 @@ public Result EnableKeyRotation( ToNative.EnableKeyRotationRequest(input); try { _impl.enableKeyRotation(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -732,29 +1448,77 @@ public Result Encrypt(EncryptRequest input) { software.amazon.awssdk.services.kms.model.EncryptResponse result = _impl.encrypt(converted); EncryptResponse dafnyResponse = ToDafny.EncryptResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + EncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -770,29 +1534,77 @@ public Result GenerateDataKey( GenerateDataKeyResponse dafnyResponse = ToDafny.GenerateDataKeyResponse( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -807,31 +1619,83 @@ public Result GenerateDataKeyPair( _impl.generateDataKeyPair(converted); GenerateDataKeyPairResponse dafnyResponse = ToDafny.GenerateDataKeyPairResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -849,31 +1713,83 @@ > GenerateDataKeyPairWithoutPlaintext( _impl.generateDataKeyPairWithoutPlaintext(converted); GenerateDataKeyPairWithoutPlaintextResponse dafnyResponse = ToDafny.GenerateDataKeyPairWithoutPlaintextResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyPairWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -891,29 +1807,77 @@ > GenerateDataKeyWithoutPlaintext( _impl.generateDataKeyWithoutPlaintext(converted); GenerateDataKeyWithoutPlaintextResponse dafnyResponse = ToDafny.GenerateDataKeyWithoutPlaintextResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateDataKeyWithoutPlaintextResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -927,27 +1891,71 @@ public Result GenerateMac( software.amazon.awssdk.services.kms.model.GenerateMacResponse result = _impl.generateMac(converted); GenerateMacResponse dafnyResponse = ToDafny.GenerateMacResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -963,21 +1971,53 @@ public Result GenerateRandom( GenerateRandomResponse dafnyResponse = ToDafny.GenerateRandomResponse( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CustomKeyStoreInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GenerateRandomResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -991,21 +2031,53 @@ public Result GetKeyPolicy( software.amazon.awssdk.services.kms.model.GetKeyPolicyResponse result = _impl.getKeyPolicy(converted); GetKeyPolicyResponse dafnyResponse = ToDafny.GetKeyPolicyResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyPolicyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1020,23 +2092,59 @@ public Result GetKeyRotationStatus( _impl.getKeyRotationStatus(converted); GetKeyRotationStatusResponse dafnyResponse = ToDafny.GetKeyRotationStatusResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetKeyRotationStatusResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1051,23 +2159,59 @@ public Result GetParametersForImport( _impl.getParametersForImport(converted); GetParametersForImportResponse dafnyResponse = ToDafny.GetParametersForImportResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetParametersForImportResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1081,31 +2225,83 @@ public Result GetPublicKey( software.amazon.awssdk.services.kms.model.GetPublicKeyResponse result = _impl.getPublicKey(converted); GetPublicKeyResponse dafnyResponse = ToDafny.GetPublicKeyResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + GetPublicKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1120,31 +2316,83 @@ public Result ImportKeyMaterial( _impl.importKeyMaterial(converted); ImportKeyMaterialResponse dafnyResponse = ToDafny.ImportKeyMaterialResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (ExpiredImportTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (IncorrectKeyMaterialException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidCiphertextException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidImportTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ImportKeyMaterialResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1158,21 +2406,53 @@ public Result ListAliases( software.amazon.awssdk.services.kms.model.ListAliasesResponse result = _impl.listAliases(converted); ListAliasesResponse dafnyResponse = ToDafny.ListAliasesResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidMarkerException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListAliasesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1184,25 +2464,65 @@ public Result ListGrants(ListGrantsRequest input) { software.amazon.awssdk.services.kms.model.ListGrantsResponse result = _impl.listGrants(converted); ListGrantsResponse dafnyResponse = ToDafny.ListGrantsResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantIdException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidMarkerException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListGrantsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1218,21 +2538,53 @@ public Result ListKeyPolicies( ListKeyPoliciesResponse dafnyResponse = ToDafny.ListKeyPoliciesResponse( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyPoliciesResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1248,23 +2600,59 @@ public Result ListKeyRotations( ListKeyRotationsResponse dafnyResponse = ToDafny.ListKeyRotationsResponse( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidMarkerException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeyRotationsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1276,17 +2664,41 @@ public Result ListKeys(ListKeysRequest input) { software.amazon.awssdk.services.kms.model.ListKeysResponse result = _impl.listKeys(converted); ListKeysResponse dafnyResponse = ToDafny.ListKeysResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListKeysResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeysResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidMarkerException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeysResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeysResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeysResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListKeysResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1302,19 +2714,47 @@ public Result ListResourceTags( ListResourceTagsResponse dafnyResponse = ToDafny.ListResourceTagsResponse( result ); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidMarkerException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ListResourceTagsResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1324,27 +2764,71 @@ public Result PutKeyPolicy(PutKeyPolicyRequest input) { ToNative.PutKeyPolicyRequest(input); try { _impl.putKeyPolicy(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (MalformedPolicyDocumentException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1356,33 +2840,89 @@ public Result ReEncrypt(ReEncryptRequest input) { software.amazon.awssdk.services.kms.model.ReEncryptResponse result = _impl.reEncrypt(converted); ReEncryptResponse dafnyResponse = ToDafny.ReEncryptResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (IncorrectKeyException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidCiphertextException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReEncryptResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1396,31 +2936,83 @@ public Result ReplicateKey( software.amazon.awssdk.services.kms.model.ReplicateKeyResponse result = _impl.replicateKey(converted); ReplicateKeyResponse dafnyResponse = ToDafny.ReplicateKeyResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (AlreadyExistsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (MalformedPolicyDocumentException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TagException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ReplicateKeyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1430,27 +3022,71 @@ public Result RetireGrant(RetireGrantRequest input) { ToNative.RetireGrantRequest(input); try { _impl.retireGrant(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantIdException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1460,25 +3096,65 @@ public Result RevokeGrant(RevokeGrantRequest input) { ToNative.RevokeGrantRequest(input); try { _impl.revokeGrant(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantIdException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1493,29 +3169,77 @@ public Result RotateKeyOnDemand( _impl.rotateKeyOnDemand(converted); RotateKeyOnDemandResponse dafnyResponse = ToDafny.RotateKeyOnDemandResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (ConflictException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + RotateKeyOnDemandResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1530,21 +3254,53 @@ public Result ScheduleKeyDeletion( _impl.scheduleKeyDeletion(converted); ScheduleKeyDeletionResponse dafnyResponse = ToDafny.ScheduleKeyDeletionResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + ScheduleKeyDeletionResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1556,29 +3312,77 @@ public Result Sign(SignRequest input) { software.amazon.awssdk.services.kms.model.SignResponse result = _impl.sign(converted); SignResponse dafnyResponse = ToDafny.SignResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + SignResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1588,23 +3392,59 @@ public Result TagResource(TagResourceRequest input) { ToNative.TagResourceRequest(input); try { _impl.tagResource(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TagException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1614,21 +3454,53 @@ public Result UntagResource(UntagResourceRequest input) { ToNative.UntagResourceRequest(input); try { _impl.untagResource(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (TagException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1638,21 +3510,53 @@ public Result UpdateAlias(UpdateAliasRequest input) { ToNative.UpdateAliasRequest(input); try { _impl.updateAlias(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (LimitExceededException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1667,45 +3571,125 @@ public Result UpdateCustomKeyStore( _impl.updateCustomKeyStore(converted); UpdateCustomKeyStoreResponse dafnyResponse = ToDafny.UpdateCustomKeyStoreResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (CloudHsmClusterInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterNotActiveException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CloudHsmClusterNotRelatedException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNameInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (CustomKeyStoreNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyIncorrectAuthenticationCredentialException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyInvalidResponseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyUriEndpointInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyUriInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyUriUnreachableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyVpcEndpointServiceInUseException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyVpcEndpointServiceInvalidConfigurationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (XksProxyVpcEndpointServiceNotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + UpdateCustomKeyStoreResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1717,21 +3701,53 @@ public Result UpdateKeyDescription( ToNative.UpdateKeyDescriptionRequest(input); try { _impl.updateKeyDescription(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1743,23 +3759,59 @@ public Result UpdatePrimaryRegion( ToNative.UpdatePrimaryRegionRequest(input); try { _impl.updatePrimaryRegion(converted); - return Result.create_Success(Tuple0.create()); + return Result.create_Success( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + Tuple0.create() + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidArnException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (UnsupportedOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + dafny.Tuple0._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1771,31 +3823,83 @@ public Result Verify(VerifyRequest input) { software.amazon.awssdk.services.kms.model.VerifyResponse result = _impl.verify(converted); VerifyResponse dafnyResponse = ToDafny.VerifyResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DependencyTimeoutException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidSignatureException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } @@ -1807,29 +3911,77 @@ public Result VerifyMac(VerifyMacRequest input) { software.amazon.awssdk.services.kms.model.VerifyMacResponse result = _impl.verifyMac(converted); VerifyMacResponse dafnyResponse = ToDafny.VerifyMacResponse(result); - return Result.create_Success(dafnyResponse); + return Result.create_Success( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + dafnyResponse + ); } catch (DisabledException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (DryRunOperationException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidGrantTokenException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (InvalidKeyUsageException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KeyUnavailableException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInternalException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidMacException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsInvalidStateException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (NotFoundException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (KmsException ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } catch (Exception ex) { - return Result.create_Failure(ToDafny.Error(ex)); + return Result.create_Failure( + VerifyMacResponse._typeDescriptor(), + Error._typeDescriptor(), + ToDafny.Error(ex) + ); } } } 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 59df51961..399865e76 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 @@ -4747,8 +4747,6 @@ public static RuntimeException Error(Error_Opaque dafnyValue) { } 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", diff --git a/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java b/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java index 3e2575b4a..dd66ea911 100644 --- a/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java +++ b/ComAmazonawsKms/runtimes/java/src/test/java/UnwrapGenericKmsTests.java @@ -5,8 +5,10 @@ import Wrappers_Compile.Option; import Wrappers_Compile.Result; +import dafny.TypeDescriptor; import org.testng.Assert; import org.testng.annotations.Test; +import software.amazon.awssdk.core.exception.SdkException; import software.amazon.awssdk.services.kms.model.KmsException; import software.amazon.cryptography.services.kms.internaldafny.ToNative; import software.amazon.cryptography.services.kms.internaldafny.types.*; @@ -37,6 +39,6 @@ public void noAccessUnwrappedFromOpaqueProperly() { ); Assert.assertTrue(response.is_Failure()); final Exception ex = ToNative.Error(response.dtor_error()); - Assert.assertTrue(ex instanceof KmsException); + Assert.assertTrue(ex instanceof SdkException); } } diff --git a/ComAmazonawsKms/runtimes/net/AWS-KMS.csproj b/ComAmazonawsKms/runtimes/net/AWS-KMS.csproj index b316abe69..7e949fcca 100644 --- a/ComAmazonawsKms/runtimes/net/AWS-KMS.csproj +++ b/ComAmazonawsKms/runtimes/net/AWS-KMS.csproj @@ -57,7 +57,7 @@ - + diff --git a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs index e9e0978a1..46aff0c76 100644 --- a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs +++ b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs @@ -7,6 +7,10 @@ namespace Com.Amazonaws.Kms { public static class TypeConversion { + private const string ISO8601DateFormat = "yyyy-MM-dd\\THH:mm:ss.fff\\Z"; + + private const string ISO8601DateFormatNoMS = "yyyy-MM-dd\\THH:mm:ss\\Z"; + public static Amazon.KeyManagementService.AlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S13_AlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._IAlgorithmSpec value) { if (value.is_RSAES__PKCS1__V1__5) return Amazon.KeyManagementService.AlgorithmSpec.RSAES_PKCS1_V1_5; @@ -5505,15 +5509,13 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_Po } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N3_kms__S8_DateType(Dafny.ISequence value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); string timestampString = new string(value.Elements); - return System.DateTime.ParseExact(timestampString, "s", culture); + return System.DateTime.ParseExact(timestampString, new[] { ISO8601DateFormat, ISO8601DateFormatNoMS }.ToString(), System.Globalization.CultureInfo.InvariantCulture); } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S8_DateType(System.DateTime value) { - System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo(""); - string timestampString = value.ToString("s", culture); + string timestampString = value.ToString(ISO8601DateFormat, System.Globalization.CultureInfo.InvariantCulture); return Dafny.Sequence.FromString(timestampString); } diff --git a/SharedMakefileV2.mk b/SharedMakefileV2.mk index 099a37736..1d38f3c35 100644 --- a/SharedMakefileV2.mk +++ b/SharedMakefileV2.mk @@ -11,3 +11,13 @@ GRADLEW := ./runtimes/java/gradlew include $(SMITHY_DAFNY_ROOT)/SmithyDafnyMakefile.mk +verify:DAFNY_OPTIONS=--allow-warnings --allow-external-contracts +verify_single:DAFNY_OPTIONS=--allow-warnings --allow-external-contracts +verify_service:DAFNY_OPTIONS=--allow-warnings --allow-external-contracts + +transpile_implementation_net: DAFNY_OPTIONS=--allow-warnings --compile-suffix --legacy-module-names --allow-external-contracts +transpile_test_net: DAFNY_OPTIONS=--allow-warnings --include-test-runner --compile-suffix --legacy-module-names --allow-external-contracts + +transpile_implementation_java: DAFNY_OPTIONS=--allow-warnings --compile-suffix --legacy-data-constructors --legacy-module-names --allow-external-contracts +transpile_test_java: DAFNY_OPTIONS=--allow-warnings --include-test-runner --compile-suffix --legacy-data-constructors --legacy-module-names --allow-external-contracts + diff --git a/StandardLibrary/.gitignore b/StandardLibrary/.gitignore index 523f0c406..6fc79fa37 100644 --- a/StandardLibrary/.gitignore +++ b/StandardLibrary/.gitignore @@ -1,3 +1,5 @@ TestResults ImplementationFromDafny.cs -TestsFromDafny.cs \ No newline at end of file +TestsFromDafny.cs +ImplementationFromDafny-cs.dtr +TestsFromDafny-cs.dtr diff --git a/StandardLibrary/Makefile b/StandardLibrary/Makefile index a04d4dcf7..a91545fa8 100644 --- a/StandardLibrary/Makefile +++ b/StandardLibrary/Makefile @@ -16,3 +16,4 @@ LIBRARIES := transpile_implementation: STD_LIBRARY= transpile_test: STD_LIBRARY= transpile_dependencies: STD_LIBRARY= + diff --git a/StandardLibrary/runtimes/java/src/main/java/String_Compile/__default.java b/StandardLibrary/runtimes/java/src/main/java/String_Compile/__default.java new file mode 100644 index 000000000..c4f0e6cff --- /dev/null +++ b/StandardLibrary/runtimes/java/src/main/java/String_Compile/__default.java @@ -0,0 +1,51 @@ +package String_Compile; + +/** + * This is a thunk for the actual Dafny-generated StandardLibrary_mString_Compile.__default class. + * + * The module names generated for Java changed between Dafny 4.2 and 4.7, + * and although `--legacy-module-names` mostly retains the old names, + * StandardLibrary.String was previously compiled to String_Compile instead of the expected + * StandardLibrary_mString_Compile because of a bug, + * and it would have been very difficult to reproduce the exact bug behavior with `--legacy-module-names`. + * + * Instead we just create an "alias" for this case. + */ +public class __default { + + public __default() {} + + public static dafny.DafnySequence Int2Digits( + java.math.BigInteger n, + java.math.BigInteger base + ) { + return StandardLibrary_mString_Compile.__default.Int2Digits(n, base); + } + + public static dafny.DafnySequence Digits2String( + dafny.DafnySequence digits, + dafny.DafnySequence chars + ) { + return StandardLibrary_mString_Compile.__default.Digits2String( + digits, + chars + ); + } + + public static dafny.DafnySequence Int2String( + java.math.BigInteger n, + dafny.DafnySequence chars + ) { + return StandardLibrary_mString_Compile.__default.Int2String(n, chars); + } + + public static dafny.DafnySequence Base10Int2String( + java.math.BigInteger n + ) { + return StandardLibrary_mString_Compile.__default.Base10Int2String(n); + } + + public static dafny.DafnySequence Base10() { + return StandardLibrary_mString_Compile.__default.Base10(); + } +} diff --git a/StandardLibrary/runtimes/net/Dafny47-Patch.cs b/StandardLibrary/runtimes/net/Dafny47-Patch.cs new file mode 100644 index 000000000..cfd73baa9 --- /dev/null +++ b/StandardLibrary/runtimes/net/Dafny47-Patch.cs @@ -0,0 +1,82 @@ +using System.Numerics; +/** +* This is a thunk for the actual Dafny-generated StandardLibrary_mString_Compile.__default class. +* +* The module names generated for DotNet changed between Dafny 4.2 and 4.7, +* and although `--legacy-module-names` mostly retains the old names, +* StandardLibrary.String was previously compiled to String_Compile instead of the expected +* StandardLibrary_mString_Compile because of a bug, +* and it would have been very difficult to reproduce the exact bug behavior with `--legacy-module-names`. +* +* Instead we just create an "alias" for this case. +*/ +namespace String_Compile +{ + + public partial class __default + { + public static Dafny.ISequence Int2Digits(BigInteger n, BigInteger @base) + { + Dafny.ISequence _208___accumulator = Dafny.Sequence.FromElements(); + TAIL_CALL_START:; + if ((n).Sign == 0) + { + return Dafny.Sequence.Concat(Dafny.Sequence.FromElements(), _208___accumulator); + } + else + { + _208___accumulator = Dafny.Sequence.Concat(Dafny.Sequence.FromElements(Dafny.Helpers.EuclideanModulus(n, @base)), _208___accumulator); + BigInteger _in38 = Dafny.Helpers.EuclideanDivision(n, @base); + BigInteger _in39 = @base; + n = _in38; + @base = _in39; + goto TAIL_CALL_START; + } + } + public static Dafny.ISequence Digits2String(Dafny.ISequence digits, Dafny.ISequence chars) + { + Dafny.ISequence _209___accumulator = Dafny.Sequence.FromElements(); + TAIL_CALL_START:; + if ((digits).Equals(Dafny.Sequence.FromElements())) + { + return Dafny.Sequence.Concat(_209___accumulator, Dafny.Sequence.FromString("")); + } + else + { + _209___accumulator = Dafny.Sequence.Concat(_209___accumulator, Dafny.Sequence.FromElements((chars).Select((digits).Select(BigInteger.Zero)))); + Dafny.ISequence _in40 = (digits).Drop(BigInteger.One); + Dafny.ISequence _in41 = chars; + digits = _in40; + chars = _in41; + goto TAIL_CALL_START; + } + } + public static Dafny.ISequence Int2String(BigInteger n, Dafny.ISequence chars) + { + BigInteger _210_base = new BigInteger((chars).Count); + if ((n).Sign == 0) + { + return Dafny.Sequence.FromString("0"); + } + else if ((n).Sign == 1) + { + return String_Compile.__default.Digits2String(String_Compile.__default.Int2Digits(n, _210_base), chars); + } + else + { + return Dafny.Sequence.Concat(Dafny.Sequence.FromString("-"), String_Compile.__default.Digits2String(String_Compile.__default.Int2Digits((BigInteger.Zero) - (n), _210_base), chars)); + } + } + public static Dafny.ISequence Base10Int2String(BigInteger n) + { + return String_Compile.__default.Int2String(n, String_Compile.__default.Base10); + } + public static Dafny.ISequence Base10 + { + get + { + return Dafny.Sequence.FromElements('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); + } + } + } +} // end of namespace String_Compile \ No newline at end of file diff --git a/StandardLibrary/runtimes/net/STD.csproj b/StandardLibrary/runtimes/net/STD.csproj index d84752a63..03ac931b0 100644 --- a/StandardLibrary/runtimes/net/STD.csproj +++ b/StandardLibrary/runtimes/net/STD.csproj @@ -56,7 +56,7 @@ - +