From 7d37e91eac4cb38b41930e79efd76698b519be4d Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Mon, 7 Apr 2025 10:08:13 -0700 Subject: [PATCH 01/48] m --- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../smithygenerated/com_amazonaws_dynamodb/shim.py | 6 ++++-- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr index c53fc88824..14292729c8 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.9.2.0" +dafny_version = "4.10.1.0" [options_by_module.AwsCryptographyKeyStoreTypes] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" diff --git a/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr index 30ffba9f73..5b1ac533bc 100644 --- a/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.9.2.0" +dafny_version = "4.10.1.0" [options_by_module.AwsCryptographyPrimitivesTypes] legacy-module-names = false python-module-name = "aws_cryptography_primitives.internaldafny.generated" diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr index ed4cf3cb31..dd0b4b867a 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.9.2.0" +dafny_version = "4.10.1.0" [options_by_module.ComAmazonawsDynamodbTypes] legacy-module-names = false python-module-name = "aws_cryptography_internal_dynamodb.internaldafny.generated" diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py index 9f62a2697b..55a386d56e 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py @@ -130,8 +130,10 @@ def _sdk_error_to_dafny_error(e: ClientError): - """Converts the provided native Smithy-modelled error into the - corresponding Dafny error.""" + """ + Converts the provided native Smithy-modelled error + into the corresponding Dafny error. + """ if e.response["Error"]["Code"] == "BackupInUseException": return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupInUseException( e.response diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr index 0de1660b90..c05d467987 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.9.2.0" +dafny_version = "4.10.1.0" [options_by_module.ComAmazonawsKmsTypes] legacy-module-names = false python-module-name = "aws_cryptography_internal_kms.internaldafny.generated" diff --git a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr index 5e638c9171..9534fa1673 100644 --- a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr +++ b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.9.2.0" +dafny_version = "4.10.1.0" [options_by_module.Wrappers] legacy-module-names = false python-module-name = "smithy_dafny_standard_library.internaldafny.generated" diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr index 26d94b0d6f..c94d7acb16 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.9.2.0" +dafny_version = "4.10.1.0" [options_by_module.MplManifestOptions] legacy-module-names = false python-module-name = "aws_cryptography_materialproviders_test_vectors.internaldafny.generated" From 6ffda1d60b7e5bded75566bbc8b7276d7c7e3bf7 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 9 Apr 2025 10:14:29 -0700 Subject: [PATCH 02/48] m --- .../aws_sdk_format_converter.py | 5702 +++++++++++++++++ .../boto3_conversions.py | 919 +++ .../com_amazonaws_dynamodb/shim.py | 6 +- 3 files changed, 6623 insertions(+), 4 deletions(-) create mode 100644 ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py create mode 100644 ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py new file mode 100644 index 0000000000..e76a563526 --- /dev/null +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py @@ -0,0 +1,5702 @@ +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# Do not modify this file. This file is machine generated, and any changes to it will be overwritten. + +import aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter +from copy import deepcopy + + +def com_amazonaws_dynamodb_BatchExecuteStatementInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Statements"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchStatementRequest( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Statements"] + ] + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_BatchStatementRequest( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Statement"] = this_structure["Statement"] + if "Parameters" in this_structure: + transformed_output["Parameters"] = [ + item_handler(list_element) for list_element in this_structure["Parameters"] + ] + + if "ConsistentRead" in this_structure: + transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + + return transformed_output + + +def com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_BatchExecuteStatementOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Responses" in this_structure: + transformed_output["Responses"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchStatementResponse( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Responses"] + ] + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ConsumedCapacity"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_BatchStatementResponse( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Error" in this_structure: + transformed_output["Error"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchStatementError( + this_structure["Error"], item_handler, condition_handler + ) + ) + + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "Item" in this_structure: + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_ConsumedCapacity( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "CapacityUnits" in this_structure: + transformed_output["CapacityUnits"] = this_structure["CapacityUnits"] + + if "ReadCapacityUnits" in this_structure: + transformed_output["ReadCapacityUnits"] = this_structure["ReadCapacityUnits"] + + if "WriteCapacityUnits" in this_structure: + transformed_output["WriteCapacityUnits"] = this_structure["WriteCapacityUnits"] + + if "Table" in this_structure: + transformed_output["Table"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Capacity( + this_structure["Table"], item_handler, condition_handler + ) + ) + + if "LocalSecondaryIndexes" in this_structure: + transformed_output["LocalSecondaryIndexes"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Capacity( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["LocalSecondaryIndexes"].items() + } + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Capacity( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["GlobalSecondaryIndexes"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_BatchStatementError( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Code" in this_structure: + transformed_output["Code"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchStatementErrorCodeEnum( + this_structure["Code"], item_handler, condition_handler + ) + ) + + if "Message" in this_structure: + transformed_output["Message"] = this_structure["Message"] + + return transformed_output + + +def com_amazonaws_dynamodb_Capacity(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "ReadCapacityUnits" in this_structure: + transformed_output["ReadCapacityUnits"] = this_structure["ReadCapacityUnits"] + + if "WriteCapacityUnits" in this_structure: + transformed_output["WriteCapacityUnits"] = this_structure["WriteCapacityUnits"] + + if "CapacityUnits" in this_structure: + transformed_output["CapacityUnits"] = this_structure["CapacityUnits"] + + return transformed_output + + +def com_amazonaws_dynamodb_BatchStatementErrorCodeEnum( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_BatchGetItemInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RequestItems"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeysAndAttributes( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["RequestItems"].items() + } + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_KeysAndAttributes( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Keys"] = [ + {key: item_handler(value) for (key, value) in list_element.items()} + for list_element in this_structure["Keys"] + ] + if "AttributesToGet" in this_structure: + transformed_output["AttributesToGet"] = [ + list_element for list_element in this_structure["AttributesToGet"] + ] + + if "ConsistentRead" in this_structure: + transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + + if "ProjectionExpression" in this_structure: + transformed_output["ProjectionExpression"] = this_structure[ + "ProjectionExpression" + ] + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_BatchGetItemOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Responses" in this_structure: + transformed_output["Responses"] = { + key: [ + {key: item_handler(value) for (key, value) in list_element.items()} + for list_element in value + ] + for (key, value) in this_structure["Responses"].items() + } + + if "UnprocessedKeys" in this_structure: + transformed_output["UnprocessedKeys"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeysAndAttributes( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["UnprocessedKeys"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ConsumedCapacity"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_BatchWriteItemInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RequestItems"] = { + key: [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_WriteRequest( + list_element, item_handler, condition_handler + ) + for list_element in value + ] + for (key, value) in this_structure["RequestItems"].items() + } + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ReturnItemCollectionMetrics" in this_structure: + transformed_output["ReturnItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( + this_structure["ReturnItemCollectionMetrics"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_WriteRequest( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "PutRequest" in this_structure: + transformed_output["PutRequest"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutRequest( + this_structure["PutRequest"], item_handler, condition_handler + ) + ) + + if "DeleteRequest" in this_structure: + transformed_output["DeleteRequest"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteRequest( + this_structure["DeleteRequest"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReturnItemCollectionMetrics( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_PutRequest(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + return transformed_output + + +def com_amazonaws_dynamodb_DeleteRequest( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + return transformed_output + + +def com_amazonaws_dynamodb_BatchWriteItemOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "UnprocessedItems" in this_structure: + transformed_output["UnprocessedItems"] = { + key: [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_WriteRequest( + list_element, item_handler, condition_handler + ) + for list_element in value + ] + for (key, value) in this_structure["UnprocessedItems"].items() + } + + if "ItemCollectionMetrics" in this_structure: + transformed_output["ItemCollectionMetrics"] = { + key: [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemCollectionMetrics( + list_element, item_handler, condition_handler + ) + for list_element in value + ] + for (key, value) in this_structure["ItemCollectionMetrics"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ConsumedCapacity"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ItemCollectionMetrics( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ItemCollectionKey" in this_structure: + transformed_output["ItemCollectionKey"] = { + key: item_handler(value) + for (key, value) in this_structure["ItemCollectionKey"].items() + } + + if "SizeEstimateRangeGB" in this_structure: + transformed_output["SizeEstimateRangeGB"] = [ + list_element for list_element in this_structure["SizeEstimateRangeGB"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_CreateBackupInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["BackupName"] = this_structure["BackupName"] + return transformed_output + + +def com_amazonaws_dynamodb_CreateBackupOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "BackupDetails" in this_structure: + transformed_output["BackupDetails"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupDetails( + this_structure["BackupDetails"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_BackupDetails( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["BackupArn"] = this_structure["BackupArn"] + transformed_output["BackupName"] = this_structure["BackupName"] + if "BackupSizeBytes" in this_structure: + transformed_output["BackupSizeBytes"] = this_structure["BackupSizeBytes"] + + transformed_output["BackupStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupStatus( + this_structure["BackupStatus"], item_handler, condition_handler + ) + ) + transformed_output["BackupType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupType( + this_structure["BackupType"], item_handler, condition_handler + ) + ) + transformed_output["BackupCreationDateTime"] = this_structure[ + "BackupCreationDateTime" + ] + if "BackupExpiryDateTime" in this_structure: + transformed_output["BackupExpiryDateTime"] = this_structure[ + "BackupExpiryDateTime" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_BackupStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_BackupType(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_CreateGlobalTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + transformed_output["ReplicationGroup"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Replica( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicationGroup"] + ] + return transformed_output + + +def com_amazonaws_dynamodb_Replica(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "RegionName" in this_structure: + transformed_output["RegionName"] = this_structure["RegionName"] + + return transformed_output + + +def com_amazonaws_dynamodb_CreateGlobalTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalTableDescription" in this_structure: + transformed_output["GlobalTableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalTableDescription( + this_structure["GlobalTableDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalTableDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ReplicationGroup" in this_structure: + transformed_output["ReplicationGroup"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicationGroup"] + ] + + if "GlobalTableArn" in this_structure: + transformed_output["GlobalTableArn"] = this_structure["GlobalTableArn"] + + if "CreationDateTime" in this_structure: + transformed_output["CreationDateTime"] = this_structure["CreationDateTime"] + + if "GlobalTableStatus" in this_structure: + transformed_output["GlobalTableStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalTableStatus( + this_structure["GlobalTableStatus"], item_handler, condition_handler + ) + ) + + if "GlobalTableName" in this_structure: + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "RegionName" in this_structure: + transformed_output["RegionName"] = this_structure["RegionName"] + + if "ReplicaStatus" in this_structure: + transformed_output["ReplicaStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaStatus( + this_structure["ReplicaStatus"], item_handler, condition_handler + ) + ) + + if "ReplicaStatusDescription" in this_structure: + transformed_output["ReplicaStatusDescription"] = this_structure[ + "ReplicaStatusDescription" + ] + + if "ReplicaStatusPercentProgress" in this_structure: + transformed_output["ReplicaStatusPercentProgress"] = this_structure[ + "ReplicaStatusPercentProgress" + ] + + if "KMSMasterKeyId" in this_structure: + transformed_output["KMSMasterKeyId"] = this_structure["KMSMasterKeyId"] + + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputOverride( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughputOverride( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "ReplicaInaccessibleDateTime" in this_structure: + transformed_output["ReplicaInaccessibleDateTime"] = this_structure[ + "ReplicaInaccessibleDateTime" + ] + + if "ReplicaTableClassSummary" in this_structure: + transformed_output["ReplicaTableClassSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClassSummary( + this_structure["ReplicaTableClassSummary"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalTableStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ReplicaStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ProvisionedThroughputOverride( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ReadCapacityUnits" in this_structure: + transformed_output["ReadCapacityUnits"] = this_structure["ReadCapacityUnits"] + + return transformed_output + + +def com_amazonaws_dynamodb_OnDemandThroughputOverride( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "MaxReadRequestUnits" in this_structure: + transformed_output["MaxReadRequestUnits"] = this_structure[ + "MaxReadRequestUnits" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputOverride( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughputOverride( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TableClassSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableClass" in this_structure: + transformed_output["TableClass"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClass( + this_structure["TableClass"], item_handler, condition_handler + ) + ) + + if "LastUpdateDateTime" in this_structure: + transformed_output["LastUpdateDateTime"] = this_structure["LastUpdateDateTime"] + + return transformed_output + + +def com_amazonaws_dynamodb_TableClass(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_CreateTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["AttributeDefinitions"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AttributeDefinition( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["AttributeDefinitions"] + ] + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + if "LocalSecondaryIndexes" in this_structure: + transformed_output["LocalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_LocalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["LocalSecondaryIndexes"] + ] + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "BillingMode" in this_structure: + transformed_output["BillingMode"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingMode"], item_handler, condition_handler + ) + ) + + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "StreamSpecification" in this_structure: + transformed_output["StreamSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_StreamSpecification( + this_structure["StreamSpecification"], item_handler, condition_handler + ) + ) + + if "SSESpecification" in this_structure: + transformed_output["SSESpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSESpecification( + this_structure["SSESpecification"], item_handler, condition_handler + ) + ) + + if "Tags" in this_structure: + transformed_output["Tags"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Tag( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Tags"] + ] + + if "TableClass" in this_structure: + transformed_output["TableClass"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClass( + this_structure["TableClass"], item_handler, condition_handler + ) + ) + + if "DeletionProtectionEnabled" in this_structure: + transformed_output["DeletionProtectionEnabled"] = this_structure[ + "DeletionProtectionEnabled" + ] + + if "ResourcePolicy" in this_structure: + transformed_output["ResourcePolicy"] = this_structure["ResourcePolicy"] + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AttributeDefinition( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["AttributeName"] = this_structure["AttributeName"] + transformed_output["AttributeType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ScalarAttributeType( + this_structure["AttributeType"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_KeySchemaElement( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["AttributeName"] = this_structure["AttributeName"] + transformed_output["KeyType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeyType( + this_structure["KeyType"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_LocalSecondaryIndex( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_GlobalSecondaryIndex( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_BillingMode(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ReadCapacityUnits"] = this_structure["ReadCapacityUnits"] + transformed_output["WriteCapacityUnits"] = this_structure["WriteCapacityUnits"] + return transformed_output + + +def com_amazonaws_dynamodb_StreamSpecification( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["StreamEnabled"] = this_structure["StreamEnabled"] + if "StreamViewType" in this_structure: + transformed_output["StreamViewType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_StreamViewType( + this_structure["StreamViewType"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_SSESpecification( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Enabled" in this_structure: + transformed_output["Enabled"] = this_structure["Enabled"] + + if "SSEType" in this_structure: + transformed_output["SSEType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSEType( + this_structure["SSEType"], item_handler, condition_handler + ) + ) + + if "KMSMasterKeyId" in this_structure: + transformed_output["KMSMasterKeyId"] = this_structure["KMSMasterKeyId"] + + return transformed_output + + +def com_amazonaws_dynamodb_Tag(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Key"] = this_structure["Key"] + transformed_output["Value"] = this_structure["Value"] + return transformed_output + + +def com_amazonaws_dynamodb_OnDemandThroughput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "MaxReadRequestUnits" in this_structure: + transformed_output["MaxReadRequestUnits"] = this_structure[ + "MaxReadRequestUnits" + ] + + if "MaxWriteRequestUnits" in this_structure: + transformed_output["MaxWriteRequestUnits"] = this_structure[ + "MaxWriteRequestUnits" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ScalarAttributeType( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_KeyType(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_Projection(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "ProjectionType" in this_structure: + transformed_output["ProjectionType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProjectionType( + this_structure["ProjectionType"], item_handler, condition_handler + ) + ) + + if "NonKeyAttributes" in this_structure: + transformed_output["NonKeyAttributes"] = [ + list_element for list_element in this_structure["NonKeyAttributes"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_StreamViewType( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_SSEType(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ProjectionType( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_CreateTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableDescription" in this_structure: + transformed_output["TableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableDescription( + this_structure["TableDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TableDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "AttributeDefinitions" in this_structure: + transformed_output["AttributeDefinitions"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AttributeDefinition( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["AttributeDefinitions"] + ] + + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "KeySchema" in this_structure: + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + + if "TableStatus" in this_structure: + transformed_output["TableStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableStatus( + this_structure["TableStatus"], item_handler, condition_handler + ) + ) + + if "CreationDateTime" in this_structure: + transformed_output["CreationDateTime"] = this_structure["CreationDateTime"] + + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputDescription( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "TableSizeBytes" in this_structure: + transformed_output["TableSizeBytes"] = this_structure["TableSizeBytes"] + + if "ItemCount" in this_structure: + transformed_output["ItemCount"] = this_structure["ItemCount"] + + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "TableId" in this_structure: + transformed_output["TableId"] = this_structure["TableId"] + + if "BillingModeSummary" in this_structure: + transformed_output["BillingModeSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingModeSummary( + this_structure["BillingModeSummary"], item_handler, condition_handler + ) + ) + + if "LocalSecondaryIndexes" in this_structure: + transformed_output["LocalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_LocalSecondaryIndexDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["LocalSecondaryIndexes"] + ] + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndexDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "StreamSpecification" in this_structure: + transformed_output["StreamSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_StreamSpecification( + this_structure["StreamSpecification"], item_handler, condition_handler + ) + ) + + if "LatestStreamLabel" in this_structure: + transformed_output["LatestStreamLabel"] = this_structure["LatestStreamLabel"] + + if "LatestStreamArn" in this_structure: + transformed_output["LatestStreamArn"] = this_structure["LatestStreamArn"] + + if "GlobalTableVersion" in this_structure: + transformed_output["GlobalTableVersion"] = this_structure["GlobalTableVersion"] + + if "Replicas" in this_structure: + transformed_output["Replicas"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Replicas"] + ] + + if "RestoreSummary" in this_structure: + transformed_output["RestoreSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreSummary( + this_structure["RestoreSummary"], item_handler, condition_handler + ) + ) + + if "SSEDescription" in this_structure: + transformed_output["SSEDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSEDescription( + this_structure["SSEDescription"], item_handler, condition_handler + ) + ) + + if "ArchivalSummary" in this_structure: + transformed_output["ArchivalSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ArchivalSummary( + this_structure["ArchivalSummary"], item_handler, condition_handler + ) + ) + + if "TableClassSummary" in this_structure: + transformed_output["TableClassSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClassSummary( + this_structure["TableClassSummary"], item_handler, condition_handler + ) + ) + + if "DeletionProtectionEnabled" in this_structure: + transformed_output["DeletionProtectionEnabled"] = this_structure[ + "DeletionProtectionEnabled" + ] + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TableStatus(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ProvisionedThroughputDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "LastIncreaseDateTime" in this_structure: + transformed_output["LastIncreaseDateTime"] = this_structure[ + "LastIncreaseDateTime" + ] + + if "LastDecreaseDateTime" in this_structure: + transformed_output["LastDecreaseDateTime"] = this_structure[ + "LastDecreaseDateTime" + ] + + if "NumberOfDecreasesToday" in this_structure: + transformed_output["NumberOfDecreasesToday"] = this_structure[ + "NumberOfDecreasesToday" + ] + + if "ReadCapacityUnits" in this_structure: + transformed_output["ReadCapacityUnits"] = this_structure["ReadCapacityUnits"] + + if "WriteCapacityUnits" in this_structure: + transformed_output["WriteCapacityUnits"] = this_structure["WriteCapacityUnits"] + + return transformed_output + + +def com_amazonaws_dynamodb_BillingModeSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "BillingMode" in this_structure: + transformed_output["BillingMode"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingMode"], item_handler, condition_handler + ) + ) + + if "LastUpdateToPayPerRequestDateTime" in this_structure: + transformed_output["LastUpdateToPayPerRequestDateTime"] = this_structure[ + "LastUpdateToPayPerRequestDateTime" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_LocalSecondaryIndexDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "KeySchema" in this_structure: + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + + if "Projection" in this_structure: + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + + if "IndexSizeBytes" in this_structure: + transformed_output["IndexSizeBytes"] = this_structure["IndexSizeBytes"] + + if "ItemCount" in this_structure: + transformed_output["ItemCount"] = this_structure["ItemCount"] + + if "IndexArn" in this_structure: + transformed_output["IndexArn"] = this_structure["IndexArn"] + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalSecondaryIndexDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "KeySchema" in this_structure: + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + + if "Projection" in this_structure: + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + + if "IndexStatus" in this_structure: + transformed_output["IndexStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_IndexStatus( + this_structure["IndexStatus"], item_handler, condition_handler + ) + ) + + if "Backfilling" in this_structure: + transformed_output["Backfilling"] = this_structure["Backfilling"] + + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputDescription( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "IndexSizeBytes" in this_structure: + transformed_output["IndexSizeBytes"] = this_structure["IndexSizeBytes"] + + if "ItemCount" in this_structure: + transformed_output["ItemCount"] = this_structure["ItemCount"] + + if "IndexArn" in this_structure: + transformed_output["IndexArn"] = this_structure["IndexArn"] + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_RestoreSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "SourceBackupArn" in this_structure: + transformed_output["SourceBackupArn"] = this_structure["SourceBackupArn"] + + if "SourceTableArn" in this_structure: + transformed_output["SourceTableArn"] = this_structure["SourceTableArn"] + + transformed_output["RestoreDateTime"] = this_structure["RestoreDateTime"] + transformed_output["RestoreInProgress"] = this_structure["RestoreInProgress"] + return transformed_output + + +def com_amazonaws_dynamodb_SSEDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Status" in this_structure: + transformed_output["Status"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSEStatus( + this_structure["Status"], item_handler, condition_handler + ) + ) + + if "SSEType" in this_structure: + transformed_output["SSEType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSEType( + this_structure["SSEType"], item_handler, condition_handler + ) + ) + + if "KMSMasterKeyArn" in this_structure: + transformed_output["KMSMasterKeyArn"] = this_structure["KMSMasterKeyArn"] + + if "InaccessibleEncryptionDateTime" in this_structure: + transformed_output["InaccessibleEncryptionDateTime"] = this_structure[ + "InaccessibleEncryptionDateTime" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ArchivalSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ArchivalDateTime" in this_structure: + transformed_output["ArchivalDateTime"] = this_structure["ArchivalDateTime"] + + if "ArchivalReason" in this_structure: + transformed_output["ArchivalReason"] = this_structure["ArchivalReason"] + + if "ArchivalBackupArn" in this_structure: + transformed_output["ArchivalBackupArn"] = this_structure["ArchivalBackupArn"] + + return transformed_output + + +def com_amazonaws_dynamodb_IndexStatus(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_SSEStatus(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_DeleteBackupInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["BackupArn"] = this_structure["BackupArn"] + return transformed_output + + +def com_amazonaws_dynamodb_DeleteBackupOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "BackupDescription" in this_structure: + transformed_output["BackupDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupDescription( + this_structure["BackupDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_BackupDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "BackupDetails" in this_structure: + transformed_output["BackupDetails"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupDetails( + this_structure["BackupDetails"], item_handler, condition_handler + ) + ) + + if "SourceTableDetails" in this_structure: + transformed_output["SourceTableDetails"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SourceTableDetails( + this_structure["SourceTableDetails"], item_handler, condition_handler + ) + ) + + if "SourceTableFeatureDetails" in this_structure: + transformed_output["SourceTableFeatureDetails"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SourceTableFeatureDetails( + this_structure["SourceTableFeatureDetails"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_SourceTableDetails( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["TableId"] = this_structure["TableId"] + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "TableSizeBytes" in this_structure: + transformed_output["TableSizeBytes"] = this_structure["TableSizeBytes"] + + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + transformed_output["TableCreationDateTime"] = this_structure[ + "TableCreationDateTime" + ] + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + if "ItemCount" in this_structure: + transformed_output["ItemCount"] = this_structure["ItemCount"] + + if "BillingMode" in this_structure: + transformed_output["BillingMode"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingMode"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_SourceTableFeatureDetails( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "LocalSecondaryIndexes" in this_structure: + transformed_output["LocalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_LocalSecondaryIndexInfo( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["LocalSecondaryIndexes"] + ] + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndexInfo( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "StreamDescription" in this_structure: + transformed_output["StreamDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_StreamSpecification( + this_structure["StreamDescription"], item_handler, condition_handler + ) + ) + + if "TimeToLiveDescription" in this_structure: + transformed_output["TimeToLiveDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TimeToLiveDescription( + this_structure["TimeToLiveDescription"], item_handler, condition_handler + ) + ) + + if "SSEDescription" in this_structure: + transformed_output["SSEDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSEDescription( + this_structure["SSEDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_LocalSecondaryIndexInfo( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "KeySchema" in this_structure: + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + + if "Projection" in this_structure: + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalSecondaryIndexInfo( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "KeySchema" in this_structure: + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + + if "Projection" in this_structure: + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TimeToLiveDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TimeToLiveStatus" in this_structure: + transformed_output["TimeToLiveStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TimeToLiveStatus( + this_structure["TimeToLiveStatus"], item_handler, condition_handler + ) + ) + + if "AttributeName" in this_structure: + transformed_output["AttributeName"] = this_structure["AttributeName"] + + return transformed_output + + +def com_amazonaws_dynamodb_TimeToLiveStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_DeleteItemInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + if "Expected" in this_structure: + transformed_output["Expected"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExpectedAttributeValue( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["Expected"].items() + } + + if "ConditionalOperator" in this_structure: + transformed_output["ConditionalOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConditionalOperator( + this_structure["ConditionalOperator"], item_handler, condition_handler + ) + ) + + if "ReturnValues" in this_structure: + transformed_output["ReturnValues"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValue( + this_structure["ReturnValues"], item_handler, condition_handler + ) + ) + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ReturnItemCollectionMetrics" in this_structure: + transformed_output["ReturnItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( + this_structure["ReturnItemCollectionMetrics"], + item_handler, + condition_handler, + ) + ) + + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_ExpectedAttributeValue( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Value" in this_structure: + transformed_output["Value"] = item_handler(this_structure["Value"]) + + if "Exists" in this_structure: + transformed_output["Exists"] = this_structure["Exists"] + + if "ComparisonOperator" in this_structure: + transformed_output["ComparisonOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ComparisonOperator( + this_structure["ComparisonOperator"], item_handler, condition_handler + ) + ) + + if "AttributeValueList" in this_structure: + transformed_output["AttributeValueList"] = [ + item_handler(list_element) + for list_element in this_structure["AttributeValueList"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ConditionalOperator( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ReturnValue(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ComparisonOperator( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_DeleteItemOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Attributes" in this_structure: + transformed_output["Attributes"] = { + key: item_handler(value) + for (key, value) in this_structure["Attributes"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + if "ItemCollectionMetrics" in this_structure: + transformed_output["ItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemCollectionMetrics( + this_structure["ItemCollectionMetrics"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DeleteResourcePolicyInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ResourceArn"] = this_structure["ResourceArn"] + if "ExpectedRevisionId" in this_structure: + transformed_output["ExpectedRevisionId"] = this_structure["ExpectedRevisionId"] + + return transformed_output + + +def com_amazonaws_dynamodb_DeleteResourcePolicyOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "RevisionId" in this_structure: + transformed_output["RevisionId"] = this_structure["RevisionId"] + + return transformed_output + + +def com_amazonaws_dynamodb_DeleteTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DeleteTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableDescription" in this_structure: + transformed_output["TableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableDescription( + this_structure["TableDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeBackupInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["BackupArn"] = this_structure["BackupArn"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeBackupOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "BackupDescription" in this_structure: + transformed_output["BackupDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupDescription( + this_structure["BackupDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeContinuousBackupsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeContinuousBackupsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ContinuousBackupsDescription" in this_structure: + transformed_output["ContinuousBackupsDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContinuousBackupsDescription( + this_structure["ContinuousBackupsDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ContinuousBackupsDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ContinuousBackupsStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContinuousBackupsStatus( + this_structure["ContinuousBackupsStatus"], item_handler, condition_handler + ) + ) + if "PointInTimeRecoveryDescription" in this_structure: + transformed_output["PointInTimeRecoveryDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PointInTimeRecoveryDescription( + this_structure["PointInTimeRecoveryDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ContinuousBackupsStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_PointInTimeRecoveryDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "PointInTimeRecoveryStatus" in this_structure: + transformed_output["PointInTimeRecoveryStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PointInTimeRecoveryStatus( + this_structure["PointInTimeRecoveryStatus"], + item_handler, + condition_handler, + ) + ) + + if "EarliestRestorableDateTime" in this_structure: + transformed_output["EarliestRestorableDateTime"] = this_structure[ + "EarliestRestorableDateTime" + ] + + if "LatestRestorableDateTime" in this_structure: + transformed_output["LatestRestorableDateTime"] = this_structure[ + "LatestRestorableDateTime" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_PointInTimeRecoveryStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_DescribeContributorInsightsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeContributorInsightsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "ContributorInsightsRuleList" in this_structure: + transformed_output["ContributorInsightsRuleList"] = [ + list_element + for list_element in this_structure["ContributorInsightsRuleList"] + ] + + if "ContributorInsightsStatus" in this_structure: + transformed_output["ContributorInsightsStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContributorInsightsStatus( + this_structure["ContributorInsightsStatus"], + item_handler, + condition_handler, + ) + ) + + if "LastUpdateDateTime" in this_structure: + transformed_output["LastUpdateDateTime"] = this_structure["LastUpdateDateTime"] + + if "FailureException" in this_structure: + transformed_output["FailureException"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_FailureException( + this_structure["FailureException"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ContributorInsightsStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_FailureException( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExceptionName" in this_structure: + transformed_output["ExceptionName"] = this_structure["ExceptionName"] + + if "ExceptionDescription" in this_structure: + transformed_output["ExceptionDescription"] = this_structure[ + "ExceptionDescription" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeEndpointsRequest( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + return transformed_output + + +def com_amazonaws_dynamodb_DescribeEndpointsResponse( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Endpoints"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Endpoint( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Endpoints"] + ] + return transformed_output + + +def com_amazonaws_dynamodb_Endpoint(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Address"] = this_structure["Address"] + transformed_output["CachePeriodInMinutes"] = this_structure["CachePeriodInMinutes"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeExportInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ExportArn"] = this_structure["ExportArn"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeExportOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExportDescription" in this_structure: + transformed_output["ExportDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportDescription( + this_structure["ExportDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ExportDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExportArn" in this_structure: + transformed_output["ExportArn"] = this_structure["ExportArn"] + + if "ExportStatus" in this_structure: + transformed_output["ExportStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportStatus( + this_structure["ExportStatus"], item_handler, condition_handler + ) + ) + + if "StartTime" in this_structure: + transformed_output["StartTime"] = this_structure["StartTime"] + + if "EndTime" in this_structure: + transformed_output["EndTime"] = this_structure["EndTime"] + + if "ExportManifest" in this_structure: + transformed_output["ExportManifest"] = this_structure["ExportManifest"] + + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "TableId" in this_structure: + transformed_output["TableId"] = this_structure["TableId"] + + if "ExportTime" in this_structure: + transformed_output["ExportTime"] = this_structure["ExportTime"] + + if "ClientToken" in this_structure: + transformed_output["ClientToken"] = this_structure["ClientToken"] + + if "S3Bucket" in this_structure: + transformed_output["S3Bucket"] = this_structure["S3Bucket"] + + if "S3BucketOwner" in this_structure: + transformed_output["S3BucketOwner"] = this_structure["S3BucketOwner"] + + if "S3Prefix" in this_structure: + transformed_output["S3Prefix"] = this_structure["S3Prefix"] + + if "S3SseAlgorithm" in this_structure: + transformed_output["S3SseAlgorithm"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_S3SseAlgorithm( + this_structure["S3SseAlgorithm"], item_handler, condition_handler + ) + ) + + if "S3SseKmsKeyId" in this_structure: + transformed_output["S3SseKmsKeyId"] = this_structure["S3SseKmsKeyId"] + + if "FailureCode" in this_structure: + transformed_output["FailureCode"] = this_structure["FailureCode"] + + if "FailureMessage" in this_structure: + transformed_output["FailureMessage"] = this_structure["FailureMessage"] + + if "ExportFormat" in this_structure: + transformed_output["ExportFormat"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportFormat( + this_structure["ExportFormat"], item_handler, condition_handler + ) + ) + + if "BilledSizeBytes" in this_structure: + transformed_output["BilledSizeBytes"] = this_structure["BilledSizeBytes"] + + if "ItemCount" in this_structure: + transformed_output["ItemCount"] = this_structure["ItemCount"] + + if "ExportType" in this_structure: + transformed_output["ExportType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportType( + this_structure["ExportType"], item_handler, condition_handler + ) + ) + + if "IncrementalExportSpecification" in this_structure: + transformed_output["IncrementalExportSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_IncrementalExportSpecification( + this_structure["IncrementalExportSpecification"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ExportStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_S3SseAlgorithm( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ExportFormat( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ExportType(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_IncrementalExportSpecification( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExportFromTime" in this_structure: + transformed_output["ExportFromTime"] = this_structure["ExportFromTime"] + + if "ExportToTime" in this_structure: + transformed_output["ExportToTime"] = this_structure["ExportToTime"] + + if "ExportViewType" in this_structure: + transformed_output["ExportViewType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportViewType( + this_structure["ExportViewType"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ExportViewType( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_DescribeGlobalTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeGlobalTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalTableDescription" in this_structure: + transformed_output["GlobalTableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalTableDescription( + this_structure["GlobalTableDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeGlobalTableSettingsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalTableName" in this_structure: + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + + if "ReplicaSettings" in this_structure: + transformed_output["ReplicaSettings"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaSettingsDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaSettings"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaSettingsDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + if "ReplicaStatus" in this_structure: + transformed_output["ReplicaStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaStatus( + this_structure["ReplicaStatus"], item_handler, condition_handler + ) + ) + + if "ReplicaBillingModeSummary" in this_structure: + transformed_output["ReplicaBillingModeSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingModeSummary( + this_structure["ReplicaBillingModeSummary"], + item_handler, + condition_handler, + ) + ) + + if "ReplicaProvisionedReadCapacityUnits" in this_structure: + transformed_output["ReplicaProvisionedReadCapacityUnits"] = this_structure[ + "ReplicaProvisionedReadCapacityUnits" + ] + + if "ReplicaProvisionedReadCapacityAutoScalingSettings" in this_structure: + transformed_output["ReplicaProvisionedReadCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ReplicaProvisionedReadCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + if "ReplicaProvisionedWriteCapacityUnits" in this_structure: + transformed_output["ReplicaProvisionedWriteCapacityUnits"] = this_structure[ + "ReplicaProvisionedWriteCapacityUnits" + ] + + if "ReplicaProvisionedWriteCapacityAutoScalingSettings" in this_structure: + transformed_output["ReplicaProvisionedWriteCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ReplicaProvisionedWriteCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + if "ReplicaGlobalSecondaryIndexSettings" in this_structure: + transformed_output["ReplicaGlobalSecondaryIndexSettings"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaGlobalSecondaryIndexSettings"] + ] + + if "ReplicaTableClassSummary" in this_structure: + transformed_output["ReplicaTableClassSummary"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClassSummary( + this_structure["ReplicaTableClassSummary"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "MinimumUnits" in this_structure: + transformed_output["MinimumUnits"] = this_structure["MinimumUnits"] + + if "MaximumUnits" in this_structure: + transformed_output["MaximumUnits"] = this_structure["MaximumUnits"] + + if "AutoScalingDisabled" in this_structure: + transformed_output["AutoScalingDisabled"] = this_structure[ + "AutoScalingDisabled" + ] + + if "AutoScalingRoleArn" in this_structure: + transformed_output["AutoScalingRoleArn"] = this_structure["AutoScalingRoleArn"] + + if "ScalingPolicies" in this_structure: + transformed_output["ScalingPolicies"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingPolicyDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ScalingPolicies"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + if "IndexStatus" in this_structure: + transformed_output["IndexStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_IndexStatus( + this_structure["IndexStatus"], item_handler, condition_handler + ) + ) + + if "ProvisionedReadCapacityUnits" in this_structure: + transformed_output["ProvisionedReadCapacityUnits"] = this_structure[ + "ProvisionedReadCapacityUnits" + ] + + if "ProvisionedReadCapacityAutoScalingSettings" in this_structure: + transformed_output["ProvisionedReadCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ProvisionedReadCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + if "ProvisionedWriteCapacityUnits" in this_structure: + transformed_output["ProvisionedWriteCapacityUnits"] = this_structure[ + "ProvisionedWriteCapacityUnits" + ] + + if "ProvisionedWriteCapacityAutoScalingSettings" in this_structure: + transformed_output["ProvisionedWriteCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ProvisionedWriteCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AutoScalingPolicyDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "PolicyName" in this_structure: + transformed_output["PolicyName"] = this_structure["PolicyName"] + + if "TargetTrackingScalingPolicyConfiguration" in this_structure: + transformed_output["TargetTrackingScalingPolicyConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( + this_structure["TargetTrackingScalingPolicyConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "DisableScaleIn" in this_structure: + transformed_output["DisableScaleIn"] = this_structure["DisableScaleIn"] + + if "ScaleInCooldown" in this_structure: + transformed_output["ScaleInCooldown"] = this_structure["ScaleInCooldown"] + + if "ScaleOutCooldown" in this_structure: + transformed_output["ScaleOutCooldown"] = this_structure["ScaleOutCooldown"] + + transformed_output["TargetValue"] = this_structure["TargetValue"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeImportInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ImportArn"] = this_structure["ImportArn"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeImportOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ImportTableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportTableDescription( + this_structure["ImportTableDescription"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_ImportTableDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ImportArn" in this_structure: + transformed_output["ImportArn"] = this_structure["ImportArn"] + + if "ImportStatus" in this_structure: + transformed_output["ImportStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportStatus( + this_structure["ImportStatus"], item_handler, condition_handler + ) + ) + + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "TableId" in this_structure: + transformed_output["TableId"] = this_structure["TableId"] + + if "ClientToken" in this_structure: + transformed_output["ClientToken"] = this_structure["ClientToken"] + + if "S3BucketSource" in this_structure: + transformed_output["S3BucketSource"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_S3BucketSource( + this_structure["S3BucketSource"], item_handler, condition_handler + ) + ) + + if "ErrorCount" in this_structure: + transformed_output["ErrorCount"] = this_structure["ErrorCount"] + + if "CloudWatchLogGroupArn" in this_structure: + transformed_output["CloudWatchLogGroupArn"] = this_structure[ + "CloudWatchLogGroupArn" + ] + + if "InputFormat" in this_structure: + transformed_output["InputFormat"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputFormat( + this_structure["InputFormat"], item_handler, condition_handler + ) + ) + + if "InputFormatOptions" in this_structure: + transformed_output["InputFormatOptions"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputFormatOptions( + this_structure["InputFormatOptions"], item_handler, condition_handler + ) + ) + + if "InputCompressionType" in this_structure: + transformed_output["InputCompressionType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputCompressionType( + this_structure["InputCompressionType"], item_handler, condition_handler + ) + ) + + if "TableCreationParameters" in this_structure: + transformed_output["TableCreationParameters"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableCreationParameters( + this_structure["TableCreationParameters"], + item_handler, + condition_handler, + ) + ) + + if "StartTime" in this_structure: + transformed_output["StartTime"] = this_structure["StartTime"] + + if "EndTime" in this_structure: + transformed_output["EndTime"] = this_structure["EndTime"] + + if "ProcessedSizeBytes" in this_structure: + transformed_output["ProcessedSizeBytes"] = this_structure["ProcessedSizeBytes"] + + if "ProcessedItemCount" in this_structure: + transformed_output["ProcessedItemCount"] = this_structure["ProcessedItemCount"] + + if "ImportedItemCount" in this_structure: + transformed_output["ImportedItemCount"] = this_structure["ImportedItemCount"] + + if "FailureCode" in this_structure: + transformed_output["FailureCode"] = this_structure["FailureCode"] + + if "FailureMessage" in this_structure: + transformed_output["FailureMessage"] = this_structure["FailureMessage"] + + return transformed_output + + +def com_amazonaws_dynamodb_ImportStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_S3BucketSource( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "S3BucketOwner" in this_structure: + transformed_output["S3BucketOwner"] = this_structure["S3BucketOwner"] + + transformed_output["S3Bucket"] = this_structure["S3Bucket"] + if "S3KeyPrefix" in this_structure: + transformed_output["S3KeyPrefix"] = this_structure["S3KeyPrefix"] + + return transformed_output + + +def com_amazonaws_dynamodb_InputFormat(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_InputFormatOptions( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Csv" in this_structure: + transformed_output["Csv"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CsvOptions( + this_structure["Csv"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_InputCompressionType( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_TableCreationParameters( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["AttributeDefinitions"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AttributeDefinition( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["AttributeDefinitions"] + ] + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + if "BillingMode" in this_structure: + transformed_output["BillingMode"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingMode"], item_handler, condition_handler + ) + ) + + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + if "SSESpecification" in this_structure: + transformed_output["SSESpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSESpecification( + this_structure["SSESpecification"], item_handler, condition_handler + ) + ) + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_CsvOptions(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "Delimiter" in this_structure: + transformed_output["Delimiter"] = this_structure["Delimiter"] + + if "HeaderList" in this_structure: + transformed_output["HeaderList"] = [ + list_element for list_element in this_structure["HeaderList"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "KinesisDataStreamDestinations" in this_structure: + transformed_output["KinesisDataStreamDestinations"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KinesisDataStreamDestination( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KinesisDataStreamDestinations"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_KinesisDataStreamDestination( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "StreamArn" in this_structure: + transformed_output["StreamArn"] = this_structure["StreamArn"] + + if "DestinationStatus" in this_structure: + transformed_output["DestinationStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DestinationStatus( + this_structure["DestinationStatus"], item_handler, condition_handler + ) + ) + + if "DestinationStatusDescription" in this_structure: + transformed_output["DestinationStatusDescription"] = this_structure[ + "DestinationStatusDescription" + ] + + if "ApproximateCreationDateTimePrecision" in this_structure: + transformed_output["ApproximateCreationDateTimePrecision"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision( + this_structure["ApproximateCreationDateTimePrecision"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DestinationStatus( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_DescribeLimitsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + return transformed_output + + +def com_amazonaws_dynamodb_DescribeLimitsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "AccountMaxReadCapacityUnits" in this_structure: + transformed_output["AccountMaxReadCapacityUnits"] = this_structure[ + "AccountMaxReadCapacityUnits" + ] + + if "AccountMaxWriteCapacityUnits" in this_structure: + transformed_output["AccountMaxWriteCapacityUnits"] = this_structure[ + "AccountMaxWriteCapacityUnits" + ] + + if "TableMaxReadCapacityUnits" in this_structure: + transformed_output["TableMaxReadCapacityUnits"] = this_structure[ + "TableMaxReadCapacityUnits" + ] + + if "TableMaxWriteCapacityUnits" in this_structure: + transformed_output["TableMaxWriteCapacityUnits"] = this_structure[ + "TableMaxWriteCapacityUnits" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Table" in this_structure: + transformed_output["Table"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableDescription( + this_structure["Table"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableAutoScalingDescription" in this_structure: + transformed_output["TableAutoScalingDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableAutoScalingDescription( + this_structure["TableAutoScalingDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TableAutoScalingDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "TableStatus" in this_structure: + transformed_output["TableStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableStatus( + this_structure["TableStatus"], item_handler, condition_handler + ) + ) + + if "Replicas" in this_structure: + transformed_output["Replicas"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaAutoScalingDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Replicas"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaAutoScalingDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "RegionName" in this_structure: + transformed_output["RegionName"] = this_structure["RegionName"] + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "ReplicaProvisionedReadCapacityAutoScalingSettings" in this_structure: + transformed_output["ReplicaProvisionedReadCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ReplicaProvisionedReadCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + if "ReplicaProvisionedWriteCapacityAutoScalingSettings" in this_structure: + transformed_output["ReplicaProvisionedWriteCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ReplicaProvisionedWriteCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + if "ReplicaStatus" in this_structure: + transformed_output["ReplicaStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaStatus( + this_structure["ReplicaStatus"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingDescription( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "IndexStatus" in this_structure: + transformed_output["IndexStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_IndexStatus( + this_structure["IndexStatus"], item_handler, condition_handler + ) + ) + + if "ProvisionedReadCapacityAutoScalingSettings" in this_structure: + transformed_output["ProvisionedReadCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ProvisionedReadCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + if "ProvisionedWriteCapacityAutoScalingSettings" in this_structure: + transformed_output["ProvisionedWriteCapacityAutoScalingSettings"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsDescription( + this_structure["ProvisionedWriteCapacityAutoScalingSettings"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DescribeTimeToLiveInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + return transformed_output + + +def com_amazonaws_dynamodb_DescribeTimeToLiveOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TimeToLiveDescription" in this_structure: + transformed_output["TimeToLiveDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TimeToLiveDescription( + this_structure["TimeToLiveDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DisableKinesisStreamingDestinationInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["StreamArn"] = this_structure["StreamArn"] + if "EnableKinesisStreamingConfiguration" in this_structure: + transformed_output["EnableKinesisStreamingConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration( + this_structure["EnableKinesisStreamingConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ApproximateCreationDateTimePrecision" in this_structure: + transformed_output["ApproximateCreationDateTimePrecision"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision( + this_structure["ApproximateCreationDateTimePrecision"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "StreamArn" in this_structure: + transformed_output["StreamArn"] = this_structure["StreamArn"] + + if "DestinationStatus" in this_structure: + transformed_output["DestinationStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DestinationStatus( + this_structure["DestinationStatus"], item_handler, condition_handler + ) + ) + + if "EnableKinesisStreamingConfiguration" in this_structure: + transformed_output["EnableKinesisStreamingConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration( + this_structure["EnableKinesisStreamingConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_EnableKinesisStreamingDestinationInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["StreamArn"] = this_structure["StreamArn"] + if "EnableKinesisStreamingConfiguration" in this_structure: + transformed_output["EnableKinesisStreamingConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration( + this_structure["EnableKinesisStreamingConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "StreamArn" in this_structure: + transformed_output["StreamArn"] = this_structure["StreamArn"] + + if "DestinationStatus" in this_structure: + transformed_output["DestinationStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DestinationStatus( + this_structure["DestinationStatus"], item_handler, condition_handler + ) + ) + + if "EnableKinesisStreamingConfiguration" in this_structure: + transformed_output["EnableKinesisStreamingConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingConfiguration( + this_structure["EnableKinesisStreamingConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ExecuteStatementInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Statement"] = this_structure["Statement"] + if "Parameters" in this_structure: + transformed_output["Parameters"] = [ + item_handler(list_element) for list_element in this_structure["Parameters"] + ] + + if "ConsistentRead" in this_structure: + transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "Limit" in this_structure: + transformed_output["Limit"] = this_structure["Limit"] + + return transformed_output + + +def com_amazonaws_dynamodb_ExecuteStatementOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Items" in this_structure: + transformed_output["Items"] = [ + {key: item_handler(value) for (key, value) in list_element.items()} + for list_element in this_structure["Items"] + ] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + if "LastEvaluatedKey" in this_structure: + transformed_output["LastEvaluatedKey"] = { + key: item_handler(value) + for (key, value) in this_structure["LastEvaluatedKey"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_ExecuteTransactionInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TransactStatements"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ParameterizedStatement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["TransactStatements"] + ] + if "ClientRequestToken" in this_structure: + transformed_output["ClientRequestToken"] = this_structure["ClientRequestToken"] + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ParameterizedStatement( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Statement"] = this_structure["Statement"] + if "Parameters" in this_structure: + transformed_output["Parameters"] = [ + item_handler(list_element) for list_element in this_structure["Parameters"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ExecuteTransactionOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Responses" in this_structure: + transformed_output["Responses"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemResponse( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Responses"] + ] + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ConsumedCapacity"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ItemResponse( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Item" in this_structure: + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_ExportTableToPointInTimeInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableArn"] = this_structure["TableArn"] + if "ExportTime" in this_structure: + transformed_output["ExportTime"] = this_structure["ExportTime"] + + if "ClientToken" in this_structure: + transformed_output["ClientToken"] = this_structure["ClientToken"] + + transformed_output["S3Bucket"] = this_structure["S3Bucket"] + if "S3BucketOwner" in this_structure: + transformed_output["S3BucketOwner"] = this_structure["S3BucketOwner"] + + if "S3Prefix" in this_structure: + transformed_output["S3Prefix"] = this_structure["S3Prefix"] + + if "S3SseAlgorithm" in this_structure: + transformed_output["S3SseAlgorithm"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_S3SseAlgorithm( + this_structure["S3SseAlgorithm"], item_handler, condition_handler + ) + ) + + if "S3SseKmsKeyId" in this_structure: + transformed_output["S3SseKmsKeyId"] = this_structure["S3SseKmsKeyId"] + + if "ExportFormat" in this_structure: + transformed_output["ExportFormat"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportFormat( + this_structure["ExportFormat"], item_handler, condition_handler + ) + ) + + if "ExportType" in this_structure: + transformed_output["ExportType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportType( + this_structure["ExportType"], item_handler, condition_handler + ) + ) + + if "IncrementalExportSpecification" in this_structure: + transformed_output["IncrementalExportSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_IncrementalExportSpecification( + this_structure["IncrementalExportSpecification"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ExportTableToPointInTimeOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExportDescription" in this_structure: + transformed_output["ExportDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportDescription( + this_structure["ExportDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GetItemInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + if "AttributesToGet" in this_structure: + transformed_output["AttributesToGet"] = [ + list_element for list_element in this_structure["AttributesToGet"] + ] + + if "ConsistentRead" in this_structure: + transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ProjectionExpression" in this_structure: + transformed_output["ProjectionExpression"] = this_structure[ + "ProjectionExpression" + ] + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_GetItemOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Item" in this_structure: + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GetResourcePolicyInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ResourceArn"] = this_structure["ResourceArn"] + return transformed_output + + +def com_amazonaws_dynamodb_GetResourcePolicyOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Policy" in this_structure: + transformed_output["Policy"] = this_structure["Policy"] + + if "RevisionId" in this_structure: + transformed_output["RevisionId"] = this_structure["RevisionId"] + + return transformed_output + + +def com_amazonaws_dynamodb_ImportTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ClientToken" in this_structure: + transformed_output["ClientToken"] = this_structure["ClientToken"] + + transformed_output["S3BucketSource"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_S3BucketSource( + this_structure["S3BucketSource"], item_handler, condition_handler + ) + ) + transformed_output["InputFormat"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputFormat( + this_structure["InputFormat"], item_handler, condition_handler + ) + ) + if "InputFormatOptions" in this_structure: + transformed_output["InputFormatOptions"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputFormatOptions( + this_structure["InputFormatOptions"], item_handler, condition_handler + ) + ) + + if "InputCompressionType" in this_structure: + transformed_output["InputCompressionType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputCompressionType( + this_structure["InputCompressionType"], item_handler, condition_handler + ) + ) + + transformed_output["TableCreationParameters"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableCreationParameters( + this_structure["TableCreationParameters"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_ImportTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ImportTableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportTableDescription( + this_structure["ImportTableDescription"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_ListBackupsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "Limit" in this_structure: + transformed_output["Limit"] = this_structure["Limit"] + + if "TimeRangeLowerBound" in this_structure: + transformed_output["TimeRangeLowerBound"] = this_structure[ + "TimeRangeLowerBound" + ] + + if "TimeRangeUpperBound" in this_structure: + transformed_output["TimeRangeUpperBound"] = this_structure[ + "TimeRangeUpperBound" + ] + + if "ExclusiveStartBackupArn" in this_structure: + transformed_output["ExclusiveStartBackupArn"] = this_structure[ + "ExclusiveStartBackupArn" + ] + + if "BackupType" in this_structure: + transformed_output["BackupType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupTypeFilter( + this_structure["BackupType"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_BackupTypeFilter( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_ListBackupsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "BackupSummaries" in this_structure: + transformed_output["BackupSummaries"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupSummary( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["BackupSummaries"] + ] + + if "LastEvaluatedBackupArn" in this_structure: + transformed_output["LastEvaluatedBackupArn"] = this_structure[ + "LastEvaluatedBackupArn" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_BackupSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "TableId" in this_structure: + transformed_output["TableId"] = this_structure["TableId"] + + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "BackupArn" in this_structure: + transformed_output["BackupArn"] = this_structure["BackupArn"] + + if "BackupName" in this_structure: + transformed_output["BackupName"] = this_structure["BackupName"] + + if "BackupCreationDateTime" in this_structure: + transformed_output["BackupCreationDateTime"] = this_structure[ + "BackupCreationDateTime" + ] + + if "BackupExpiryDateTime" in this_structure: + transformed_output["BackupExpiryDateTime"] = this_structure[ + "BackupExpiryDateTime" + ] + + if "BackupStatus" in this_structure: + transformed_output["BackupStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupStatus( + this_structure["BackupStatus"], item_handler, condition_handler + ) + ) + + if "BackupType" in this_structure: + transformed_output["BackupType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BackupType( + this_structure["BackupType"], item_handler, condition_handler + ) + ) + + if "BackupSizeBytes" in this_structure: + transformed_output["BackupSizeBytes"] = this_structure["BackupSizeBytes"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListContributorInsightsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + if "MaxResults" in this_structure: + transformed_output["MaxResults"] = this_structure["MaxResults"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListContributorInsightsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ContributorInsightsSummaries" in this_structure: + transformed_output["ContributorInsightsSummaries"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContributorInsightsSummary( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ContributorInsightsSummaries"] + ] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_ContributorInsightsSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "ContributorInsightsStatus" in this_structure: + transformed_output["ContributorInsightsStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContributorInsightsStatus( + this_structure["ContributorInsightsStatus"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ListExportsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "MaxResults" in this_structure: + transformed_output["MaxResults"] = this_structure["MaxResults"] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListExportsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExportSummaries" in this_structure: + transformed_output["ExportSummaries"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportSummary( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ExportSummaries"] + ] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_ExportSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExportArn" in this_structure: + transformed_output["ExportArn"] = this_structure["ExportArn"] + + if "ExportStatus" in this_structure: + transformed_output["ExportStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportStatus( + this_structure["ExportStatus"], item_handler, condition_handler + ) + ) + + if "ExportType" in this_structure: + transformed_output["ExportType"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportType( + this_structure["ExportType"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ListGlobalTablesInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExclusiveStartGlobalTableName" in this_structure: + transformed_output["ExclusiveStartGlobalTableName"] = this_structure[ + "ExclusiveStartGlobalTableName" + ] + + if "Limit" in this_structure: + transformed_output["Limit"] = this_structure["Limit"] + + if "RegionName" in this_structure: + transformed_output["RegionName"] = this_structure["RegionName"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListGlobalTablesOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalTables" in this_structure: + transformed_output["GlobalTables"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalTable( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalTables"] + ] + + if "LastEvaluatedGlobalTableName" in this_structure: + transformed_output["LastEvaluatedGlobalTableName"] = this_structure[ + "LastEvaluatedGlobalTableName" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalTable(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "GlobalTableName" in this_structure: + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + + if "ReplicationGroup" in this_structure: + transformed_output["ReplicationGroup"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Replica( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicationGroup"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ListImportsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "PageSize" in this_structure: + transformed_output["PageSize"] = this_structure["PageSize"] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListImportsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ImportSummaryList" in this_structure: + transformed_output["ImportSummaryList"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportSummary( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ImportSummaryList"] + ] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_ImportSummary( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ImportArn" in this_structure: + transformed_output["ImportArn"] = this_structure["ImportArn"] + + if "ImportStatus" in this_structure: + transformed_output["ImportStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportStatus( + this_structure["ImportStatus"], item_handler, condition_handler + ) + ) + + if "TableArn" in this_structure: + transformed_output["TableArn"] = this_structure["TableArn"] + + if "S3BucketSource" in this_structure: + transformed_output["S3BucketSource"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_S3BucketSource( + this_structure["S3BucketSource"], item_handler, condition_handler + ) + ) + + if "CloudWatchLogGroupArn" in this_structure: + transformed_output["CloudWatchLogGroupArn"] = this_structure[ + "CloudWatchLogGroupArn" + ] + + if "InputFormat" in this_structure: + transformed_output["InputFormat"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_InputFormat( + this_structure["InputFormat"], item_handler, condition_handler + ) + ) + + if "StartTime" in this_structure: + transformed_output["StartTime"] = this_structure["StartTime"] + + if "EndTime" in this_structure: + transformed_output["EndTime"] = this_structure["EndTime"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListTablesInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ExclusiveStartTableName" in this_structure: + transformed_output["ExclusiveStartTableName"] = this_structure[ + "ExclusiveStartTableName" + ] + + if "Limit" in this_structure: + transformed_output["Limit"] = this_structure["Limit"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListTablesOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableNames" in this_structure: + transformed_output["TableNames"] = [ + list_element for list_element in this_structure["TableNames"] + ] + + if "LastEvaluatedTableName" in this_structure: + transformed_output["LastEvaluatedTableName"] = this_structure[ + "LastEvaluatedTableName" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_ListTagsOfResourceInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ResourceArn"] = this_structure["ResourceArn"] + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_ListTagsOfResourceOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Tags" in this_structure: + transformed_output["Tags"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Tag( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Tags"] + ] + + if "NextToken" in this_structure: + transformed_output["NextToken"] = this_structure["NextToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_PutItemInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + if "Expected" in this_structure: + transformed_output["Expected"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExpectedAttributeValue( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["Expected"].items() + } + + if "ReturnValues" in this_structure: + transformed_output["ReturnValues"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValue( + this_structure["ReturnValues"], item_handler, condition_handler + ) + ) + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ReturnItemCollectionMetrics" in this_structure: + transformed_output["ReturnItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( + this_structure["ReturnItemCollectionMetrics"], + item_handler, + condition_handler, + ) + ) + + if "ConditionalOperator" in this_structure: + transformed_output["ConditionalOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConditionalOperator( + this_structure["ConditionalOperator"], item_handler, condition_handler + ) + ) + + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_PutItemOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Attributes" in this_structure: + transformed_output["Attributes"] = { + key: item_handler(value) + for (key, value) in this_structure["Attributes"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + if "ItemCollectionMetrics" in this_structure: + transformed_output["ItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemCollectionMetrics( + this_structure["ItemCollectionMetrics"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_PutResourcePolicyInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ResourceArn"] = this_structure["ResourceArn"] + transformed_output["Policy"] = this_structure["Policy"] + if "ExpectedRevisionId" in this_structure: + transformed_output["ExpectedRevisionId"] = this_structure["ExpectedRevisionId"] + + if "ConfirmRemoveSelfResourceAccess" in this_structure: + transformed_output["ConfirmRemoveSelfResourceAccess"] = this_structure[ + "ConfirmRemoveSelfResourceAccess" + ] + + return transformed_output + + +def com_amazonaws_dynamodb_PutResourcePolicyOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "RevisionId" in this_structure: + transformed_output["RevisionId"] = this_structure["RevisionId"] + + return transformed_output + + +def com_amazonaws_dynamodb_QueryInput(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "Select" in this_structure: + transformed_output["Select"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Select( + this_structure["Select"], item_handler, condition_handler + ) + ) + + if "AttributesToGet" in this_structure: + transformed_output["AttributesToGet"] = [ + list_element for list_element in this_structure["AttributesToGet"] + ] + + if "Limit" in this_structure: + transformed_output["Limit"] = this_structure["Limit"] + + if "ConsistentRead" in this_structure: + transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + + if "KeyConditions" in this_structure: + transformed_output["KeyConditions"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Condition( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["KeyConditions"].items() + } + + if "QueryFilter" in this_structure: + transformed_output["QueryFilter"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Condition( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["QueryFilter"].items() + } + + if "ConditionalOperator" in this_structure: + transformed_output["ConditionalOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConditionalOperator( + this_structure["ConditionalOperator"], item_handler, condition_handler + ) + ) + + if "ScanIndexForward" in this_structure: + transformed_output["ScanIndexForward"] = this_structure["ScanIndexForward"] + + if "ExclusiveStartKey" in this_structure: + transformed_output["ExclusiveStartKey"] = { + key: item_handler(value) + for (key, value) in this_structure["ExclusiveStartKey"].items() + } + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ProjectionExpression" in this_structure: + transformed_output["ProjectionExpression"] = this_structure[ + "ProjectionExpression" + ] + + if "FilterExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "FilterExpression", this_structure + ) + transformed_output["FilterExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "KeyConditionExpression" in this_structure: + transformed_output["KeyConditionExpression"] = this_structure[ + "KeyConditionExpression" + ] + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_Select(this_structure, item_handler, condition_handler): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_Condition(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "AttributeValueList" in this_structure: + transformed_output["AttributeValueList"] = [ + item_handler(list_element) + for list_element in this_structure["AttributeValueList"] + ] + + transformed_output["ComparisonOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ComparisonOperator( + this_structure["ComparisonOperator"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_QueryOutput(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "Items" in this_structure: + transformed_output["Items"] = [ + {key: item_handler(value) for (key, value) in list_element.items()} + for list_element in this_structure["Items"] + ] + + if "Count" in this_structure: + transformed_output["Count"] = this_structure["Count"] + + if "ScannedCount" in this_structure: + transformed_output["ScannedCount"] = this_structure["ScannedCount"] + + if "LastEvaluatedKey" in this_structure: + transformed_output["LastEvaluatedKey"] = { + key: item_handler(value) + for (key, value) in this_structure["LastEvaluatedKey"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_RestoreTableFromBackupInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TargetTableName"] = this_structure["TargetTableName"] + transformed_output["BackupArn"] = this_structure["BackupArn"] + if "BillingModeOverride" in this_structure: + transformed_output["BillingModeOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingModeOverride"], item_handler, condition_handler + ) + ) + + if "GlobalSecondaryIndexOverride" in this_structure: + transformed_output["GlobalSecondaryIndexOverride"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexOverride"] + ] + + if "LocalSecondaryIndexOverride" in this_structure: + transformed_output["LocalSecondaryIndexOverride"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_LocalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["LocalSecondaryIndexOverride"] + ] + + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "SSESpecificationOverride" in this_structure: + transformed_output["SSESpecificationOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSESpecification( + this_structure["SSESpecificationOverride"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_RestoreTableFromBackupOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableDescription" in this_structure: + transformed_output["TableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableDescription( + this_structure["TableDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_RestoreTableToPointInTimeInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "SourceTableArn" in this_structure: + transformed_output["SourceTableArn"] = this_structure["SourceTableArn"] + + if "SourceTableName" in this_structure: + transformed_output["SourceTableName"] = this_structure["SourceTableName"] + + transformed_output["TargetTableName"] = this_structure["TargetTableName"] + if "UseLatestRestorableTime" in this_structure: + transformed_output["UseLatestRestorableTime"] = this_structure[ + "UseLatestRestorableTime" + ] + + if "RestoreDateTime" in this_structure: + transformed_output["RestoreDateTime"] = this_structure["RestoreDateTime"] + + if "BillingModeOverride" in this_structure: + transformed_output["BillingModeOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingModeOverride"], item_handler, condition_handler + ) + ) + + if "GlobalSecondaryIndexOverride" in this_structure: + transformed_output["GlobalSecondaryIndexOverride"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexOverride"] + ] + + if "LocalSecondaryIndexOverride" in this_structure: + transformed_output["LocalSecondaryIndexOverride"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_LocalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["LocalSecondaryIndexOverride"] + ] + + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "SSESpecificationOverride" in this_structure: + transformed_output["SSESpecificationOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSESpecification( + this_structure["SSESpecificationOverride"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableDescription" in this_structure: + transformed_output["TableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableDescription( + this_structure["TableDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ScanInput(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "AttributesToGet" in this_structure: + transformed_output["AttributesToGet"] = [ + list_element for list_element in this_structure["AttributesToGet"] + ] + + if "Limit" in this_structure: + transformed_output["Limit"] = this_structure["Limit"] + + if "Select" in this_structure: + transformed_output["Select"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Select( + this_structure["Select"], item_handler, condition_handler + ) + ) + + if "ScanFilter" in this_structure: + transformed_output["ScanFilter"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Condition( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["ScanFilter"].items() + } + + if "ConditionalOperator" in this_structure: + transformed_output["ConditionalOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConditionalOperator( + this_structure["ConditionalOperator"], item_handler, condition_handler + ) + ) + + if "ExclusiveStartKey" in this_structure: + transformed_output["ExclusiveStartKey"] = { + key: item_handler(value) + for (key, value) in this_structure["ExclusiveStartKey"].items() + } + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "TotalSegments" in this_structure: + transformed_output["TotalSegments"] = this_structure["TotalSegments"] + + if "Segment" in this_structure: + transformed_output["Segment"] = this_structure["Segment"] + + if "ProjectionExpression" in this_structure: + transformed_output["ProjectionExpression"] = this_structure[ + "ProjectionExpression" + ] + + if "FilterExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "FilterExpression", this_structure + ) + transformed_output["FilterExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + if "ConsistentRead" in this_structure: + transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + + return transformed_output + + +def com_amazonaws_dynamodb_ScanOutput(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + if "Items" in this_structure: + transformed_output["Items"] = [ + {key: item_handler(value) for (key, value) in list_element.items()} + for list_element in this_structure["Items"] + ] + + if "Count" in this_structure: + transformed_output["Count"] = this_structure["Count"] + + if "ScannedCount" in this_structure: + transformed_output["ScannedCount"] = this_structure["ScannedCount"] + + if "LastEvaluatedKey" in this_structure: + transformed_output["LastEvaluatedKey"] = { + key: item_handler(value) + for (key, value) in this_structure["LastEvaluatedKey"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TagResourceInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ResourceArn"] = this_structure["ResourceArn"] + transformed_output["Tags"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Tag( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Tags"] + ] + return transformed_output + + +def com_amazonaws_dynamodb_TransactGetItemsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TransactItems"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactGetItem( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["TransactItems"] + ] + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_TransactGetItem( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Get"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Get( + this_structure["Get"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_Get(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + transformed_output["TableName"] = this_structure["TableName"] + if "ProjectionExpression" in this_structure: + transformed_output["ProjectionExpression"] = this_structure[ + "ProjectionExpression" + ] + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_TransactGetItemsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ConsumedCapacity"] + ] + + if "Responses" in this_structure: + transformed_output["Responses"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemResponse( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["Responses"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_TransactWriteItemsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TransactItems"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactWriteItem( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["TransactItems"] + ] + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ReturnItemCollectionMetrics" in this_structure: + transformed_output["ReturnItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( + this_structure["ReturnItemCollectionMetrics"], + item_handler, + condition_handler, + ) + ) + + if "ClientRequestToken" in this_structure: + transformed_output["ClientRequestToken"] = this_structure["ClientRequestToken"] + + return transformed_output + + +def com_amazonaws_dynamodb_TransactWriteItem( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ConditionCheck" in this_structure: + transformed_output["ConditionCheck"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConditionCheck( + this_structure["ConditionCheck"], item_handler, condition_handler + ) + ) + + if "Put" in this_structure: + transformed_output["Put"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Put( + this_structure["Put"], item_handler, condition_handler + ) + ) + + if "Delete" in this_structure: + transformed_output["Delete"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Delete( + this_structure["Delete"], item_handler, condition_handler + ) + ) + + if "Update" in this_structure: + transformed_output["Update"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Update( + this_structure["Update"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ConditionCheck( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + transformed_output["TableName"] = this_structure["TableName"] + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_Put(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + transformed_output["TableName"] = this_structure["TableName"] + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_Delete(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + transformed_output["TableName"] = this_structure["TableName"] + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_Update(this_structure, item_handler, condition_handler): + transformed_output = deepcopy(this_structure) + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + transformed_output["UpdateExpression"] = this_structure["UpdateExpression"] + transformed_output["TableName"] = this_structure["TableName"] + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_TransactWriteItemsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ConsumedCapacity"] + ] + + if "ItemCollectionMetrics" in this_structure: + transformed_output["ItemCollectionMetrics"] = { + key: [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemCollectionMetrics( + list_element, item_handler, condition_handler + ) + for list_element in value + ] + for (key, value) in this_structure["ItemCollectionMetrics"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_UntagResourceInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["ResourceArn"] = this_structure["ResourceArn"] + transformed_output["TagKeys"] = [ + list_element for list_element in this_structure["TagKeys"] + ] + return transformed_output + + +def com_amazonaws_dynamodb_UpdateContinuousBackupsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["PointInTimeRecoverySpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PointInTimeRecoverySpecification( + this_structure["PointInTimeRecoverySpecification"], + item_handler, + condition_handler, + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_PointInTimeRecoverySpecification( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["PointInTimeRecoveryEnabled"] = this_structure[ + "PointInTimeRecoveryEnabled" + ] + return transformed_output + + +def com_amazonaws_dynamodb_UpdateContinuousBackupsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ContinuousBackupsDescription" in this_structure: + transformed_output["ContinuousBackupsDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContinuousBackupsDescription( + this_structure["ContinuousBackupsDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateContributorInsightsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + transformed_output["ContributorInsightsAction"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContributorInsightsAction( + this_structure["ContributorInsightsAction"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_ContributorInsightsAction( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_UpdateContributorInsightsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "ContributorInsightsStatus" in this_structure: + transformed_output["ContributorInsightsStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ContributorInsightsStatus( + this_structure["ContributorInsightsStatus"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateGlobalTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + transformed_output["ReplicaUpdates"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaUpdates"] + ] + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Create" in this_structure: + transformed_output["Create"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateReplicaAction( + this_structure["Create"], item_handler, condition_handler + ) + ) + + if "Delete" in this_structure: + transformed_output["Delete"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteReplicaAction( + this_structure["Delete"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_CreateReplicaAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + return transformed_output + + +def com_amazonaws_dynamodb_DeleteReplicaAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + return transformed_output + + +def com_amazonaws_dynamodb_UpdateGlobalTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalTableDescription" in this_structure: + transformed_output["GlobalTableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalTableDescription( + this_structure["GlobalTableDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateGlobalTableSettingsInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + if "GlobalTableBillingMode" in this_structure: + transformed_output["GlobalTableBillingMode"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["GlobalTableBillingMode"], + item_handler, + condition_handler, + ) + ) + + if "GlobalTableProvisionedWriteCapacityUnits" in this_structure: + transformed_output["GlobalTableProvisionedWriteCapacityUnits"] = this_structure[ + "GlobalTableProvisionedWriteCapacityUnits" + ] + + if "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate" in this_structure: + transformed_output[ + "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate" + ] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure[ + "GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate" + ], + item_handler, + condition_handler, + ) + + if "GlobalTableGlobalSecondaryIndexSettingsUpdate" in this_structure: + transformed_output["GlobalTableGlobalSecondaryIndexSettingsUpdate"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure[ + "GlobalTableGlobalSecondaryIndexSettingsUpdate" + ] + ] + + if "ReplicaSettingsUpdate" in this_structure: + transformed_output["ReplicaSettingsUpdate"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaSettingsUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaSettingsUpdate"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "MinimumUnits" in this_structure: + transformed_output["MinimumUnits"] = this_structure["MinimumUnits"] + + if "MaximumUnits" in this_structure: + transformed_output["MaximumUnits"] = this_structure["MaximumUnits"] + + if "AutoScalingDisabled" in this_structure: + transformed_output["AutoScalingDisabled"] = this_structure[ + "AutoScalingDisabled" + ] + + if "AutoScalingRoleArn" in this_structure: + transformed_output["AutoScalingRoleArn"] = this_structure["AutoScalingRoleArn"] + + if "ScalingPolicyUpdate" in this_structure: + transformed_output["ScalingPolicyUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingPolicyUpdate( + this_structure["ScalingPolicyUpdate"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalTableGlobalSecondaryIndexSettingsUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + if "ProvisionedWriteCapacityUnits" in this_structure: + transformed_output["ProvisionedWriteCapacityUnits"] = this_structure[ + "ProvisionedWriteCapacityUnits" + ] + + if "ProvisionedWriteCapacityAutoScalingSettingsUpdate" in this_structure: + transformed_output["ProvisionedWriteCapacityAutoScalingSettingsUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ProvisionedWriteCapacityAutoScalingSettingsUpdate"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaSettingsUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + if "ReplicaProvisionedReadCapacityUnits" in this_structure: + transformed_output["ReplicaProvisionedReadCapacityUnits"] = this_structure[ + "ReplicaProvisionedReadCapacityUnits" + ] + + if "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate" in this_structure: + transformed_output[ + "ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate" + ] = aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate"], + item_handler, + condition_handler, + ) + + if "ReplicaGlobalSecondaryIndexSettingsUpdate" in this_structure: + transformed_output["ReplicaGlobalSecondaryIndexSettingsUpdate"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure[ + "ReplicaGlobalSecondaryIndexSettingsUpdate" + ] + ] + + if "ReplicaTableClass" in this_structure: + transformed_output["ReplicaTableClass"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClass( + this_structure["ReplicaTableClass"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AutoScalingPolicyUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "PolicyName" in this_structure: + transformed_output["PolicyName"] = this_structure["PolicyName"] + + transformed_output["TargetTrackingScalingPolicyConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( + this_structure["TargetTrackingScalingPolicyConfiguration"], + item_handler, + condition_handler, + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexSettingsUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + if "ProvisionedReadCapacityUnits" in this_structure: + transformed_output["ProvisionedReadCapacityUnits"] = this_structure[ + "ProvisionedReadCapacityUnits" + ] + + if "ProvisionedReadCapacityAutoScalingSettingsUpdate" in this_structure: + transformed_output["ProvisionedReadCapacityAutoScalingSettingsUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ProvisionedReadCapacityAutoScalingSettingsUpdate"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "DisableScaleIn" in this_structure: + transformed_output["DisableScaleIn"] = this_structure["DisableScaleIn"] + + if "ScaleInCooldown" in this_structure: + transformed_output["ScaleInCooldown"] = this_structure["ScaleInCooldown"] + + if "ScaleOutCooldown" in this_structure: + transformed_output["ScaleOutCooldown"] = this_structure["ScaleOutCooldown"] + + transformed_output["TargetValue"] = this_structure["TargetValue"] + return transformed_output + + +def com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalTableName" in this_structure: + transformed_output["GlobalTableName"] = this_structure["GlobalTableName"] + + if "ReplicaSettings" in this_structure: + transformed_output["ReplicaSettings"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaSettingsDescription( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaSettings"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateItemInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["Key"] = { + key: item_handler(value) for (key, value) in this_structure["Key"].items() + } + if "AttributeUpdates" in this_structure: + transformed_output["AttributeUpdates"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AttributeValueUpdate( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["AttributeUpdates"].items() + } + + if "Expected" in this_structure: + transformed_output["Expected"] = { + key: aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExpectedAttributeValue( + value, item_handler, condition_handler + ) + for (key, value) in this_structure["Expected"].items() + } + + if "ConditionalOperator" in this_structure: + transformed_output["ConditionalOperator"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConditionalOperator( + this_structure["ConditionalOperator"], item_handler, condition_handler + ) + ) + + if "ReturnValues" in this_structure: + transformed_output["ReturnValues"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValue( + this_structure["ReturnValues"], item_handler, condition_handler + ) + ) + + if "ReturnConsumedCapacity" in this_structure: + transformed_output["ReturnConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnConsumedCapacity( + this_structure["ReturnConsumedCapacity"], + item_handler, + condition_handler, + ) + ) + + if "ReturnItemCollectionMetrics" in this_structure: + transformed_output["ReturnItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnItemCollectionMetrics( + this_structure["ReturnItemCollectionMetrics"], + item_handler, + condition_handler, + ) + ) + + if "UpdateExpression" in this_structure: + transformed_output["UpdateExpression"] = this_structure["UpdateExpression"] + + if "ConditionExpression" in this_structure: + condition_expression, attribute_names, attribute_values = condition_handler( + "ConditionExpression", this_structure + ) + transformed_output["ConditionExpression"] = condition_expression + if len(attribute_names) > 0: + transformed_output["ExpressionAttributeNames"] = attribute_names + if len(attribute_values) > 0: + transformed_output["ExpressionAttributeValues"] = attribute_values + + if "ExpressionAttributeNames" in this_structure: + transformed_output["ExpressionAttributeNames"] = { + key: value + for (key, value) in this_structure["ExpressionAttributeNames"].items() + } + + if "ExpressionAttributeValues" in this_structure: + transformed_output["ExpressionAttributeValues"] = { + key: item_handler(value) + for (key, value) in this_structure["ExpressionAttributeValues"].items() + } + + return transformed_output + + +def com_amazonaws_dynamodb_AttributeValueUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Value" in this_structure: + transformed_output["Value"] = item_handler(this_structure["Value"]) + + if "Action" in this_structure: + transformed_output["Action"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AttributeAction( + this_structure["Action"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_AttributeAction( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + +def com_amazonaws_dynamodb_UpdateItemOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Attributes" in this_structure: + transformed_output["Attributes"] = { + key: item_handler(value) + for (key, value) in this_structure["Attributes"].items() + } + + if "ConsumedCapacity" in this_structure: + transformed_output["ConsumedCapacity"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ConsumedCapacity( + this_structure["ConsumedCapacity"], item_handler, condition_handler + ) + ) + + if "ItemCollectionMetrics" in this_structure: + transformed_output["ItemCollectionMetrics"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ItemCollectionMetrics( + this_structure["ItemCollectionMetrics"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["StreamArn"] = this_structure["StreamArn"] + if "UpdateKinesisStreamingConfiguration" in this_structure: + transformed_output["UpdateKinesisStreamingConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration( + this_structure["UpdateKinesisStreamingConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "ApproximateCreationDateTimePrecision" in this_structure: + transformed_output["ApproximateCreationDateTimePrecision"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ApproximateCreationDateTimePrecision( + this_structure["ApproximateCreationDateTimePrecision"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableName" in this_structure: + transformed_output["TableName"] = this_structure["TableName"] + + if "StreamArn" in this_structure: + transformed_output["StreamArn"] = this_structure["StreamArn"] + + if "DestinationStatus" in this_structure: + transformed_output["DestinationStatus"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DestinationStatus( + this_structure["DestinationStatus"], item_handler, condition_handler + ) + ) + + if "UpdateKinesisStreamingConfiguration" in this_structure: + transformed_output["UpdateKinesisStreamingConfiguration"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateKinesisStreamingConfiguration( + this_structure["UpdateKinesisStreamingConfiguration"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateTableInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "AttributeDefinitions" in this_structure: + transformed_output["AttributeDefinitions"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AttributeDefinition( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["AttributeDefinitions"] + ] + + transformed_output["TableName"] = this_structure["TableName"] + if "BillingMode" in this_structure: + transformed_output["BillingMode"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BillingMode( + this_structure["BillingMode"], item_handler, condition_handler + ) + ) + + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "GlobalSecondaryIndexUpdates" in this_structure: + transformed_output["GlobalSecondaryIndexUpdates"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexUpdates"] + ] + + if "StreamSpecification" in this_structure: + transformed_output["StreamSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_StreamSpecification( + this_structure["StreamSpecification"], item_handler, condition_handler + ) + ) + + if "SSESpecification" in this_structure: + transformed_output["SSESpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_SSESpecification( + this_structure["SSESpecification"], item_handler, condition_handler + ) + ) + + if "ReplicaUpdates" in this_structure: + transformed_output["ReplicaUpdates"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicationGroupUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaUpdates"] + ] + + if "TableClass" in this_structure: + transformed_output["TableClass"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClass( + this_structure["TableClass"], item_handler, condition_handler + ) + ) + + if "DeletionProtectionEnabled" in this_structure: + transformed_output["DeletionProtectionEnabled"] = this_structure[ + "DeletionProtectionEnabled" + ] + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalSecondaryIndexUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Update" in this_structure: + transformed_output["Update"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction( + this_structure["Update"], item_handler, condition_handler + ) + ) + + if "Create" in this_structure: + transformed_output["Create"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction( + this_structure["Create"], item_handler, condition_handler + ) + ) + + if "Delete" in this_structure: + transformed_output["Delete"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction( + this_structure["Delete"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicationGroupUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "Create" in this_structure: + transformed_output["Create"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateReplicationGroupMemberAction( + this_structure["Create"], item_handler, condition_handler + ) + ) + + if "Update" in this_structure: + transformed_output["Update"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction( + this_structure["Update"], item_handler, condition_handler + ) + ) + + if "Delete" in this_structure: + transformed_output["Delete"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction( + this_structure["Delete"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateGlobalSecondaryIndexAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_CreateGlobalSecondaryIndexAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + transformed_output["KeySchema"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_KeySchemaElement( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["KeySchema"] + ] + transformed_output["Projection"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_Projection( + this_structure["Projection"], item_handler, condition_handler + ) + ) + if "ProvisionedThroughput" in this_structure: + transformed_output["ProvisionedThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughput( + this_structure["ProvisionedThroughput"], item_handler, condition_handler + ) + ) + + if "OnDemandThroughput" in this_structure: + transformed_output["OnDemandThroughput"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughput( + this_structure["OnDemandThroughput"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DeleteGlobalSecondaryIndexAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + return transformed_output + + +def com_amazonaws_dynamodb_CreateReplicationGroupMemberAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + if "KMSMasterKeyId" in this_structure: + transformed_output["KMSMasterKeyId"] = this_structure["KMSMasterKeyId"] + + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputOverride( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughputOverride( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "TableClassOverride" in this_structure: + transformed_output["TableClassOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClass( + this_structure["TableClassOverride"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateReplicationGroupMemberAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + if "KMSMasterKeyId" in this_structure: + transformed_output["KMSMasterKeyId"] = this_structure["KMSMasterKeyId"] + + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputOverride( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughputOverride( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "GlobalSecondaryIndexes" in this_structure: + transformed_output["GlobalSecondaryIndexes"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexes"] + ] + + if "TableClassOverride" in this_structure: + transformed_output["TableClassOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableClass( + this_structure["TableClassOverride"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_DeleteReplicationGroupMemberAction( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndex( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["IndexName"] = this_structure["IndexName"] + if "ProvisionedThroughputOverride" in this_structure: + transformed_output["ProvisionedThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ProvisionedThroughputOverride( + this_structure["ProvisionedThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + if "OnDemandThroughputOverride" in this_structure: + transformed_output["OnDemandThroughputOverride"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_OnDemandThroughputOverride( + this_structure["OnDemandThroughputOverride"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateTableOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableDescription" in this_structure: + transformed_output["TableDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableDescription( + this_structure["TableDescription"], item_handler, condition_handler + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "GlobalSecondaryIndexUpdates" in this_structure: + transformed_output["GlobalSecondaryIndexUpdates"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["GlobalSecondaryIndexUpdates"] + ] + + transformed_output["TableName"] = this_structure["TableName"] + if "ProvisionedWriteCapacityAutoScalingUpdate" in this_structure: + transformed_output["ProvisionedWriteCapacityAutoScalingUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ProvisionedWriteCapacityAutoScalingUpdate"], + item_handler, + condition_handler, + ) + ) + + if "ReplicaUpdates" in this_structure: + transformed_output["ReplicaUpdates"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaAutoScalingUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaUpdates"] + ] + + return transformed_output + + +def com_amazonaws_dynamodb_GlobalSecondaryIndexAutoScalingUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "ProvisionedWriteCapacityAutoScalingUpdate" in this_structure: + transformed_output["ProvisionedWriteCapacityAutoScalingUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ProvisionedWriteCapacityAutoScalingUpdate"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaAutoScalingUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["RegionName"] = this_structure["RegionName"] + if "ReplicaGlobalSecondaryIndexUpdates" in this_structure: + transformed_output["ReplicaGlobalSecondaryIndexUpdates"] = [ + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate( + list_element, item_handler, condition_handler + ) + for list_element in this_structure["ReplicaGlobalSecondaryIndexUpdates"] + ] + + if "ReplicaProvisionedReadCapacityAutoScalingUpdate" in this_structure: + transformed_output["ReplicaProvisionedReadCapacityAutoScalingUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ReplicaProvisionedReadCapacityAutoScalingUpdate"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_ReplicaGlobalSecondaryIndexAutoScalingUpdate( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "IndexName" in this_structure: + transformed_output["IndexName"] = this_structure["IndexName"] + + if "ProvisionedReadCapacityAutoScalingUpdate" in this_structure: + transformed_output["ProvisionedReadCapacityAutoScalingUpdate"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_AutoScalingSettingsUpdate( + this_structure["ProvisionedReadCapacityAutoScalingUpdate"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TableAutoScalingDescription" in this_structure: + transformed_output["TableAutoScalingDescription"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TableAutoScalingDescription( + this_structure["TableAutoScalingDescription"], + item_handler, + condition_handler, + ) + ) + + return transformed_output + + +def com_amazonaws_dynamodb_UpdateTimeToLiveInput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["TableName"] = this_structure["TableName"] + transformed_output["TimeToLiveSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TimeToLiveSpecification( + this_structure["TimeToLiveSpecification"], item_handler, condition_handler + ) + ) + return transformed_output + + +def com_amazonaws_dynamodb_TimeToLiveSpecification( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + transformed_output["Enabled"] = this_structure["Enabled"] + transformed_output["AttributeName"] = this_structure["AttributeName"] + return transformed_output + + +def com_amazonaws_dynamodb_UpdateTimeToLiveOutput( + this_structure, item_handler, condition_handler +): + transformed_output = deepcopy(this_structure) + if "TimeToLiveSpecification" in this_structure: + transformed_output["TimeToLiveSpecification"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TimeToLiveSpecification( + this_structure["TimeToLiveSpecification"], + item_handler, + condition_handler, + ) + ) + + return transformed_output diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py new file mode 100644 index 0000000000..7009fb998e --- /dev/null +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py @@ -0,0 +1,919 @@ +# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +# SPDX-License-Identifier: Apache-2.0 +# Do not modify this file. This file is machine generated, and any changes to it will be overwritten. + +import aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter + + +class InternalBoto3DynamoDBFormatConverter: + def __init__(self, item_handler, condition_handler): + self._item_handler = item_handler + self._condition_handler = condition_handler + + def BatchExecuteStatementInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchExecuteStatementInput( + boto3_input, item_handler, condition_handler + ) + + def BatchExecuteStatementOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchExecuteStatementOutput( + boto3_input, item_handler, condition_handler + ) + + def BatchGetItemInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchGetItemInput( + boto3_input, item_handler, condition_handler + ) + + def BatchGetItemOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchGetItemOutput( + boto3_input, item_handler, condition_handler + ) + + def BatchWriteItemInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchWriteItemInput( + boto3_input, item_handler, condition_handler + ) + + def BatchWriteItemOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchWriteItemOutput( + boto3_input, item_handler, condition_handler + ) + + def CreateBackupInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateBackupInput( + boto3_input, item_handler, condition_handler + ) + + def CreateBackupOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateBackupOutput( + boto3_input, item_handler, condition_handler + ) + + def CreateGlobalTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateGlobalTableInput( + boto3_input, item_handler, condition_handler + ) + + def CreateGlobalTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateGlobalTableOutput( + boto3_input, item_handler, condition_handler + ) + + def CreateTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateTableInput( + boto3_input, item_handler, condition_handler + ) + + def CreateTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateTableOutput( + boto3_input, item_handler, condition_handler + ) + + def DeleteBackupInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteBackupInput( + boto3_input, item_handler, condition_handler + ) + + def DeleteBackupOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteBackupOutput( + boto3_input, item_handler, condition_handler + ) + + def DeleteItemInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteItemInput( + boto3_input, item_handler, condition_handler + ) + + def DeleteItemOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteItemOutput( + boto3_input, item_handler, condition_handler + ) + + def DeleteResourcePolicyInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteResourcePolicyInput( + boto3_input, item_handler, condition_handler + ) + + def DeleteResourcePolicyOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteResourcePolicyOutput( + boto3_input, item_handler, condition_handler + ) + + def DeleteTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteTableInput( + boto3_input, item_handler, condition_handler + ) + + def DeleteTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteTableOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeBackupInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeBackupInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeBackupOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeBackupOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeContinuousBackupsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeContinuousBackupsInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeContinuousBackupsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeContinuousBackupsOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeContributorInsightsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeContributorInsightsInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeContributorInsightsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeContributorInsightsOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeEndpointsRequest(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeEndpointsRequest( + boto3_input, item_handler, condition_handler + ) + + def DescribeEndpointsResponse(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeEndpointsResponse( + boto3_input, item_handler, condition_handler + ) + + def DescribeExportInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeExportInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeExportOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeExportOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeGlobalTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeGlobalTableInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeGlobalTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeGlobalTableOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeGlobalTableSettingsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeGlobalTableSettingsInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeGlobalTableSettingsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeImportInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeImportInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeImportOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeImportOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeKinesisStreamingDestinationInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeKinesisStreamingDestinationOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeLimitsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeLimitsInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeLimitsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeLimitsOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTableInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTableOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeTableReplicaAutoScalingInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeTableReplicaAutoScalingOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput( + boto3_input, item_handler, condition_handler + ) + + def DescribeTimeToLiveInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTimeToLiveInput( + boto3_input, item_handler, condition_handler + ) + + def DescribeTimeToLiveOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTimeToLiveOutput( + boto3_input, item_handler, condition_handler + ) + + def DisableKinesisStreamingDestinationInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationInput( + boto3_input, item_handler, condition_handler + ) + + def DisableKinesisStreamingDestinationOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput( + boto3_input, item_handler, condition_handler + ) + + def EnableKinesisStreamingDestinationInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationInput( + boto3_input, item_handler, condition_handler + ) + + def EnableKinesisStreamingDestinationOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput( + boto3_input, item_handler, condition_handler + ) + + def ExecuteStatementInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExecuteStatementInput( + boto3_input, item_handler, condition_handler + ) + + def ExecuteStatementOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExecuteStatementOutput( + boto3_input, item_handler, condition_handler + ) + + def ExecuteTransactionInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExecuteTransactionInput( + boto3_input, item_handler, condition_handler + ) + + def ExecuteTransactionOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExecuteTransactionOutput( + boto3_input, item_handler, condition_handler + ) + + def ExportTableToPointInTimeInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportTableToPointInTimeInput( + boto3_input, item_handler, condition_handler + ) + + def ExportTableToPointInTimeOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportTableToPointInTimeOutput( + boto3_input, item_handler, condition_handler + ) + + def GetItemInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GetItemInput( + boto3_input, item_handler, condition_handler + ) + + def GetItemOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GetItemOutput( + boto3_input, item_handler, condition_handler + ) + + def GetResourcePolicyInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GetResourcePolicyInput( + boto3_input, item_handler, condition_handler + ) + + def GetResourcePolicyOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GetResourcePolicyOutput( + boto3_input, item_handler, condition_handler + ) + + def ImportTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportTableInput( + boto3_input, item_handler, condition_handler + ) + + def ImportTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportTableOutput( + boto3_input, item_handler, condition_handler + ) + + def ListBackupsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListBackupsInput( + boto3_input, item_handler, condition_handler + ) + + def ListBackupsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListBackupsOutput( + boto3_input, item_handler, condition_handler + ) + + def ListContributorInsightsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListContributorInsightsInput( + boto3_input, item_handler, condition_handler + ) + + def ListContributorInsightsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListContributorInsightsOutput( + boto3_input, item_handler, condition_handler + ) + + def ListExportsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListExportsInput( + boto3_input, item_handler, condition_handler + ) + + def ListExportsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListExportsOutput( + boto3_input, item_handler, condition_handler + ) + + def ListGlobalTablesInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListGlobalTablesInput( + boto3_input, item_handler, condition_handler + ) + + def ListGlobalTablesOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListGlobalTablesOutput( + boto3_input, item_handler, condition_handler + ) + + def ListImportsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListImportsInput( + boto3_input, item_handler, condition_handler + ) + + def ListImportsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListImportsOutput( + boto3_input, item_handler, condition_handler + ) + + def ListTablesInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListTablesInput( + boto3_input, item_handler, condition_handler + ) + + def ListTablesOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListTablesOutput( + boto3_input, item_handler, condition_handler + ) + + def ListTagsOfResourceInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListTagsOfResourceInput( + boto3_input, item_handler, condition_handler + ) + + def ListTagsOfResourceOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListTagsOfResourceOutput( + boto3_input, item_handler, condition_handler + ) + + def PutItemInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutItemInput( + boto3_input, item_handler, condition_handler + ) + + def PutItemOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutItemOutput( + boto3_input, item_handler, condition_handler + ) + + def PutResourcePolicyInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutResourcePolicyInput( + boto3_input, item_handler, condition_handler + ) + + def PutResourcePolicyOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutResourcePolicyOutput( + boto3_input, item_handler, condition_handler + ) + + def QueryInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_QueryInput( + boto3_input, item_handler, condition_handler + ) + + def QueryOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_QueryOutput( + boto3_input, item_handler, condition_handler + ) + + def RestoreTableFromBackupInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreTableFromBackupInput( + boto3_input, item_handler, condition_handler + ) + + def RestoreTableFromBackupOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreTableFromBackupOutput( + boto3_input, item_handler, condition_handler + ) + + def RestoreTableToPointInTimeInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreTableToPointInTimeInput( + boto3_input, item_handler, condition_handler + ) + + def RestoreTableToPointInTimeOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput( + boto3_input, item_handler, condition_handler + ) + + def ScanInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ScanInput( + boto3_input, item_handler, condition_handler + ) + + def ScanOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ScanOutput( + boto3_input, item_handler, condition_handler + ) + + def TagResourceInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TagResourceInput( + boto3_input, item_handler, condition_handler + ) + + def Unit(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return None + + def TransactGetItemsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactGetItemsInput( + boto3_input, item_handler, condition_handler + ) + + def TransactGetItemsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactGetItemsOutput( + boto3_input, item_handler, condition_handler + ) + + def TransactWriteItemsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactWriteItemsInput( + boto3_input, item_handler, condition_handler + ) + + def TransactWriteItemsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactWriteItemsOutput( + boto3_input, item_handler, condition_handler + ) + + def UntagResourceInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UntagResourceInput( + boto3_input, item_handler, condition_handler + ) + + def Unit(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return None + + def UpdateContinuousBackupsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateContinuousBackupsInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateContinuousBackupsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateContinuousBackupsOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateContributorInsightsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateContributorInsightsInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateContributorInsightsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateContributorInsightsOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateGlobalTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalTableInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateGlobalTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalTableOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateGlobalTableSettingsInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalTableSettingsInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateGlobalTableSettingsOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateItemInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateItemInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateItemOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateItemOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateKinesisStreamingDestinationInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateKinesisStreamingDestinationOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateTableInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTableInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateTableOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTableOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateTableReplicaAutoScalingInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateTableReplicaAutoScalingOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput( + boto3_input, item_handler, condition_handler + ) + + def UpdateTimeToLiveInput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTimeToLiveInput( + boto3_input, item_handler, condition_handler + ) + + def UpdateTimeToLiveOutput(self, boto3_input) -> dict: + original_request = boto3_input + item_handler = self._item_handler + condition_handler = self._condition_handler + return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTimeToLiveOutput( + boto3_input, item_handler, condition_handler + ) diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py index 55a386d56e..9f62a2697b 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/shim.py @@ -130,10 +130,8 @@ def _sdk_error_to_dafny_error(e: ClientError): - """ - Converts the provided native Smithy-modelled error - into the corresponding Dafny error. - """ + """Converts the provided native Smithy-modelled error into the + corresponding Dafny error.""" if e.response["Error"]["Code"] == "BackupInUseException": return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_to_dafny.com_amazonaws_dynamodb_BackupInUseException( e.response From 968caace99fafe24d8d416397f1a441e364bdb75 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 9 Apr 2025 10:56:56 -0700 Subject: [PATCH 03/48] m --- .../AwsCryptographyMaterialProvidersTypes.dfy | 2 +- .../src/CMCs/StormTrackingCMC.dfy | 2 +- .../src/CMCs/SynchronizedLocalCMC.dfy | 2 +- .../src/Index.dfy | 2 +- .../Model/AwsCryptographyKeyStoreTypes.dfy | 2 +- .../AwsCryptographyKeyStore/src/Index.dfy | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 48 ++++++------ .../Model/AwsCryptographyPrimitivesTypes.dfy | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- AwsCryptographyPrimitives/src/Index.dfy | 2 +- .../Model/ComAmazonawsDynamodbTypes.dfy | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../aws_sdk_format_converter.py | 73 +++++++++++++++++-- ComAmazonawsDynamodb/src/Index.dfy | 2 +- .../Model/ComAmazonawsKmsTypes.dfy | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- ComAmazonawsKms/src/Index.dfy | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 2 +- libraries | 2 +- 20 files changed, 108 insertions(+), 49 deletions(-) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy index af51e21e8b..99aa830690 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy @@ -6,7 +6,7 @@ include "../../AwsCryptographyKeyStore/src/Index.dfy" include "../../../../AwsCryptographyPrimitives/src/Index.dfy" include "../../../../ComAmazonawsDynamodb/src/Index.dfy" include "../../../../ComAmazonawsKms/src/Index.dfy" -module {:extern "software.amazon.cryptography.materialproviders.internaldafny.types" } AwsCryptographyMaterialProvidersTypes +module AwsCryptographyMaterialProvidersTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy index 815b7b367e..a3a344afad 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy @@ -3,7 +3,7 @@ include "StormTracker.dfy" -module {:options "/functionSyntax:4" } {:extern "software.amazon.cryptography.internaldafny.StormTrackingCMC" } StormTrackingCMC { +module {:options "/functionSyntax:4" } StormTrackingCMC { import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes import StormTracker diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy index 2c0b873941..b06110aac3 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy @@ -3,7 +3,7 @@ include "LocalCMC.dfy" -module {:options "/functionSyntax:4" } {:extern "software.amazon.cryptography.internaldafny.SynchronizedLocalCMC" } SynchronizedLocalCMC { +module {:options "/functionSyntax:4" } SynchronizedLocalCMC { import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes import LocalCMC diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy index 12517b8fb9..abd4da4432 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy @@ -3,7 +3,7 @@ include "AwsCryptographyMaterialProvidersOperations.dfy" -module {:extern "software.amazon.cryptography.materialproviders.internaldafny" } MaterialProviders refines AbstractAwsCryptographyMaterialProvidersService +module MaterialProviders refines AbstractAwsCryptographyMaterialProvidersService { import Operations = AwsCryptographyMaterialProvidersOperations diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy index a371045798..5c22df60d8 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy @@ -4,7 +4,7 @@ include "../../../../StandardLibrary/src/Index.dfy" include "../../../../ComAmazonawsDynamodb/src/Index.dfy" include "../../../../ComAmazonawsKms/src/Index.dfy" -module {:extern "software.amazon.cryptography.keystore.internaldafny.types" } AwsCryptographyKeyStoreTypes +module AwsCryptographyKeyStoreTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy index 550b8c9be1..51d2e53063 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy @@ -6,7 +6,7 @@ include "AwsCryptographyKeyStoreOperations.dfy" include "ErrorMessages.dfy" include "KmsArn.dfy" -module {:extern "software.amazon.cryptography.keystore.internaldafny"} KeyStore refines AbstractAwsCryptographyKeyStoreService +module KeyStore refines AbstractAwsCryptographyKeyStoreService { import opened AwsKmsUtils import Operations = AwsCryptographyKeyStoreOperations diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr index 2293d3f90b..4ff8791824 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.10.1.0" +dafny_version = "4.9.0.0" [options_by_module.AwsCryptographyKeyStoreTypes] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" @@ -66,21 +66,12 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.Keyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MultiKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkAreUnique] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.Constants] +[options_by_module.CanonicalEncryptionContext] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.MaterialWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.CanonicalEncryptionContext] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.IntermediateKeyWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" @@ -90,28 +81,28 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.ErrorMessages] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsKeyring] +[options_by_module.RawAESKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.StrictMultiKeyring] +[options_by_module.Constants] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsDiscoveryKeyring] +[options_by_module.EcdhEdkWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.DiscoveryMultiKeyring] +[options_by_module.RawECDHKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkDiscoveryKeyring] +[options_by_module.RawRSAKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareDiscoveryMultiKeyring] +[options_by_module.AwsKmsKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkKeyring] +[options_by_module.AwsKmsDiscoveryKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareStrictMultiKeyring] +[options_by_module.AwsKmsEcdhKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.LocalCMC] @@ -132,22 +123,31 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.AwsKmsHierarchicalKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.AwsKmsMrkDiscoveryKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.AwsKmsMrkKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.AwsKmsRsaKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.EcdhEdkWrapping] +[options_by_module.MultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawECDHKeyring] +[options_by_module.AwsKmsMrkAreUnique] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsEcdhKeyring] +[options_by_module.StrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawAESKeyring] +[options_by_module.DiscoveryMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawRSAKeyring] +[options_by_module.MrkAwareDiscoveryMultiKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.MrkAwareStrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.CMM] diff --git a/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy b/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy index 7714244df6..bd55999181 100644 --- a/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy +++ b/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. include "../../StandardLibrary/src/Index.dfy" -module {:extern "software.amazon.cryptography.primitives.internaldafny.types" } AwsCryptographyPrimitivesTypes +module AwsCryptographyPrimitivesTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr index fd608ae8e0..1f38adfb0a 100644 --- a/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.10.1.0" +dafny_version = "4.9.0.0" [options_by_module.AwsCryptographyPrimitivesTypes] legacy-module-names = false python-module-name = "aws_cryptography_primitives.internaldafny.generated" diff --git a/AwsCryptographyPrimitives/src/Index.dfy b/AwsCryptographyPrimitives/src/Index.dfy index 0e49b31506..a0fecaabef 100644 --- a/AwsCryptographyPrimitives/src/Index.dfy +++ b/AwsCryptographyPrimitives/src/Index.dfy @@ -4,7 +4,7 @@ include "../Model/AwsCryptographyPrimitivesTypes.dfy" include "AwsCryptographyPrimitivesOperations.dfy" -module {:extern "software.amazon.cryptography.primitives.internaldafny" } AtomicPrimitives refines AbstractAwsCryptographyPrimitivesService { +module AtomicPrimitives refines AbstractAwsCryptographyPrimitivesService { import Operations = AwsCryptographyPrimitivesOperations function method DefaultCryptoConfig(): CryptoConfig { diff --git a/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy b/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy index b5c3c9fe41..352d376600 100644 --- a/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy +++ b/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. include "../../StandardLibrary/src/Index.dfy" -module {:extern "software.amazon.cryptography.services.dynamodb.internaldafny.types" } ComAmazonawsDynamodbTypes +module ComAmazonawsDynamodbTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr index 9fc68fffee..4b3139b631 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.10.1.0" +dafny_version = "4.9.0.0" [options_by_module.ComAmazonawsDynamodbTypes] legacy-module-names = false python-module-name = "aws_cryptography_internal_dynamodb.internaldafny.generated" diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py index e76a563526..47c22cc785 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py @@ -41,6 +41,15 @@ def com_amazonaws_dynamodb_BatchStatementRequest( if "ConsistentRead" in this_structure: transformed_output["ConsistentRead"] = this_structure["ConsistentRead"] + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + return transformed_output @@ -51,6 +60,13 @@ def com_amazonaws_dynamodb_ReturnConsumedCapacity( return this_structure +def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure, item_handler, condition_handler +): + # Always return input enum + return this_structure + + def com_amazonaws_dynamodb_BatchExecuteStatementOutput( this_structure, item_handler, condition_handler ): @@ -152,6 +168,11 @@ def com_amazonaws_dynamodb_BatchStatementError( if "Message" in this_structure: transformed_output["Message"] = this_structure["Message"] + if "Item" in this_structure: + transformed_output["Item"] = { + key: item_handler(value) for (key, value) in this_structure["Item"].items() + } + return transformed_output @@ -1648,6 +1669,15 @@ def com_amazonaws_dynamodb_DeleteItemInput( for (key, value) in this_structure["ExpressionAttributeValues"].items() } + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + return transformed_output @@ -3007,6 +3037,15 @@ def com_amazonaws_dynamodb_ExecuteStatementInput( if "Limit" in this_structure: transformed_output["Limit"] = this_structure["Limit"] + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + return transformed_output @@ -3074,6 +3113,15 @@ def com_amazonaws_dynamodb_ParameterizedStatement( item_handler(list_element) for list_element in this_structure["Parameters"] ] + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + return transformed_output @@ -3799,6 +3847,15 @@ def com_amazonaws_dynamodb_PutItemInput( for (key, value) in this_structure["ExpressionAttributeValues"].items() } + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + return transformed_output @@ -4609,13 +4666,6 @@ def com_amazonaws_dynamodb_Update(this_structure, item_handler, condition_handle return transformed_output -def com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( - this_structure, item_handler, condition_handler -): - # Always return input enum - return this_structure - - def com_amazonaws_dynamodb_TransactWriteItemsOutput( this_structure, item_handler, condition_handler ): @@ -5101,6 +5151,15 @@ def com_amazonaws_dynamodb_UpdateItemInput( for (key, value) in this_structure["ExpressionAttributeValues"].items() } + if "ReturnValuesOnConditionCheckFailure" in this_structure: + transformed_output["ReturnValuesOnConditionCheckFailure"] = ( + aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ReturnValuesOnConditionCheckFailure( + this_structure["ReturnValuesOnConditionCheckFailure"], + item_handler, + condition_handler, + ) + ) + return transformed_output diff --git a/ComAmazonawsDynamodb/src/Index.dfy b/ComAmazonawsDynamodb/src/Index.dfy index d030b2f3cb..80e72e1918 100644 --- a/ComAmazonawsDynamodb/src/Index.dfy +++ b/ComAmazonawsDynamodb/src/Index.dfy @@ -3,7 +3,7 @@ include "../Model/ComAmazonawsDynamodbTypes.dfy" -module {:extern "software.amazon.cryptography.services.dynamodb.internaldafny"} Com.Amazonaws.Dynamodb refines AbstractComAmazonawsDynamodbService { +module Com.Amazonaws.Dynamodb refines AbstractComAmazonawsDynamodbService { function method DefaultDynamoDBClientConfigType() : DynamoDBClientConfigType { DynamoDBClientConfigType diff --git a/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy b/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy index ff5520a289..3607d7d4a0 100644 --- a/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy +++ b/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. include "../../StandardLibrary/src/Index.dfy" -module {:extern "software.amazon.cryptography.services.kms.internaldafny.types" } ComAmazonawsKmsTypes +module ComAmazonawsKmsTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr index e1adaa3eb2..9824918102 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.10.1.0" +dafny_version = "4.9.0.0" [options_by_module.ComAmazonawsKmsTypes] legacy-module-names = false python-module-name = "aws_cryptography_internal_kms.internaldafny.generated" diff --git a/ComAmazonawsKms/src/Index.dfy b/ComAmazonawsKms/src/Index.dfy index be29bf3797..6f703942e5 100644 --- a/ComAmazonawsKms/src/Index.dfy +++ b/ComAmazonawsKms/src/Index.dfy @@ -3,7 +3,7 @@ include "../Model/ComAmazonawsKmsTypes.dfy" -module {:extern "software.amazon.cryptography.services.kms.internaldafny"} Com.Amazonaws.Kms refines AbstractComAmazonawsKmsService { +module Com.Amazonaws.Kms refines AbstractComAmazonawsKmsService { function method DefaultKMSClientConfigType() : KMSClientConfigType { KMSClientConfigType diff --git a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr index bcf1a9cfc4..6023963af0 100644 --- a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr +++ b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.10.1.0" +dafny_version = "4.9.0.0" [options_by_module.Wrappers] legacy-module-names = false python-module-name = "smithy_dafny_standard_library.internaldafny.generated" diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr index d19314de65..343a277ff2 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/internaldafny/generated/dafny_src-py.dtr @@ -1,5 +1,5 @@ file_format_version = "1.0" -dafny_version = "4.10.1.0" +dafny_version = "4.9.0.0" [options_by_module.MplManifestOptions] legacy-module-names = false python-module-name = "aws_cryptography_materialproviders_test_vectors.internaldafny.generated" diff --git a/libraries b/libraries index c71deb6e53..418de0c6a9 160000 --- a/libraries +++ b/libraries @@ -1 +1 @@ -Subproject commit c71deb6e537856d3ae946649ed49c4979f3c06ac +Subproject commit 418de0c6a911789709d975039b7ead468ee76cc7 From 84b93bd0f10b175919e11e05a274248adb3ba1ca Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 9 Apr 2025 10:57:17 -0700 Subject: [PATCH 04/48] m --- .../src/CMCs/LocalCMC.dfy | 3 +- .../src/CMM.dfy | 102 +-- .../src/CMMs/DefaultCMM.dfy | 171 ++-- .../src/CMMs/RequiredEncryptionContextCMM.dfy | 154 ++-- .../src/KeyWrapping/EcdhEdkWrapping.dfy | 3 +- .../src/KeyWrapping/EdkWrapping.dfy | 39 +- .../KeyWrapping/IntermediateKeyWrapping.dfy | 41 +- .../src/KeyWrapping/MaterialWrapping.dfy | 42 +- .../src/Keyring.dfy | 144 ++-- .../AwsKms/AwsKmsDiscoveryKeyring.dfy | 44 +- .../src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy | 61 +- .../AwsKms/AwsKmsHierarchicalKeyring.dfy | 115 ++- .../src/Keyrings/AwsKms/AwsKmsKeyring.dfy | 173 ++-- .../AwsKms/AwsKmsMrkDiscoveryKeyring.dfy | 46 +- .../src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy | 52 +- .../src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy | 51 +- .../src/Keyrings/AwsKms/Constants.dfy | 20 +- .../src/Keyrings/MultiKeyring.dfy | 166 +--- .../src/Keyrings/RawAESKeyring.dfy | 54 +- .../src/Keyrings/RawECDHKeyring.dfy | 59 +- .../src/Keyrings/RawRSAKeyring.dfy | 52 +- .../test/CMCs/LocalCMC.dfy | 12 +- .../test/CMCs/StormTracker.dfy | 53 +- .../TestAwsKmsHierarchicalKeyring.dfy | 18 +- .../test/TestErrorMessages.dfy | 43 +- .../AwsCryptographyKeyStore/test/Fixtures.dfy | 11 +- .../to_dafny.go | 16 +- .../to_native.go | 39 +- .../to_dafny.go | 156 ++-- .../to_native.go | 338 +++++--- .../to_dafny.go | 16 +- .../to_native.go | 39 +- .../to_dafny.go | 156 ++-- .../to_native.go | 338 +++++--- .../runtimes/rust/src/aes_gcm.rs | 53 +- .../runtimes/rust/src/aes_kdf_ctr.rs | 10 +- .../runtimes/rust/src/dafny_libraries.rs | 13 - .../runtimes/rust/src/digest.rs | 10 +- .../runtimes/rust/src/ecdh.rs | 44 +- .../runtimes/rust/src/ecdsa.rs | 22 +- .../runtimes/rust/src/hmac.rs | 31 +- .../runtimes/rust/src/impl_add.rs | 7 + .../runtimes/rust/src/lib.rs | 6 +- .../runtimes/rust/src/oslang.rs | 25 +- .../runtimes/rust/src/random.rs | 6 +- .../runtimes/rust/src/rsa.rs | 27 +- .../runtimes/rust/src/sets.rs | 2 +- .../runtimes/rust/src/uuid.rs | 4 +- .../runtimes/rust/tests/local_cmc_tests.rs | 55 +- .../to_dafny.go | 240 +++--- .../to_native.go | 780 +++++++++++------- .../to_dafny.go | 240 +++--- .../to_native.go | 780 +++++++++++------- .../test/TestKDF_TestVectors.dfy | 5 +- .../to_dafny.go | 44 +- .../to_native.go | 26 +- .../to_dafny.go | 44 +- .../to_native.go | 26 +- .../to_dafny.go | 144 ++-- .../to_native.go | 468 +++++++---- .../to_dafny.go | 144 ++-- .../to_native.go | 468 +++++++---- StandardLibrary/src/Actions.dfy | 5 - StandardLibrary/src/Sequence.dfy | 40 - StandardLibrary/src/Time.dfy | 21 +- StandardLibrary/src/UInt.dfy | 15 - StandardLibrary/src/UTF8.dfy | 139 +--- .../src/TestManifests.dfy | 15 - .../to_dafny.go | 12 +- .../to_native.go | 26 +- .../to_dafny.go | 12 +- .../to_native.go | 26 +- 72 files changed, 3373 insertions(+), 3489 deletions(-) create mode 100644 AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy index d3516f09fa..8f5dc266de 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy @@ -588,8 +588,7 @@ module {:options "/functionSyntax:4" } LocalCMC { assert MutableMapIsInjective(cache) by { // Since the map values are themselves heap objects, we need to check that they too are unchanged - assert forall k <- cache.Keys() :: old(allocated(cache.Select(k))); - assert forall k <- cache.Keys() :: unchanged(cache.Select(k)); + assert forall k <- cache.Keys() :: old(allocated(cache.Select(k))) && unchanged(cache.Select(k)); assert MutableMapIsInjective(old@CAN_REMOVE(cache)); assert MutableMapContains(old@CAN_REMOVE(cache), cache); diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy index be0c7217fe..c9dbc230c2 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy @@ -12,65 +12,49 @@ module {:options "/functionSyntax:4" } CMM { trait {:termination false} VerifiableInterface extends Types.ICryptographicMaterialsManager { + method GetEncryptionMaterials'(input: Types.GetEncryptionMaterialsInput) + returns (output: Result) + requires ValidState() + modifies Modifies - {History} + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures ValidState() + ensures GetEncryptionMaterialsEnsuresPublicly(input, output) + ensures unchanged(History) + ensures output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + ensures output.Success? + ==> + && RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - ghost predicate GetEncryptionMaterialsEnsuresPublicly(input: Types.GetEncryptionMaterialsInput, output: Result) - : (outcome: bool) + method DecryptMaterials'(input: Types.DecryptMaterialsInput) + returns (output: Result) + requires ValidState() + modifies Modifies - {History} + // Dafny will skip type parameters when generating a default decreases clause. + decreases Modifies - {History} + ensures ValidState() + ensures DecryptMaterialsEnsuresPublicly(input, output) + ensures unchanged(History) + ensures output.Success? + ==> + && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. ensures - outcome ==> - output.Success? - ==> - // if the output materials are valid then they contain the required fields - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# The encryption materials returned MUST include the following: - - // See EncryptionMaterialsHasPlaintextDataKey for details - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# The CMM MUST ensure that the encryption materials returned are valid. - //# - The encryption materials returned MUST follow the specification for [encryption-materials](structures.md#encryption-materials). - //# - The value of the plaintext data key MUST be non-NULL. - //# - The plaintext data key length MUST be equal to the [key derivation input length](algorithm-suites.md#key-derivation-input-length). - //# - The encrypted data keys list MUST contain at least one encrypted data key. - //# - If the algorithm suite contains a signing algorithm, the encryption materials returned MUST include the generated signing key. - //# - For every key in [Required Encryption Context Keys](structures.md#required-encryption-context-keys) - //# there MUST be a matching key in the [Encryption Context](structures.md#encryption-context-1). - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# - The [Required Encryption Context Keys](structures.md#required-encryption-context-keys) MUST be - //# a super set of the Required Encryption Context Keys in the [encryption materials request](#encryption-materials-request). - && RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - - ghost predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) - : (outcome: bool) - ensures - outcome ==> - // if the output materials are valid then they contain the required fields - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The decryption materials returned MUST include the following: - && (output.Success? - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The CMM MUST ensure that the decryption materials returned are valid. - //# - The decryption materials returned MUST follow the specification for [decryption-materials](structures.md#decryption-materials). - //# - The value of the plaintext data key MUST be non-NULL. - ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. - && (output.Success? ==> ReproducedEncryptionContext?(input)) - && (!ReproducedEncryptionContext?(input) ==> output.Failure?) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. - && (output.Success? ==> EncryptionContextComplete(input, output.value.decryptionMaterials)) + && (output.Success? ==> ReproducedEncryptionContext?(input)) + && (!ReproducedEncryptionContext?(input) ==> output.Failure?) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. + ensures output.Success? ==> EncryptionContextComplete(input, output.value.decryptionMaterials) } predicate RequiredEncryptionContextKeys?(requiredEncryptionContextKeys: Option, encryptionMaterials: Types.EncryptionMaterials) { @@ -80,7 +64,7 @@ module {:options "/functionSyntax:4" } CMM { predicate EncryptionContextComplete(input: Types.DecryptMaterialsInput, decryptionMaterials: Types.DecryptionMaterials) { var reproducedEncryptionContext := input.reproducedEncryptionContext.UnwrapOr(map[]); - forall k <- reproducedEncryptionContext + forall k <- reproducedEncryptionContext.Keys :: && k in decryptionMaterials.encryptionContext && decryptionMaterials.encryptionContext[k] == reproducedEncryptionContext[k] @@ -88,7 +72,7 @@ module {:options "/functionSyntax:4" } CMM { predicate ReproducedEncryptionContext?(input: Types.DecryptMaterialsInput) { var reproducedEncryptionContext := input.reproducedEncryptionContext.UnwrapOr(map[]); - forall k <- reproducedEncryptionContext + forall k <- reproducedEncryptionContext.Keys | k in input.encryptionContext :: input.encryptionContext[k] == reproducedEncryptionContext[k] } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy index 05ca5b26be..6b4b193af7 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy @@ -7,8 +7,6 @@ include "../CMM.dfy" include "../Defaults.dfy" include "../Commitment.dfy" include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" -include "../Keyring.dfy" -include "../Keyrings/MultiKeyring.dfy" module DefaultCMM { import opened Wrappers @@ -21,18 +19,16 @@ module DefaultCMM { import UTF8 import Types = AwsCryptographyMaterialProvidersTypes import Crypto = AwsCryptographyPrimitivesTypes - import Primitives = AtomicPrimitives + import AtomicPrimitives import Defaults import Commitment import Seq import SortedSets - import Keyring - import MultiKeyring class DefaultCMM extends CMM.VerifiableInterface { - const cryptoPrimitives: Primitives.AtomicPrimitivesClient + const cryptoPrimitives: AtomicPrimitives.AtomicPrimitivesClient predicate ValidState() ensures ValidState() ==> History in Modifies @@ -55,7 +51,7 @@ module DefaultCMM { //# the caller MUST provide the following value: //# - [Keyring](#keyring) k: Types.IKeyring, - c: Primitives.AtomicPrimitivesClient + c: AtomicPrimitives.AtomicPrimitivesClient ) requires k.ValidState() && c.ValidState() ensures keyring == k && cryptoPrimitives == c @@ -74,19 +70,7 @@ module DefaultCMM { } predicate GetEncryptionMaterialsEnsuresPublicly(input: Types.GetEncryptionMaterialsInput, output: Result) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - } + {true} // The following are requirements for the CMM interface. // However they are requirments of intent @@ -117,6 +101,34 @@ module DefaultCMM { ensures GetEncryptionMaterialsEnsuresPublicly(input, output) ensures unchanged(History) + // if the output materials are valid then they contain the required fields + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# The encryption materials returned MUST include the following: + + // See EncryptionMaterialsHasPlaintextDataKey for details + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# The CMM MUST ensure that the encryption materials returned are valid. + //# - The encryption materials returned MUST follow the specification for [encryption-materials](structures.md#encryption-materials). + //# - The value of the plaintext data key MUST be non-NULL. + //# - The plaintext data key length MUST be equal to the [key derivation input length](algorithm-suites.md#key-derivation-input-length). + //# - The encrypted data keys list MUST contain at least one encrypted data key. + //# - If the algorithm suite contains a signing algorithm, the encryption materials returned MUST include the generated signing key. + //# - For every key in [Required Encryption Context Keys](structures.md#required-encryption-context-keys) + //# there MUST be a matching key in the [Encryption Context](structures.md#encryption-context-1). + ensures output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# - The [Required Encryption Context Keys](structures.md#required-encryption-context-keys) MUST be + //# a super set of the Required Encryption Context Keys in the [encryption materials request](#encryption-materials-request). + ensures output.Success? + ==> + && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials //= type=implication //# If the algorithm suite contains a [signing algorithm](algorithm-suites.md#signature-algorithm): @@ -274,58 +286,25 @@ module DefaultCMM { var result :- keyring.OnEncrypt(Types.OnEncryptInput(materials:=materials)); var encryptionMaterialsOutput := Types.GetEncryptionMaterialsOutput(encryptionMaterials:=result.materials); - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || MultiKeyring.Verified?(keyring) - || keyring is MultiKeyring.MultiKeyring - ) { - :- Need( - Materials.EncryptionMaterialsHasPlaintextDataKey(encryptionMaterialsOutput.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Could not retrieve materials required for encryption")); - - :- Need( - Materials.ValidEncryptionMaterialsTransition(materials, encryptionMaterialsOutput.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring returned an invalid response")); - } + :- Need( + Materials.EncryptionMaterialsHasPlaintextDataKey(encryptionMaterialsOutput.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Could not retrieve materials required for encryption")); + + // For Dafny keyrings this is a trivial statement + // because they implement a trait that ensures this. + // However not all keyrings are Dafny keyrings. + // Customers can create custom keyrings. + :- Need( + Materials.ValidEncryptionMaterialsTransition(materials, encryptionMaterialsOutput.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring returned an invalid response")); output := Success(encryptionMaterialsOutput); } predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) - : (outcome: bool) - ensures - outcome ==> - (output.Success? - ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) - && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) - && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) - { - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. - && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) - && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) - && (output.Success? - ==> - && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. - && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) - } + {true} // The following are requirements for the CMM interface. // However they are requirments of intent @@ -365,6 +344,43 @@ module DefaultCMM { ensures DecryptMaterialsEnsuresPublicly(input, output) ensures unchanged(History) + // if the output materials are valid then they contain the required fields + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The decryption materials returned MUST include the following: + + // See DecryptionMaterialsWithPlaintextDataKey for details + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All keys in this set MUST exist in the decryption materials encryption context. + // + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The CMM MUST ensure that the decryption materials returned are valid. + //# - The decryption materials returned MUST follow the specification for [decryption-materials](structures.md#decryption-materials). + //# - The value of the plaintext data key MUST be non-NULL. + ensures output.Success? + ==> + && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials) + + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. + ensures + && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) + && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. + ensures output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials //= type=implication //# If the requested algorithm suite does not include a signing algorithm @@ -509,19 +525,14 @@ module DefaultCMM { encryptedDataKeys:=input.encryptedDataKeys )); - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || MultiKeyring.Verified?(keyring) - || keyring is MultiKeyring.MultiKeyring - ) { - :- Need( - Materials.DecryptionMaterialsTransitionIsValid(materials, result.materials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); - } + // For Dafny keyrings this is a trivial statement + // because they implement a trait that ensures this. + // However not all keyrings are Dafny keyrings. + // Customers can create custom keyrings. + :- Need( + Materials.DecryptionMaterialsTransitionIsValid(materials, result.materials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); return Success(Types.DecryptMaterialsOutput(decryptionMaterials:=result.materials)); } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy index 9d762243ea..3c7ef03669 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy @@ -7,7 +7,6 @@ include "../CMM.dfy" include "../Defaults.dfy" include "../Commitment.dfy" include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" -include "DefaultCMM.dfy" module RequiredEncryptionContextCMM { import opened Wrappers @@ -19,8 +18,6 @@ module RequiredEncryptionContextCMM { import Seq import SortedSets - import DefaultCMM - class RequiredEncryptionContextCMM extends CMM.VerifiableInterface { @@ -68,19 +65,7 @@ module RequiredEncryptionContextCMM { } predicate GetEncryptionMaterialsEnsuresPublicly(input: Types.GetEncryptionMaterialsInput, output: Result) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - } + {true} method GetEncryptionMaterials'( input: Types.GetEncryptionMaterialsInput @@ -180,63 +165,29 @@ module RequiredEncryptionContextCMM { Some(input.requiredEncryptionContextKeys.UnwrapOr([]) + requiredEncryptionContextKeys)) ); - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || underlyingCMM is DefaultCMM.DefaultCMM - || underlyingCMM is RequiredEncryptionContextCMM - ) { - - :- Need(forall k <- requiredEncryptionContextKeys :: k in result.encryptionMaterials.requiredEncryptionContextKeys, - Types.AwsCryptographicMaterialProvidersException( - message := "Expected encryption context keys do not exist in keys to only authenticate.") - ); - - :- Need( - Materials.EncryptionMaterialsHasPlaintextDataKey(result.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Could not retrieve materials required for encryption")); - :- Need( - CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, result.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring returned an invalid response")); - } + :- Need(forall k <- requiredEncryptionContextKeys :: k in result.encryptionMaterials.requiredEncryptionContextKeys, + Types.AwsCryptographicMaterialProvidersException( + message := "Expected encryption context keys do not exist in keys to only authenticate.") + ); + + // For Dafny keyrings this is a trivial statement + // because they implement a trait that ensures this. + // However not all keyrings are Dafny keyrings. + // Customers can create custom keyrings. + :- Need( + Materials.EncryptionMaterialsHasPlaintextDataKey(result.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Could not retrieve materials required for encryption")); + :- Need( + CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, result.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring returned an invalid response")); output := Success(result); } predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) - : (outcome: bool) - ensures - outcome ==> - (output.Success? - ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) - && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) - && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) - { - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. - && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) - && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) - && (output.Success? - ==> - && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. - && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) - } + {true} method DecryptMaterials'( input: Types.DecryptMaterialsInput @@ -252,6 +203,28 @@ module RequiredEncryptionContextCMM { ensures DecryptMaterialsEnsuresPublicly(input, output) ensures unchanged(History) + ensures output.Success? + ==> + && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials) + + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. + ensures + && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) + && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. + ensures output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials) + //= aws-encryption-sdk-specification/framework/required-encryption-context-cmm.md#decrypt-materials //= type=implication //# The reproduced encryption context on the [decrypt materials request](./cmm-interface.md#decrypt-materials-request) @@ -312,33 +285,24 @@ module RequiredEncryptionContextCMM { var result :- underlyingCMM.DecryptMaterials(input); - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || underlyingCMM is DefaultCMM.DefaultCMM - || underlyingCMM is RequiredEncryptionContextCMM - ) { - :- Need(forall k <- requiredEncryptionContextKeys :: k in result.decryptionMaterials.encryptionContext, - Types.AwsCryptographicMaterialProvidersException( - message := "Final encryption context missing required keys.") - ); - - :- Need(CMM.EncryptionContextComplete(input, result.decryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Reproduced encryption context missing from encryption context.") - ); - - // For Dafny keyrings this is a trivial statement - // because they implement a trait that ensures this. - // However not all keyrings are Dafny keyrings. - // Customers can create custom keyrings. - :- Need( - Materials.DecryptionMaterialsWithPlaintextDataKey(result.decryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); - } + :- Need(forall k <- requiredEncryptionContextKeys :: k in result.decryptionMaterials.encryptionContext, + Types.AwsCryptographicMaterialProvidersException( + message := "Final encryption context missing required keys.") + ); + + :- Need(CMM.EncryptionContextComplete(input, result.decryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Reproduced encryption context missing from encryption context.") + ); + + // For Dafny keyrings this is a trivial statement + // because they implement a trait that ensures this. + // However not all keyrings are Dafny keyrings. + // Customers can create custom keyrings. + :- Need( + Materials.DecryptionMaterialsWithPlaintextDataKey(result.decryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); return Success(result); } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy index 3c4f7d17ce..9f5b9c5c7c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy @@ -299,8 +299,7 @@ module {:options "/functionSyntax:4" } EcdhEdkWrapping { MaterialWrapping.WrapInput( plaintextMaterial := pdk, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext, - serializedEC := input.serializedEC + encryptionContext := input.encryptionContext ), []); var output := MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy index e1d597c077..f064f47541 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy @@ -93,9 +93,7 @@ module EdkWrapping { WrapInput( plaintextMaterial := encryptionMaterials.plaintextDataKey.value, algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) - ), + encryptionContext := encryptionMaterials.encryptionContext), Success(wrapRes), []) @@ -115,9 +113,7 @@ module EdkWrapping { && generateAndWrap.Ensures( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) - ), + encryptionContext := encryptionMaterials.encryptionContext), Success( MaterialWrapping.GenerateAndWrapOutput( plaintextMaterial := ret.value.intermediateMaterial.value, @@ -142,9 +138,7 @@ module EdkWrapping { && generateAndWrap.Ensures( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) - ), + encryptionContext := encryptionMaterials.encryptionContext), Success(generateAndWrapRes), []) && |ret.value.plaintextDataKey| == AlgorithmSuites.GetEncryptKeyLength(encryptionMaterials.algorithmSuite) as nat @@ -164,9 +158,7 @@ module EdkWrapping { && generateAndWrap.Ensures( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) - ), + encryptionContext := encryptionMaterials.encryptionContext), Success( MaterialWrapping.GenerateAndWrapOutput( plaintextMaterial := ret.value.intermediateMaterial.value, @@ -176,7 +168,6 @@ module EdkWrapping { wrapInfo := ret.value.wrapInfo)), []) { - // It would be nice if we could require this. :- Need(Materials.ValidEncryptionMaterials(encryptionMaterials), Types.AwsCryptographicMaterialProvidersException( message := "Invalid materials for encryption.")); @@ -188,8 +179,7 @@ module EdkWrapping { WrapInput( plaintextMaterial := encryptionMaterials.plaintextDataKey.value, algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) + encryptionContext := encryptionMaterials.encryptionContext ), []); return Success( @@ -225,8 +215,7 @@ module EdkWrapping { var directOutput :- generateAndWrap.Invoke( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) + encryptionContext := encryptionMaterials.encryptionContext ), []); return Success( @@ -284,9 +273,7 @@ module EdkWrapping { UnwrapInput( wrappedMaterial := wrappedMaterial, algorithmSuite := decryptionMaterials.algorithmSuite, - encryptionContext := decryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(decryptionMaterials.encryptionContext) - ), + encryptionContext := decryptionMaterials.encryptionContext), Failure(ret.error), []) @@ -306,13 +293,10 @@ module EdkWrapping { UnwrapInput( wrappedMaterial := maybeProviderWrappedMaterial.value, algorithmSuite := decryptionMaterials.algorithmSuite, - encryptionContext := decryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(decryptionMaterials.encryptionContext) - ), + encryptionContext := decryptionMaterials.encryptionContext), Success(unwrapRes), []) { - // TODO require this :- Need(Materials.ValidDecryptionMaterials(decryptionMaterials), Types.AwsCryptographicMaterialProvidersException( message := "Invalid materials for decryption.")); @@ -322,11 +306,8 @@ module EdkWrapping { UnwrapInput( wrappedMaterial := wrappedMaterial, algorithmSuite := decryptionMaterials.algorithmSuite, - encryptionContext := decryptionMaterials.encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(decryptionMaterials.encryptionContext) - ), - [] - ); + encryptionContext := decryptionMaterials.encryptionContext + ), []); return Success( UnwrapEdkMaterialOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy index c8218c45c0..6da1f5b43a 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy @@ -21,15 +21,8 @@ module IntermediateKeyWrapping { import HKDF import CanonicalEncryptionContext - const KEYWRAP_MAC_INFO : UTF8.ValidUTF8Bytes := - var s := [0x41, 0x57, 0x53, 0x5f, 0x4d, 0x50, 0x4c, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x57, 0x52, 0x41, 0x50, 0x5f, 0x4d, 0x41, 0x43]; - assert s == UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_MAC"); - s - - const KEYWRAP_ENC_INFO : UTF8.ValidUTF8Bytes := - var s := [0x41, 0x57, 0x53, 0x5f, 0x4d, 0x50, 0x4c, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x57, 0x52, 0x41, 0x50, 0x5f, 0x45, 0x4e, 0x43]; - assert s == UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_ENC"); - s + const KEYWRAP_MAC_INFO := UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_MAC") + const KEYWRAP_ENC_INFO := UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_ENC") datatype IntermediateUnwrapOutput = IntermediateUnwrapOutput( nameonly plaintextDataKey: seq, @@ -76,9 +69,7 @@ module IntermediateKeyWrapping { UnwrapInput( wrappedMaterial := maybeIntermediateWrappedMat.value.providerWrappedIkm, encryptionContext := encryptionContext, - algorithmSuite := algorithmSuite, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) - ), + algorithmSuite := algorithmSuite), Success(unwrapRes), []) @@ -91,14 +82,12 @@ module IntermediateKeyWrapping { // Deserialize the Intermediate-Wrapped material var deserializedWrapped :- DeserializeIntermediateWrappedMaterial(wrappedMaterial, algorithmSuite); var DeserializedIntermediateWrappedMaterial(encryptedPdk, providerWrappedIkm) := deserializedWrapped; - var serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext); var unwrapOutput :- unwrap.Invoke( UnwrapInput( wrappedMaterial := providerWrappedIkm, encryptionContext := encryptionContext, - algorithmSuite := algorithmSuite, - serializedEC := serializedEC + algorithmSuite := algorithmSuite ), []); var UnwrapOutput(intermediateMaterial, unwrapInfo) := unwrapOutput; @@ -113,7 +102,7 @@ module IntermediateKeyWrapping { // Decrypt the plaintext data key with the pdkEncryptionKey var iv: seq := seq(AlgorithmSuites.GetEncryptIvLength(algorithmSuite) as nat, _ => 0); // IV is zero var tagIndex := |encryptedPdk| - AlgorithmSuites.GetEncryptTagLength(algorithmSuite) as nat; - var aad :- serializedEC; + var aad :- CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext); var decInput := Crypto.AESDecryptInput( encAlg := algorithmSuite.encrypt.AES_GCM, @@ -126,7 +115,9 @@ module IntermediateKeyWrapping { var decOutR := cryptoPrimitives.AESDecrypt(decInput); var plaintextDataKey :- decOutR.MapFailure(e => Types.AwsCryptographyPrimitives(e)); - assert |plaintextDataKey| == AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) as nat; + :- Need(|plaintextDataKey| == AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) as nat, + Types.AwsCryptographicMaterialProvidersException( + message := "Unexpected AES_GCM Decrypt length")); return Success(IntermediateUnwrapOutput( plaintextDataKey := plaintextDataKey, @@ -154,9 +145,7 @@ module IntermediateKeyWrapping { && generateAndWrap.Ensures( GenerateAndWrapInput( algorithmSuite := algorithmSuite, - encryptionContext := encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) - ), + encryptionContext := encryptionContext), Success( GenerateAndWrapOutput( plaintextMaterial := res.value.intermediateMaterial, @@ -191,8 +180,7 @@ module IntermediateKeyWrapping { var generateAndWrapOutput :- generateAndWrap.Invoke( GenerateAndWrapInput( algorithmSuite := algorithmSuite, - encryptionContext := encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) + encryptionContext := encryptionContext ), []); //= aws-encryption-sdk-specification/framework/algorithm-suites.md#intermediate-key-wrapping @@ -226,8 +214,10 @@ module IntermediateKeyWrapping { var encOutR := cryptoPrimitives.AESEncrypt(encInput); var encryptedPdk :- encOutR.MapFailure(e => Types.AwsCryptographyPrimitives(e)); - assert |encryptedPdk.cipherText + encryptedPdk.authTag| == - (AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) + AlgorithmSuites.GetEncryptTagLength(algorithmSuite)) as nat; + :- Need(|encryptedPdk.cipherText + encryptedPdk.authTag| == + (AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) + AlgorithmSuites.GetEncryptTagLength(algorithmSuite)) as nat, + Types.AwsCryptographicMaterialProvidersException( + message := "Unexpected AES_GCM Encrypt length")); var serializedMaterial := encryptedPdk.cipherText + encryptedPdk.authTag + providerWrappedIkm; @@ -254,8 +244,7 @@ module IntermediateKeyWrapping { && maybeIntermediateWrappedMat.Success? && generateAndWrap.Ensures(GenerateAndWrapInput( algorithmSuite := algorithmSuite, - encryptionContext := encryptionContext, - serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) + encryptionContext := encryptionContext ), Success( GenerateAndWrapOutput( plaintextMaterial := res.value.intermediateMaterial, diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy index 143ae3c96c..123762822e 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy @@ -3,7 +3,6 @@ include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" include "../Materials.dfy" -include "../CanonicalEncryptionContext.dfy" // Traits and related data types to help keyring encapsulate // wrap/unwrap/generate logic for use with the helper methods @@ -17,12 +16,10 @@ module MaterialWrapping { import AtomicPrimitives import Materials import AlgorithmSuites - import CanonicalEncryptionContext datatype GenerateAndWrapInput = GenerateAndWrapInput( nameonly algorithmSuite: Types.AlgorithmSuiteInfo, - nameonly encryptionContext: Types.EncryptionContext, - nameonly serializedEC:Result, Types.Error> + nameonly encryptionContext: Types.EncryptionContext ) datatype GenerateAndWrapOutput = GenerateAndWrapOutput( @@ -34,8 +31,7 @@ module MaterialWrapping { datatype WrapInput = WrapInput( nameonly plaintextMaterial: seq, nameonly algorithmSuite: Types.AlgorithmSuiteInfo, - nameonly encryptionContext: Types.EncryptionContext, - nameonly serializedEC:Result, Types.Error> + nameonly encryptionContext: Types.EncryptionContext ) datatype WrapOutput = WrapOutput( @@ -46,8 +42,7 @@ module MaterialWrapping { datatype UnwrapInput = UnwrapInput( nameonly wrappedMaterial: seq, nameonly algorithmSuite: Types.AlgorithmSuiteInfo, - nameonly encryptionContext: Types.EncryptionContext, - nameonly serializedEC:Result, Types.Error> + nameonly encryptionContext: Types.EncryptionContext ) datatype UnwrapOutput = UnwrapOutput( @@ -62,15 +57,15 @@ module MaterialWrapping { // of creating necessary key material and performing the Keyring's method of wrapping such material. // Note that the material being generated by `GenerateAndWrapMaterial` may either be the plaintext data key // or the intermediate data key, depending on the EDK Wrapping Algorithm in use. - // We explicitly separate `WrapMaterial` and `GenerateAndWrap` as separate Actions because: + // We explictly seperate `WrapMaterial` and `GenerateAndWrap` as seperate Actions because: // 1. The Keyring may want to utilize a specific method for generating random bytes, // such as the AWS KMS Keyring via KMS::GenerateDataKey. // Keyrings that do not have such optimizations SHOULD implement this by // generating cryptographically secure bytes of the correct length and delegating to `WrapMaterial` - // 2. By separating these Actions, we can have EdkWrapping implement the logic + // 2. By seperating these Actions, we can have EdkWrapping implement the logic // to decide whether it is necessary to generate new material in the right contexts, // as opposed to requiring each Keyring to ensure they implement the - // switch on the existence of an input pdk correctly. + // switch on the existencing of an input pdk correctly. // // `UnwrapMaterial` is used during `UnwrapEdkMaterial` for the purpose of unwrapping // a set of material originally wrapped by `WrapMaterial`. @@ -80,19 +75,11 @@ module MaterialWrapping { method Invoke(input: GenerateAndWrapInput, ghost attemptsState: seq, Types.Error>>>) returns (r: Result, Types.Error>) requires Invariant() - requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(input, r, attemptsState) ensures r.Success? ==> |r.value.plaintextMaterial| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat - - predicate Requires(input: GenerateAndWrapInput) - : (outcome: bool) - { - && input.serializedEC == CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext) - } - } trait {:termination false} WrapMaterial @@ -101,17 +88,10 @@ module MaterialWrapping { method Invoke(input: WrapInput, ghost attemptsState: seq, Types.Error>>>) returns (r: Result, Types.Error>) requires Invariant() - requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(input, r, attemptsState) - - predicate Requires(input: WrapInput) - : (outcome: bool) - { - && input.serializedEC == CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext) - } } trait {:termination false} UnwrapMaterial @@ -120,20 +100,10 @@ module MaterialWrapping { method Invoke(input: UnwrapInput, ghost attemptsState: seq, Types.Error>>>) returns (r: Result, Types.Error>) requires Invariant() - requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(input, r, attemptsState) ensures r.Success? ==> |r.value.unwrappedMaterial| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat - - predicate Requires(input: UnwrapInput) - : (outcome: bool) - { - && input.serializedEC == CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext) - } - } - - } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy index c98143c99d..699a994fa7 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy @@ -4,7 +4,7 @@ include "../Model/AwsCryptographyMaterialProvidersTypes.dfy" include "Materials.dfy" -module {:options "/functionSyntax:4" } Keyring { +module Keyring { import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes import Materials @@ -12,9 +12,14 @@ module {:options "/functionSyntax:4" } Keyring { trait {:termination false} VerifiableInterface extends Types.IKeyring { - - ghost predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) - : (outcome: bool) + method OnEncrypt'(input: Types.OnEncryptInput) + returns (output: Result) + requires ValidState() + modifies Modifies - {History} + decreases Modifies - {History} + ensures ValidState() + ensures OnEncryptEnsuresPublicly(input, output) + ensures unchanged(History) //= aws-encryption-sdk-specification/framework/keyring-interface.md#onencrypt //= type=implication //# It MUST modify it with at least one of the following behaviors: @@ -22,49 +27,52 @@ module {:options "/functionSyntax:4" } Keyring { //# - [Encrypt data key](#encrypt-data-key) //# If this keyring attempted any of the above behaviors, and successfully completed those behaviors, //# it MUST output the modified [encryption materials](structures.md#encryption-materials). - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - // See the details of ValidEncryptionMaterialsTransition for the following + ensures output.Success? + ==> + // See the details of ValidEncryptionMaterialsTransition for the following - //= aws-encryption-sdk-specification/framework/keyring-interface.md#generate-data-key - //= type=implication - //# If the [encryption materials](structures.md#encryption-materials) do not contain a plaintext data key, - //# OnEncrypt MUST generate a data key. - //# If the encryption materials contain a plaintext data key, OnEncrypt MUST NOT generate a data key. - //# - //# Generate Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): - //# - //# - [plaintext data key](structures.md#plaintext-data-key) - //# - //# To perform this behavior, the keyring generates a [plaintext data key](structures.md#plaintext-data-key) - //# and sets the resulting plaintext data key on the [encryption materials](structures.md#encryption-materials). - //# - //# The length of the output plaintext data key MUST be equal to the KDF input length of the [algorithm suite](algorithm-suites.md) - //# specified in the [encryption materials](structures.md#encryption-materials). - //# The value of the plaintext data key MUST consist of cryptographically secure (pseudo-)random bits. - //# - //# Note: If the keyring successfully performs this behavior, this means that the keyring MAY then - //# perform the [Encrypt Data Key](#encrypt-data-key) behavior. + //= aws-encryption-sdk-specification/framework/keyring-interface.md#generate-data-key + //= type=implication + //# If the [encryption materials](structures.md#encryption-materials) do not contain a plaintext data key, + //# OnEncrypt MUST generate a data key. + //# If the encryption materials contain a plaintext data key, OnEncrypt MUST NOT generate a data key. + //# + //# Generate Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): + //# + //# - [plaintext data key](structures.md#plaintext-data-key) + //# + //# To perform this behavior, the keyring generates a [plaintext data key](structures.md#plaintext-data-key) + //# and sets the resulting plaintext data key on the [encryption materials](structures.md#encryption-materials). + //# + //# The length of the output plaintext data key MUST be equal to the KDF input length of the [algorithm suite](algorithm-suites.md) + //# specified in the [encryption materials](structures.md#encryption-materials). + //# The value of the plaintext data key MUST consist of cryptographically secure (pseudo-)random bits. + //# + //# Note: If the keyring successfully performs this behavior, this means that the keyring MAY then + //# perform the [Encrypt Data Key](#encrypt-data-key) behavior. - //= aws-encryption-sdk-specification/framework/keyring-interface.md#encrypt-data-key - //= type=implication - //# If the [encryption materials](structures.md#encryption-materials) contain a plaintext data key, - //# OnEncrypt MUST encrypt a data key. - //# If the encryption materials do not contain a plaintext data key, OnEncrypt MUST NOT encrypt a data key. - //# - //# Encrypt Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): - //# - //# - [encrypted data keys](structures.md#encrypted-data-keys) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) + //= aws-encryption-sdk-specification/framework/keyring-interface.md#encrypt-data-key + //= type=implication + //# If the [encryption materials](structures.md#encryption-materials) contain a plaintext data key, + //# OnEncrypt MUST encrypt a data key. + //# If the encryption materials do not contain a plaintext data key, OnEncrypt MUST NOT encrypt a data key. + //# + //# Encrypt Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): + //# + //# - [encrypted data keys](structures.md#encrypted-data-keys) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) - ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) + method OnDecrypt'(input: Types.OnDecryptInput) + returns (output: Result) + requires ValidState() + modifies Modifies - {History} + decreases Modifies - {History} + ensures ValidState() + ensures OnDecryptEnsuresPublicly(input, output) + ensures unchanged(History) //= aws-encryption-sdk-specification/framework/keyring-interface.md#ondecrypt //= type=implication //# It MUST modify it with the following behavior: @@ -76,31 +84,29 @@ module {:options "/functionSyntax:4" } Keyring { //# and MUST NOT modify the [decryption materials](structures.md#decryption-materials). //# //# If this keyring attempted the above behavior, and succeeded, it MUST output the modified [decryption materials](structures.md#decryption-materials). - ensures - outcome ==> - output.Success? - ==> - // See the details of DecryptionMaterialsTransitionIsValid for the following + ensures output.Success? + ==> + // See the details of DecryptionMaterialsTransitionIsValid for the following - //= aws-encryption-sdk-specification/framework/keyring-interface.md#decrypt-data-key - //= type=implication - //# If the encryption materials do contain a plaintext data key, OnDecrypt MUST NOT decrypt a data key. - //# If the [decryption materials](structures.md#decryption-materials) do not include a plaintext data key, - //# OnDecrypt MUST decrypt a data key. - //# - //# The decrypt data key MUST modify the following fields in the [decryption materials](structures.md#decryption-materials): - //# - //# - [Plaintext data key](structures.md#plaintext-data-key-1) - //# - //# To perform this behavior, the keyring attempts to retrieve a plaintext data key from the input list - //# of [encrypted data keys](structures.md#encrypted-data-key). - //# - //# If the keyring is able to succesfully get at least one plaintext data key from any [encrypted data key](structures.md#encrypted-data-key) - //# and the [decryption materials](structures.md#decryption-materials) still do not include a plaintext data key, - //# it SHOULD set one resulting plaintext data key on the [decryption materials](structures.md#decryption-materials). - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) + //= aws-encryption-sdk-specification/framework/keyring-interface.md#decrypt-data-key + //= type=implication + //# If the encryption materials do contain a plaintext data key, OnDecrypt MUST NOT decrypt a data key. + //# If the [decryption materials](structures.md#decryption-materials) do not include a plaintext data key, + //# OnDecrypt MUST decrypt a data key. + //# + //# The decrypt data key MUST modify the following fields in the [decryption materials](structures.md#decryption-materials): + //# + //# - [Plaintext data key](structures.md#plaintext-data-key-1) + //# + //# To perform this behavior, the keyring attempts to retrieve a plaintext data key from the input list + //# of [encrypted data keys](structures.md#encrypted-data-key). + //# + //# If the keyring is able to succesfully get at least one plaintext data key from any [encrypted data key](structures.md#encrypted-data-key) + //# and the [decryption materials](structures.md#decryption-materials) still do not include a plaintext data key, + //# it SHOULD set one resulting plaintext data key on the [decryption materials](structures.md#decryption-materials). + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) } } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy index da08f81115..40febeac1b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy @@ -81,24 +81,8 @@ module AwsKmsDiscoveryKeyring { predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) + true } method OnEncrypt'( @@ -121,22 +105,8 @@ module AwsKmsDiscoveryKeyring { } predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) + true } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt @@ -153,6 +123,12 @@ module AwsKmsDiscoveryKeyring { ensures ValidState() ensures OnDecryptEnsuresPublicly(input, res) ensures unchanged(History) + ensures res.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + res.value.materials + ) //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt //= type=implication @@ -530,10 +506,6 @@ module AwsKmsDiscoveryKeyring { && Seq.Last(client.History.Decrypt).output.value.KeyId == Some(keyArn) } - predicate Requires(helper: AwsKmsEdkHelper){ - true - } - method Invoke( helper: AwsKmsEdkHelper, ghost attemptsState: seq>> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy index d86977de99..131cba0d64 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy @@ -125,28 +125,7 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { Modifies := Modifies + client.Modifies + cryptoPrimitives.Modifies; } - ghost predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + ghost predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-ecdh-keyring.md#onencrypt //= type=implication @@ -159,7 +138,12 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) - + ensures res.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + res.value.materials + ) ensures StringifyEncryptionContext(input.materials.encryptionContext).Failure? ==> res.Failure? @@ -292,24 +276,7 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { } } - ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -530,23 +497,20 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) } - - ghost predicate Requires(edk: Types.EncryptedDataKey){ - && UTF8.ValidUTF8Seq(edk.keyProviderId) - } - method {:vcs_split_on_every_assert} Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> ) returns (res: Result) requires Invariant() - requires Requires(edk) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(edk, res, attemptsState) { - assert UTF8.ValidUTF8Seq(edk.keyProviderId); + :- Need ( + UTF8.ValidUTF8Seq(edk.keyProviderId), + Types.AwsCryptographicMaterialProvidersException(message := "Received invalid EDK provider id for AWS KMS ECDH Keyring") + ); var suite := materials.algorithmSuite; var keyProviderId := edk.keyProviderId; @@ -685,7 +649,6 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { ==> (edk.keyProviderId == KMS_ECDH_PROVIDER_ID || edk.keyProviderId == RAW_ECDH_PROVIDER_ID) - && UTF8.ValidUTF8Seq(edk.keyProviderId) ) } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy index 6c37f2c2e4..509dc57706 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy @@ -207,28 +207,7 @@ module AwsKmsHierarchicalKeyring { } } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-hierarchical-keyring.md#onencrypt //= type=implication @@ -242,6 +221,12 @@ module AwsKmsHierarchicalKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) + ensures res.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + res.value.materials + ) { var materials := input.materials; var suite := materials.algorithmSuite; @@ -324,24 +309,7 @@ module AwsKmsHierarchicalKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} method OnDecrypt'(input: Types.OnDecryptInput) returns (res: Result) requires ValidState() @@ -351,6 +319,11 @@ module AwsKmsHierarchicalKeyring { ensures OnDecryptEnsuresPublicly(input, res) ensures unchanged(History) + ensures res.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + res.value.materials) { var materials := input.materials; var suite := input.materials.algorithmSuite; @@ -536,7 +509,11 @@ module AwsKmsHierarchicalKeyring { return Success(branchKeyMaterials); } else { - :- Need(getCacheOutput.value.materials.BranchKey?, E("Invalid Material Type.")); + :- Need( + && getCacheOutput.value.materials.BranchKey? + && getCacheOutput.value.materials == Types.Materials.BranchKey(getCacheOutput.value.materials.BranchKey), + E("Invalid Material Type.") + ); return Success(getCacheOutput.value.materials.BranchKey); } } @@ -620,9 +597,7 @@ module AwsKmsHierarchicalKeyring { && res.Success? && res.value ==> - && edk.keyProviderId == PROVIDER_ID_HIERARCHY - && UTF8.ValidUTF8Seq(edk.keyProviderInfo) - ) + edk.keyProviderId == PROVIDER_ID_HIERARCHY) } method Invoke(edk: Types.EncryptedDataKey) @@ -638,14 +613,16 @@ module AwsKmsHierarchicalKeyring { return Success(false); } - // We filter out values that do not match, - // Therefore we know that this provider ID is UTF8 encoded - assert UTF8.ValidUTF8Seq(PROVIDER_ID_HIERARCHY); - assert providerId == PROVIDER_ID_HIERARCHY; + if !UTF8.ValidUTF8Seq(providerInfo) { + // The Keyring produces UTF8 keyProviderInfo. + // If an `aws-kms-hierarchy` encrypted data key's keyProviderInfo is not UTF8 + // this is an error, not simply an EDK to filter out. + return Failure(E("Invalid encoding, provider info is not UTF8.")); + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-hierarchical-keyring.md#ondecrypt //# -- The deserialized key provider info MUST be UTF8 Decoded - var branchKeyId :- UTF8.Decode(providerInfo).MapFailure(e => E("Invalid encoding, provider info is not UTF8.")); + var branchKeyId :- UTF8.Decode(providerInfo).MapFailure(WrapStringToError); //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-hierarchical-keyring.md#ondecrypt //# MUST match this keyring's configured `Branch Key Identifier`. @@ -725,23 +702,20 @@ module AwsKmsHierarchicalKeyring { && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) } - - predicate Requires(edk: Types.EncryptedDataKey){ - && UTF8.ValidUTF8Seq(edk.keyProviderInfo) - } method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> ) returns (res: Result) requires Invariant() - requires Requires(edk) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(edk, res, attemptsState) { - - assert UTF8.ValidUTF8Seq(edk.keyProviderId); + :- Need ( + UTF8.ValidUTF8Seq(edk.keyProviderInfo), + Types.AwsCryptographicMaterialProvidersException(message := "Received invalid EDK provider info for Hierarchical Keyring") + ); var suite := materials.algorithmSuite; var keyProviderId := edk.keyProviderId; @@ -832,7 +806,7 @@ module AwsKmsHierarchicalKeyring { UTF8.IsASCIIString(branchKeyVersion), E("Unable to represent as an ASCII string.") ); - var versionBytes :- UTF8.Encode(branchKeyVersion).MapFailure(e => Types.AwsCryptographicMaterialProvidersException(message := e)); + var versionBytes := UTF8.EncodeAscii(branchKeyVersion); // Create the suffix var suffix : seq := logicalKeyStoreNameBytes + NULL_BYTE + branchKeyIdUtf8 + NULL_BYTE + versionBytes; @@ -846,7 +820,11 @@ module AwsKmsHierarchicalKeyring { var maybeCacheDigest := Digest.Digest(identifierDigestInput); var cacheDigest :- maybeCacheDigest.MapFailure(e => Types.AwsCryptographyPrimitives(e)); - assert |cacheDigest| == Digest.Length(hashAlgorithm); + :- Need( + |cacheDigest| == Digest.Length(hashAlgorithm), + Types.AwsCryptographicMaterialProvidersException( + message := "Digest generated a message not equal to the expected length.") + ); return Success(cacheDigest); } @@ -920,7 +898,11 @@ module AwsKmsHierarchicalKeyring { return Success(branchKeyMaterials); } else { - :- Need(getCacheOutput.value.materials.BranchKey?, E("Invalid Material Type.")); + :- Need( + && getCacheOutput.value.materials.BranchKey? + && getCacheOutput.value.materials == Types.Materials.BranchKey(getCacheOutput.value.materials.BranchKey), + E("Invalid Material Type.") + ); return Success(getCacheOutput.value.materials.BranchKey); } } @@ -1008,7 +990,6 @@ module AwsKmsHierarchicalKeyring { ghost attemptsState: seq, Types.Error>>> ) returns (res: Result, Types.Error>) requires Invariant() - requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() @@ -1034,7 +1015,7 @@ module AwsKmsHierarchicalKeyring { var wrappedKey := wrappedMaterial[EDK_CIPHERTEXT_VERSION_INDEX.. EDK_CIPHERTEXT_VERSION_INDEX + KeyLength]; var authTag := wrappedMaterial[EDK_CIPHERTEXT_VERSION_INDEX + KeyLength..]; - var serializedEC :- input.serializedEC; + var serializedEC :- CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext); var wrappingAad := WrappingAad(branchKeyIdUtf8, branchKeyVersionAsBytes, serializedEC); var derivedBranchKey :- DeriveEncryptionKeyFromBranchKey( branchKey, @@ -1055,7 +1036,10 @@ module AwsKmsHierarchicalKeyring { ); var unwrappedPdk :- maybeUnwrappedPdk.MapFailure(e => Types.AwsCryptographyPrimitives(AwsCryptographyPrimitives := e)); - assert |unwrappedPdk| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat; + :- Need( + |unwrappedPdk| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat, + E("Invalid Key Length") + ); var output := MaterialWrapping.UnwrapOutput( unwrappedMaterial := unwrappedPdk, @@ -1121,7 +1105,6 @@ module AwsKmsHierarchicalKeyring { ghost attemptsState: seq, Types.Error>>> ) returns (res: Result, Types.Error>) requires Invariant() - requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() @@ -1144,8 +1127,7 @@ module AwsKmsHierarchicalKeyring { MaterialWrapping.WrapInput( plaintextMaterial := pdk, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext, - serializedEC := input.serializedEC + encryptionContext := input.encryptionContext ), []); var output := MaterialWrapping.GenerateAndWrapOutput( @@ -1227,7 +1209,6 @@ module AwsKmsHierarchicalKeyring { ghost attemptsState: seq, Types.Error>>> ) returns (res: Result, Types.Error>) requires Invariant() - requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() @@ -1259,7 +1240,7 @@ module AwsKmsHierarchicalKeyring { // 1. [version](../structures.md#branch-key-version) as Bytes // 1. [encryption context](structures.md#encryption-context-1) from the input // [encryption materials](../structures.md#encryption-materials) according to the [encryption context serialization specification](../structures.md#serialization). - var serializedEC :- input.serializedEC; + var serializedEC :- CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext); var wrappingAad := WrappingAad(branchKeyIdUtf8, branchKeyVersionAsBytes, serializedEC); var derivedBranchKey :- DeriveEncryptionKeyFromBranchKey( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy index 775c1e97fd..6de9865f24 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy @@ -100,28 +100,7 @@ module AwsKmsKeyring { Modifies := {History} + client.Modifies; } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt //= type=implication @@ -135,6 +114,12 @@ module AwsKmsKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) + ensures res.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + res.value.materials + ) ensures StringifyEncryptionContext(input.materials.encryptionContext).Failure? ==> @@ -397,24 +382,7 @@ module AwsKmsKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -431,6 +399,12 @@ module AwsKmsKeyring { ensures ValidState() ensures OnDecryptEnsuresPublicly(input, res) ensures unchanged(History) + ensures res.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + res.value.materials + ) //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -455,69 +429,68 @@ module AwsKmsKeyring { && AlgorithmSuites.GetEncryptKeyLength(input.materials.algorithmSuite) as nat == |res.value.materials.plaintextDataKey.value| && var LastDecrypt := Last(client.History.Decrypt); && LastDecrypt.output.Success? - && ( - exists edk - // , returnedEncryptionAlgorithm - | edk in input.encryptedDataKeys - :: - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - Its provider ID MUST exactly match the value “aws-kms”. - && var maybeWrappedMaterial := - EdkWrapping.GetProviderWrappedMaterial(edk.ciphertext, input.materials.algorithmSuite); - && maybeWrappedMaterial.Success? - && edk.keyProviderId == PROVIDER_ID - && KMS.IsValid_CiphertextType(maybeWrappedMaterial.value) + && exists edk + // , returnedEncryptionAlgorithm + | edk in input.encryptedDataKeys + :: + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - Its provider ID MUST exactly match the value “aws-kms”. + && var maybeWrappedMaterial := + EdkWrapping.GetProviderWrappedMaterial(edk.ciphertext, input.materials.algorithmSuite); + && maybeWrappedMaterial.Success? + && edk.keyProviderId == PROVIDER_ID + && KMS.IsValid_CiphertextType(maybeWrappedMaterial.value) + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# When calling [AWS KMS Decrypt] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), + //# the keyring MUST call with a request constructed + //# as follows: + && KMS.DecryptRequest( //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication - //# When calling [AWS KMS Decrypt] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), - //# the keyring MUST call with a request constructed - //# as follows: - && KMS.DecryptRequest( - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - `KeyId` MUST be the configured AWS KMS key identifier. - KeyId := Some(awsKmsKey), - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - `CiphertextBlob` MUST be the [encrypted data key ciphertext] - //# (../structures.md#ciphertext). - CiphertextBlob := maybeWrappedMaterial.value, - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - `EncryptionContext` MUST be the [encryption context] - //# (../structures.md#encryption-context) included in the input - //# [decryption materials](../structures.md#decryption-materials). - EncryptionContext := Some(maybeStringifiedEncCtx.value), - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - `GrantTokens` MUST be this keyring's [grant tokens] - //# (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token). - GrantTokens := Some(grantTokens), - EncryptionAlgorithm := None - ) + //# - `KeyId` MUST be the configured AWS KMS key identifier. + KeyId := Some(awsKmsKey), //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication - //# To attempt to decrypt a particular [encrypted data key] - //# (../structures.md#encrypted-data-key), OnDecrypt MUST call [AWS KMS - //# Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) - //# with the configured AWS KMS client. - == LastDecrypt.input + //# - `CiphertextBlob` MUST be the [encrypted data key ciphertext] + //# (../structures.md#ciphertext). + CiphertextBlob := maybeWrappedMaterial.value, //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication - //# - The `KeyId` field in the response MUST equal the configured AWS - //# KMS key identifier. - && LastDecrypt.output.value.KeyId == Some(awsKmsKey) - ) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - MUST immediately return the modified [decryption materials] - //# (../structures.md#decryption-materials). - && ( - input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? - ==> - LastDecrypt.output.value.Plaintext == res.value.materials.plaintextDataKey) + //# - `EncryptionContext` MUST be the [encryption context] + //# (../structures.md#encryption-context) included in the input + //# [decryption materials](../structures.md#decryption-materials). + EncryptionContext := Some(maybeStringifiedEncCtx.value), + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - `GrantTokens` MUST be this keyring's [grant tokens] + //# (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token). + GrantTokens := Some(grantTokens), + EncryptionAlgorithm := None + ) + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# To attempt to decrypt a particular [encrypted data key] + //# (../structures.md#encrypted-data-key), OnDecrypt MUST call [AWS KMS + //# Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) + //# with the configured AWS KMS client. + == LastDecrypt.input + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - The `KeyId` field in the response MUST equal the configured AWS + //# KMS key identifier. + && LastDecrypt.output.value.KeyId == Some(awsKmsKey) + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - MUST immediately return the modified [decryption materials] + //# (../structures.md#decryption-materials). + && ( + input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? + ==> + LastDecrypt.output.value.Plaintext == res.value.materials.plaintextDataKey) + // For intermediate key wrapping, KMS::Decrypt.Plaintext is the intermediate key { var materials := input.materials; @@ -707,11 +680,7 @@ module AwsKmsKeyring { && Last(client.History.Decrypt).output.value.KeyId == Some(awsKmsKey) } - predicate Requires(edk: Types.EncryptedDataKey){ - true - } - - method {:vcs_split_on_every_assert} Invoke( + method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> ) returns (res: Result) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy index 97c340139c..5e1aea99be 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy @@ -84,28 +84,7 @@ module AwsKmsMrkDiscoveryKeyring { Modifies := {History} + client.Modifies; } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} method OnEncrypt'( input: Types.OnEncryptInput @@ -126,24 +105,7 @@ module AwsKmsMrkDiscoveryKeyring { message := "Encryption is not supported with a Discovery Keyring.")); } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt //= type=implication @@ -513,10 +475,6 @@ module AwsKmsMrkDiscoveryKeyring { == res.value.plaintextDataKey) } - predicate Requires(helper: AwsKmsEdkHelper){ - true - } - method Invoke( helper: AwsKmsEdkHelper, ghost attemptsState: seq>> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy index 4c67a9f391..e837ff616c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy @@ -88,28 +88,7 @@ module AwsKmsMrkKeyring { Modifies := {History} + client.Modifies; } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt //= type=implication @@ -123,6 +102,12 @@ module AwsKmsMrkKeyring { ensures ValidState() ensures unchanged(History) ensures OnEncryptEnsuresPublicly(input, output) + ensures output.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) ensures StringifyEncryptionContext(input.materials.encryptionContext).Failure? ==> @@ -403,24 +388,7 @@ module AwsKmsMrkKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt //= type=implication @@ -638,10 +606,6 @@ module AwsKmsMrkKeyring { ) } - predicate Requires(edk: Types.EncryptedDataKey){ - true - } - method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy index f72eb27a35..1a8a8448c3 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy @@ -109,29 +109,8 @@ module AwsKmsRsaKeyring { this.grantTokens := grantTokens; } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } - + predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput , output: Result) + {true} method OnEncrypt'(input: Types.OnEncryptInput) returns (res: Result) @@ -206,24 +185,7 @@ module AwsKmsRsaKeyring { return Success(Types.OnEncryptOutput(materials := returnMaterials)); } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} method OnDecrypt'(input: Types.OnDecryptInput) returns (res: Result) @@ -420,10 +382,6 @@ module AwsKmsRsaKeyring { && Seq.Last(client.History.Decrypt).output.value.KeyId == Some(awsKmsKey) } - predicate Requires(edk: Types.EncryptedDataKey){ - true - } - method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> @@ -524,8 +482,7 @@ module AwsKmsRsaKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext, - serializedEC := input.serializedEC + encryptionContext := input.encryptionContext ), []); var output := MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy index 657c0cf28e..6a77bd4721 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy @@ -68,28 +68,16 @@ module Constants { s // UTF-8 Encoded "aws-kms-ecdh" - const KMS_ECDH_PROVIDER_ID: UTF8.ValidUTF8Bytes := - var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x65, 0x63, 0x64, 0x68]; - assert s == UTF8.EncodeAscii("aws-kms-ecdh"); - s + const KMS_ECDH_PROVIDER_ID: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("aws-kms-ecdh") // UTF-8 Encoded "raw-ecdh" - const RAW_ECDH_PROVIDER_ID : UTF8.ValidUTF8Bytes := - var s := [0x72, 0x61, 0x77, 0x2d, 0x65, 0x63, 0x64, 0x68]; - assert s == UTF8.EncodeAscii("raw-ecdh"); - s + const RAW_ECDH_PROVIDER_ID: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("raw-ecdh") // UTF-8 Encoded "HMAC_SHA384" - const ECDH_KDF_PRF_NAME : UTF8.ValidUTF8Bytes := - var s := [0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34]; - assert s == UTF8.EncodeAscii("HMAC_SHA384"); - s + const ECDH_KDF_PRF_NAME: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("HMAC_SHA384") // UTF-8 Encoded "ecdh-key-derivation" - const ECDH_KDF_UTF8 : UTF8.ValidUTF8Bytes := - var s := [0x65, 0x63, 0x64, 0x68, 0x2d, 0x6b, 0x65, 0x79, 0x2d, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e]; - assert s == UTF8.EncodeAscii("ecdh-key-derivation"); - s + const ECDH_KDF_UTF8: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("ecdh-key-derivation") type AwsKmsEncryptedDataKey = edk: Types.EncryptedDataKey | && edk.keyProviderId == PROVIDER_ID diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy index d55918c50a..bbab093965 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy @@ -4,19 +4,9 @@ include "../Keyring.dfy" include "../Materials.dfy" include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" +include "../../../../../libraries/src/Collections/Sequences/Seq.dfy" -include "RawAESKeyring.dfy" -include "RawECDHKeyring.dfy" -include "RawRSAKeyring.dfy" -include "AwsKms/AwsKmsDiscoveryKeyring.dfy" -include "AwsKms/AwsKmsEcdhKeyring.dfy" -include "AwsKms/AwsKmsHierarchicalKeyring.dfy" -include "AwsKms/AwsKmsKeyring.dfy" -include "AwsKms/AwsKmsMrkDiscoveryKeyring.dfy" -include "AwsKms/AwsKmsMrkKeyring.dfy" -include "AwsKms/AwsKmsRsaKeyring.dfy" - -module {:options "-functionSyntax:4"} MultiKeyring { +module MultiKeyring { import opened StandardLibrary import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes @@ -25,52 +15,13 @@ module {:options "-functionSyntax:4"} MultiKeyring { import UTF8 import Seq - // Rust traits do not have extensive runtime dependency information. - // This means that in Rust you cannot know that one trait also implements another trait. - // This is problematic because in Dafny this is trivial, - // and given how we set up our keyrings and CMMs - // it is very convenient. - // By checking `keyring: Types.IKeyring is Keyring.VerifiableInterface` - // the MultiKeyring can do less work. - // Because it can prove, via Dafny that some work has already been done. - // However the above cannot be currently compiled into Rust. - // This means that to offer this we need to check a different way. - // The workaround for now is to use list of all know verified keyrings. - import RawAESKeyring - import RawECDHKeyring - import RawRSAKeyring - import AwsKmsDiscoveryKeyring - import AwsKmsEcdhKeyring - import AwsKmsHierarchicalKeyring - import AwsKmsKeyring - import AwsKmsMrkDiscoveryKeyring - import AwsKmsMrkKeyring - import AwsKmsRsaKeyring - - predicate Verified?(keyring: Types.IKeyring) - : (outcome: bool) - ensures outcome ==> keyring is Keyring.VerifiableInterface - { - || keyring is RawAESKeyring.RawAESKeyring - || keyring is RawECDHKeyring.RawEcdhKeyring - || keyring is RawRSAKeyring.RawRSAKeyring - || keyring is AwsKmsDiscoveryKeyring.AwsKmsDiscoveryKeyring - || keyring is AwsKmsEcdhKeyring.AwsKmsEcdhKeyring - || keyring is AwsKmsHierarchicalKeyring.AwsKmsHierarchicalKeyring - || keyring is AwsKmsKeyring.AwsKmsKeyring - || keyring is AwsKmsMrkDiscoveryKeyring.AwsKmsMrkDiscoveryKeyring - || keyring is AwsKmsMrkKeyring.AwsKmsMrkKeyring - || keyring is AwsKmsRsaKeyring.AwsKmsRsaKeyring - } - - class MultiKeyring extends Keyring.VerifiableInterface, Types.IKeyring { - ghost predicate ValidState() + predicate ValidState() ensures ValidState() ==> History in Modifies { && History in Modifies @@ -84,7 +35,6 @@ module {:options "-functionSyntax:4"} MultiKeyring { && History !in k.Modifies && k.ValidState() && k.Modifies <= Modifies) - && (generatorKeyring.None? ==> 0 < |childKeyrings|) } const generatorKeyring: Option @@ -144,28 +94,8 @@ module {:options "-functionSyntax:4"} MultiKeyring { && k.Modifies <= Modifies); } - ghost predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + + predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput, output: Result) {true} //= aws-encryption-sdk-specification/framework/multi-keyring.md#generator-keyring //= type=implication //# This keyring MUST implement the [Generate Data Key](keyring- @@ -244,47 +174,27 @@ module {:options "-functionSyntax:4"} MultiKeyring { :- Need(onEncryptOutput.Success?, if onEncryptOutput.Failure? then onEncryptOutput.error else Types.AwsCryptographicMaterialProvidersException( message := "Unexpected failure. Input to Need is !Success.") ); - - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || Verified?(generatorKeyring.value) - || generatorKeyring.value is MultiKeyring - ) { //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# - If the generator keyring returns encryption materials missing a //# plaintext data key, OnEncrypt MUST fail. - :- Need( - Materials.EncryptionMaterialsHasPlaintextDataKey(onEncryptOutput.value.materials), - Types.AwsCryptographicMaterialProvidersException( - message := "Could not retrieve materials required for encryption")); - - :- Need(Materials.ValidEncryptionMaterialsTransition(input.materials, onEncryptOutput.value.materials), - Types.AwsCryptographicMaterialProvidersException( message := "Generator keyring returned invalid encryption materials")); - } + :- Need(Materials.ValidEncryptionMaterialsTransition(input.materials, onEncryptOutput.value.materials), + Types.AwsCryptographicMaterialProvidersException( message := "Generator keyring returned invalid encryption materials")); returnMaterials := onEncryptOutput.value.materials; } for i := 0 to |this.childKeyrings| - invariant 0 == i && this.generatorKeyring.None? ==> returnMaterials == input.materials - invariant 0 < i || this.generatorKeyring.Some? ==> - && Materials.ValidEncryptionMaterialsTransition(input.materials, returnMaterials) - && Materials.EncryptionMaterialsHasPlaintextDataKey(returnMaterials) invariant returnMaterials.plaintextDataKey.Some? invariant unchanged(History) invariant i < |this.childKeyrings| ==> this.childKeyrings[i].Modifies <= Modifies { var onEncryptInput := Types.OnEncryptInput(materials := returnMaterials); - var child: Types.IKeyring := this.childKeyrings[i]; //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# Next, for each [keyring](keyring-interface.md) in this keyring's list //# of [child keyrings](#child-keyrings), the keyring MUST call [OnEncrypt] //# (keyring-interface.md#onencrypt). - var onEncryptOutput := child.OnEncrypt(onEncryptInput); + var onEncryptOutput := this.childKeyrings[i].OnEncrypt(onEncryptInput); //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# If the child keyring's [OnEncrypt](keyring- @@ -292,32 +202,20 @@ module {:options "-functionSyntax:4"} MultiKeyring { :- Need(onEncryptOutput.Success?, Types.AwsCryptographicMaterialProvidersException( message := "Child keyring failed to encrypt plaintext data key")); - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || Verified?(child) - || child is MultiKeyring - ) { // We have to explicitly check for this because our child and generator keyrings are of type // IKeyring, rather than VerifiableKeyring. // If we knew we would always have VerifiableKeyrings, we would get this for free. // However, we want to support customer implementations of keyrings which may or may // not perform valid transitions. - - :- Need( - Materials.EncryptionMaterialsHasPlaintextDataKey(onEncryptOutput.value.materials), - Types.AwsCryptographicMaterialProvidersException( - message := "Could not retrieve materials required for encryption")); - - :- Need(Materials.ValidEncryptionMaterialsTransition(returnMaterials, onEncryptOutput.value.materials), - Types.AwsCryptographicMaterialProvidersException( message := "Child keyring performed invalid transition on encryption materials")); - } + :- Need(Materials.ValidEncryptionMaterialsTransition(returnMaterials, onEncryptOutput.value.materials), + Types.AwsCryptographicMaterialProvidersException( message := "Child keyring performed invalid transition on encryption materials")); returnMaterials := onEncryptOutput.value.materials; } + :- Need(Materials.ValidEncryptionMaterialsTransition(input.materials, returnMaterials), + Types.AwsCryptographicMaterialProvidersException( message := "A child or generator keyring modified the encryption materials in illegal ways.")); + //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# If all previous [OnEncrypt](keyring-interface.md#onencrypt) calls //# succeeded, this keyring MUST return the [encryption materials] @@ -326,24 +224,7 @@ module {:options "-functionSyntax:4"} MultiKeyring { return Success(Types.OnEncryptOutput(materials := returnMaterials)); } - ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly(input: Types.OnDecryptInput, output: Result) {true} /* * OnDecrypt */ @@ -465,19 +346,10 @@ module {:options "-functionSyntax:4"} MultiKeyring { { var output :- keyring.OnDecrypt(input); - // For Dafny these are trivial statements - // because they implement a trait that ensures this. - // However not all CMM/keyrings are Dafny CMM/keyrings. - // Customers can create custom CMM/keyrings. - if !( - || Verified?(keyring) - || keyring is MultiKeyring - ) { - :- Need( - Materials.DecryptionMaterialsTransitionIsValid(input.materials, output.materials), - Types.AwsCryptographicMaterialProvidersException( message := "Keyring performed invalid material transition") - ); - } + :- Need( + Materials.DecryptionMaterialsTransitionIsValid(input.materials, output.materials), + Types.AwsCryptographicMaterialProvidersException( message := "Keyring performed invalid material transition") + ); return Success(output); } @@ -486,7 +358,7 @@ module {:options "-functionSyntax:4"} MultiKeyring { // for Dafny. // Makes the code in the constructor // a little more readable. - ghost function GatherModifies( + function GatherModifies( generatorKeyring: Option, childKeyrings: seq ): diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy index f4d18e749c..477d4942c5 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy @@ -111,28 +111,7 @@ module RawAESKeyring { } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput, output: Result) {true} //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#onencrypt //= type=implication @@ -146,6 +125,12 @@ module RawAESKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, output) ensures unchanged(History) + ensures output.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) // EDK created using expected AAD ensures output.Success? @@ -246,24 +231,7 @@ module RawAESKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly(input: Types.OnDecryptInput, output: Result){true} //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#ondecrypt //= type=implication @@ -504,8 +472,7 @@ module RawAESKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext, - serializedEC := input.serializedEC + encryptionContext := input.encryptionContext ), Success(MaterialWrapping.WrapOutput( wrappedMaterial := res.value.wrappedMaterial, @@ -542,8 +509,7 @@ module RawAESKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext, - serializedEC := input.serializedEC + encryptionContext := input.encryptionContext ), []); res := Success(MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy index 2ddc8bcc01..22ef8fa4d4 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy @@ -133,28 +133,7 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { } - ghost predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + ghost predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#onencrypt //= type=implication @@ -167,6 +146,12 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) + ensures res.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + res.value.materials + ) //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#onencrypt //= type=implication //# OnEncrypt MUST fail if configured with a @@ -303,24 +288,7 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { } } - ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} method {:vcs_split_on_every_assert} OnDecrypt'(input: Types.OnDecryptInput) returns (res: Result) @@ -445,7 +413,6 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { ==> (edk.keyProviderId == KMS_ECDH_PROVIDER_ID || edk.keyProviderId == RAW_ECDH_PROVIDER_ID) - && UTF8.ValidUTF8Seq(edk.keyProviderId) ) } @@ -573,11 +540,6 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) } - - ghost predicate Requires(edk: Types.EncryptedDataKey){ - && UTF8.ValidUTF8Seq(edk.keyProviderId) - } - method {:vcs_split_on_every_assert} Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> @@ -588,7 +550,10 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { ensures Invariant() ensures Ensures(edk, res, attemptsState) { - assert UTF8.ValidUTF8Seq(edk.keyProviderId); + :- Need ( + UTF8.ValidUTF8Seq(edk.keyProviderId), + Types.AwsCryptographicMaterialProvidersException(message := "Received invalid EDK provider id for AWS KMS ECDH Keyring") + ); var suite := materials.algorithmSuite; var keyProviderId := edk.keyProviderId; diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy index 79972d6558..c20a98b8f9 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy @@ -122,28 +122,7 @@ module RawRSAKeyring { Modifies := { History } + cryptoPrimitives.Modifies; } - predicate OnEncryptEnsuresPublicly ( - input: Types.OnEncryptInput , - output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) - } + predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput, output: Result) {true} //= aws-encryption-sdk-specification/framework/raw-rsa-keyring.md#onencrypt //= type=implication @@ -157,6 +136,13 @@ module RawRSAKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, output) ensures unchanged(History) + ensures + output.Success? + ==> + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) //= aws-encryption-sdk-specification/framework/raw-rsa-keyring.md#onencrypt //= type=implication @@ -277,24 +263,7 @@ module RawRSAKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) - : (outcome: bool) - ensures - outcome ==> - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - { - output.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) - } + predicate OnDecryptEnsuresPublicly(input: Types.OnDecryptInput, output: Result){true} //= aws-encryption-sdk-specification/framework/raw-rsa-keyring.md#ondecrypt //= type=implication @@ -520,8 +489,7 @@ module RawRSAKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext, - serializedEC := input.serializedEC + encryptionContext := input.encryptionContext ), []); var output := MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy index 850accc2fc..adb8e20e3b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy @@ -47,19 +47,11 @@ module {:options "/functionSyntax:4"} TestLocalCMC { ) } - const abc : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x62, 0x63]; - assert s == UTF8.EncodeAscii("abc"); - s - - const cde : UTF8.ValidUTF8Bytes := - var s := [0x63, 0x64, 0x65]; - assert s == UTF8.EncodeAscii("cde"); - s - method {:test} LocalCMCBasics() { var st := new LocalCMC(100); + var abc := UTF8.EncodeAscii("abc"); + var cde := UTF8.EncodeAscii("cde"); var res := st.GetCacheEntryWithTime(MakeGet(abc), 10000); expect res.Failure?; expect res.error.EntryDoesNotExist?; diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy index 9a3a845779..29d26076a1 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy @@ -59,40 +59,11 @@ module {:options "/functionSyntax:4"} TestStormTracker { ) } - const abc : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x62, 0x63]; - assert s == UTF8.EncodeAscii("abc"); - s - - const cde : UTF8.ValidUTF8Bytes := - var s := [0x63, 0x64, 0x65]; - assert s == UTF8.EncodeAscii("cde"); - s - - const one : UTF8.ValidUTF8Bytes := - var s := [0x6f, 0x6e, 0x65]; - assert s == UTF8.EncodeAscii("one"); - s - - const two : UTF8.ValidUTF8Bytes := - var s := [0x74, 0x77, 0x6f]; - assert s == UTF8.EncodeAscii("two"); - s - - const three : UTF8.ValidUTF8Bytes := - var s := [0x74, 0x68, 0x72, 0x65, 0x65]; - assert s == UTF8.EncodeAscii("three"); - s - - const four : UTF8.ValidUTF8Bytes := - var s := [0x66, 0x6f, 0x75, 0x72]; - assert s == UTF8.EncodeAscii("four"); - s - - method {:test} StormTrackerBasics() { var st := new StormTracker(DefaultStorm()); + var abc := UTF8.EncodeAscii("abc"); + var cde := UTF8.EncodeAscii("cde"); var res :- expect st.GetFromCacheWithTime(MakeGet(abc), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(abc), 10000); @@ -121,6 +92,12 @@ module {:options "/functionSyntax:4"} TestStormTracker { method {:test} StormTrackerFanOut() { var st := new StormTracker(DefaultStorm().(fanOut := 3)); + + var one := UTF8.EncodeAscii("one"); + var two := UTF8.EncodeAscii("two"); + var three := UTF8.EncodeAscii("three"); + var four := UTF8.EncodeAscii("four"); + var res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(two), 10000); @@ -134,6 +111,12 @@ module {:options "/functionSyntax:4"} TestStormTracker { method {:test} StormTrackerPruneTTL() { var st := new StormTracker(DefaultStorm().(graceInterval := 3, fanOut := 3, inFlightTTL := 5)); + + var one := UTF8.EncodeAscii("one"); + var two := UTF8.EncodeAscii("two"); + var three := UTF8.EncodeAscii("three"); + var four := UTF8.EncodeAscii("four"); + var res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(two), 10000); @@ -156,6 +139,9 @@ module {:options "/functionSyntax:4"} TestStormTracker { method {:test} StormTrackerGraceInterval() { var st := new StormTracker(DefaultStorm().(graceInterval := 3)); + + var one := UTF8.EncodeAscii("one"); + var res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); @@ -173,6 +159,8 @@ module {:options "/functionSyntax:4"} TestStormTracker { // The cache is full, we wait for the graceInterval // regardless of the inFlightTTL + var one := UTF8.EncodeAscii("one"); + var st := new StormTracker(DefaultStorm().(graceInterval := 2, inFlightTTL := 3, gracePeriod := 5)); // This entry will be in the cache until ms: 11000 var _ :- expect st.PutCacheEntry(MakePut(one, 10000)); @@ -211,6 +199,8 @@ module {:options "/functionSyntax:4"} TestStormTracker { var insideGracePeriod := expiryTime - config.gracePeriod as Types.PositiveLong + 1; var st := new StormTracker(config); + var one := UTF8.EncodeAscii("one"); + var res2 :- expect st.PutCacheEntry(MakePut(one, expiryTime)); var res :- expect st.GetFromCacheWithTime(MakeGet(one), beforeGracePeriod); @@ -226,6 +216,7 @@ module {:options "/functionSyntax:4"} TestStormTracker { // The cache is empty, we wait for the least // duration between graceInterval and inFlightTTL // for empty identifiers + var one := UTF8.EncodeAscii("one"); var st := new StormTracker(DefaultStorm().(graceInterval := 2, inFlightTTL := 3)); diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy index c6170b54ff..259bc8d425 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy @@ -43,21 +43,9 @@ module TestAwsKmsHierarchicalKeyring { const BRANCH_KEY_ID := Fixtures.branchKeyId // Constants for TestBranchKeySupplier - const BRANCH_KEY : UTF8.ValidUTF8Bytes := - var s := [0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4b, 0x65, 0x79]; - assert s == UTF8.EncodeAscii("branchKey"); - s - - const CASE_A : UTF8.ValidUTF8Bytes := - var s := [0x63, 0x61, 0x73, 0x65, 0x41]; - assert s == UTF8.EncodeAscii("caseA"); - s - - const CASE_B : UTF8.ValidUTF8Bytes := - var s := [0x63, 0x61, 0x73, 0x65, 0x42]; - assert s == UTF8.EncodeAscii("caseB"); - s - + const BRANCH_KEY := UTF8.EncodeAscii("branchKey") + const CASE_A := UTF8.EncodeAscii("caseA") + const CASE_B := UTF8.EncodeAscii("caseB") const BRANCH_KEY_ID_A := BRANCH_KEY_ID const BRANCH_KEY_ID_B := Fixtures.branchKeyIdWithEC diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy index 228dda04e9..32df108163 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy @@ -22,50 +22,19 @@ module TestErrorMessages { expect actualErrorMessage == ExpectErrorMessage; } - const awskms : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73]; - assert s == UTF8.EncodeAscii("aws-kms"); - s - - const keyproviderInfoA : UTF8.ValidUTF8Bytes := - var s := [0x6b, 0x65, 0x79, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x41]; - assert s == UTF8.EncodeAscii("keyproviderInfoA"); - s - - const keyproviderInfoB : UTF8.ValidUTF8Bytes := - var s := [0x6b, 0x65, 0x79, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x42]; - assert s == UTF8.EncodeAscii("keyproviderInfoB"); - s - - const keyproviderInfoC : UTF8.ValidUTF8Bytes := - var s := [0x6b, 0x65, 0x79, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43]; - assert s == UTF8.EncodeAscii("keyproviderInfoC"); - s - - const awskmsrsa : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x72, 0x73, 0x61]; - assert s == UTF8.EncodeAscii("aws-kms-rsa"); - s - - const awskmshierarchy : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79]; - assert s == UTF8.EncodeAscii("aws-kms-hierarchy"); - s - - method {:test} TestIncorrectDataKeys() { var dummyKey : Types.EncryptedDataKeyList := [Types.EncryptedDataKey( - keyProviderId := awskms, - keyProviderInfo := keyproviderInfoA, + keyProviderId := UTF8.EncodeAscii("aws-kms") , + keyProviderInfo := UTF8.EncodeAscii("keyproviderInfoA"), ciphertext := [1, 2, 3, 4, 5]), Types.EncryptedDataKey( - keyProviderId := awskmsrsa, - keyProviderInfo := keyproviderInfoB, + keyProviderId := UTF8.EncodeAscii("aws-kms-rsa") , + keyProviderInfo := UTF8.EncodeAscii("keyproviderInfoB"), ciphertext := [1, 2, 3, 4, 5]), Types.EncryptedDataKey( - keyProviderId := awskmshierarchy, - keyProviderInfo := keyproviderInfoC, + keyProviderId := UTF8.EncodeAscii("aws-kms-hierarchy") , + keyProviderInfo := UTF8.EncodeAscii("keyproviderInfoC"), ciphertext := [ 64, 92, 115, 7, 85, 121, 112, 79, 69, 12, 82, 25, 67, 34, 11, 66, 93, 45, 40, 23, 90, 61, 16, 28, 59, 114, 52, 122, diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy index 8bff47668b..bfab986cb0 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy @@ -51,15 +51,6 @@ module Fixtures { output := Success(map i <- decodedEncryptionContext :: i.0.value := i.1.value); } - const abc : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x62, 0x63]; - assert s == UTF8.EncodeAscii("abc"); - s - - const x123 : UTF8.ValidUTF8Bytes := - var s := [0x31, 0x32, 0x33]; - assert s == UTF8.EncodeAscii("123"); - s // The following are test resources that exist in tests accounts: @@ -94,7 +85,7 @@ module Fixtures { const KmsSrkConfigEast : Types.KMSConfiguration := Types.KMSConfiguration.kmsKeyArn(MrkArnEast) const KmsSrkConfigWest : Types.KMSConfiguration := Types.KMSConfiguration.kmsKeyArn(MrkArnWest) const KmsMrkConfigAP : Types.KMSConfiguration := Types.KMSConfiguration.kmsMRKeyArn(MrkArnAP) - const KmsMrkEC : Types.EncryptionContext := map[abc := x123] + const KmsMrkEC : Types.EncryptionContext := map[UTF8.EncodeAscii("abc") := UTF8.EncodeAscii("123")] const EastBranchKey : string := "MyEastBranch2" const WestBranchKey : string := "MyWestBranch2" const publicKeyArn := "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f" diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go index df8ae6a77c..b44cc7d75b 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go @@ -358,14 +358,14 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -414,14 +414,14 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -450,14 +450,14 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_ToDafny(input string) dafny.Sequen func Aws_cryptography_keyStore_HmacKeyMap_value_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -536,7 +536,7 @@ func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_logicalKeyStoreName_ToDafny func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_grantTokens_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -729,7 +729,7 @@ func Aws_cryptography_keyStore_KeyStoreConfig_grantTokens_ToDafny(input []string if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go index 88e1ce273f..9e4496be36 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go @@ -289,15 +289,18 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_keyStore_GetBeaconKeyInput_branchKeyIdentifier_FromDafny(input interface{}) string { @@ -342,15 +345,18 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_keyStore_BeaconKeyMaterials_hmacKeys_FromDafny(input interface{}) map[string][]byte { @@ -379,15 +385,18 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_FromDafny(input interface{}) strin } func Aws_cryptography_keyStore_HmacKeyMap_value_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_keyStore_GetBranchKeyVersionInput_branchKeyIdentifier_FromDafny(input interface{}) string { diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go index e1bf3d0a13..5c6360c812 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go @@ -776,7 +776,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_discov func Aws_cryptography_materialProviders_DiscoveryFilter_accountIds_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_AccountIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -816,7 +816,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_grantT if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -841,7 +841,7 @@ func Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(input stri func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -877,7 +877,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_g if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -945,27 +945,27 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1004,7 +1004,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_grantTokens if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1262,7 +1262,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsKeyringInput_grantTokens_ToD if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1289,7 +1289,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_gra if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1314,7 +1314,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_reg func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1337,7 +1337,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInpu if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1368,7 +1368,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1397,7 +1397,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_kmsKeyI if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1424,7 +1424,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_grantTo if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1453,7 +1453,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_kmsKeyIds_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1467,7 +1467,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1478,14 +1478,14 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -1542,7 +1542,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1588,7 +1588,7 @@ func Aws_cryptography_materialProviders_CreateCryptographicMaterialsCacheInput_c func Aws_cryptography_materialProviders_CreateMultiKeyringInput_childKeyrings_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.IKeyring) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Keyring_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1625,14 +1625,14 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_ToDafny func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1691,14 +1691,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1711,27 +1711,27 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1744,14 +1744,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1835,34 +1835,34 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_T func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1966,14 +1966,14 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_ToDafny(input awscr func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2352,7 +2352,7 @@ func Aws_cryptography_materialProviders_EncryptionContext_value_ToDafny(input st func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2363,40 +2363,40 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2420,7 +2420,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_encryptionContext_To func Aws_cryptography_materialProviders_EncryptionMaterials_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2455,34 +2455,34 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_ToDafny(i func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2493,27 +2493,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2522,7 +2522,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2533,27 +2533,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2587,7 +2587,7 @@ func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2626,7 +2626,7 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2637,27 +2637,27 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2851,27 +2851,27 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_ToDafny(input *km func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2965,14 +2965,14 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_ToDafny(in func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3033,14 +3033,14 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_ToDafny(inp func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3088,7 +3088,7 @@ func Aws_cryptography_materialProviders_DecryptMaterialsInput_commitmentPolicy_T func Aws_cryptography_materialProviders_DecryptMaterialsInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3184,7 +3184,7 @@ func Aws_cryptography_materialProviders_GetEncryptionMaterialsInput_requiredEncr if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3210,7 +3210,7 @@ func Aws_cryptography_materialProviders_OnDecryptInput_materials_ToDafny(input a func Aws_cryptography_materialProviders_OnDecryptInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go index 7bceb4391b..38af8faf30 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go @@ -883,28 +883,34 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1389,15 +1395,18 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_kmsKeyId_FromDafny(input interface{}) string { @@ -1523,15 +1532,18 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_FromDaf } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingAlg_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AesWrappingAlg { @@ -1582,15 +1594,18 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis } func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.RawPrivateKeyToStaticPublicKeyInput { @@ -1600,28 +1615,34 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.EphemeralPrivateKeyToStaticPublicKeyInput { @@ -1629,15 +1650,18 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri } func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRawEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1696,28 +1720,34 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_F } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -1811,15 +1841,18 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_FromDafny(input int } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_messageVersion_FromDafny(input interface{}) int32 { @@ -2170,41 +2203,50 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_algorithmSuite_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteInfo { @@ -2264,28 +2306,34 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_FromDafny } func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -2301,28 +2349,34 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys_FromDafny(input interface{}) [][]byte { @@ -2341,28 +2395,34 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys } func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_algorithmSuiteId_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2457,28 +2517,34 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_ValidateCommitmentPolicyOnDecryptInput_algorithm_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2674,28 +2740,34 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_FromDafny(input i } func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_bytesUsed_FromDafny(input interface{}) *int64 { @@ -2800,15 +2872,18 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_FromDafny( } func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_PutCacheEntryInput_materials_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.Materials { @@ -2878,15 +2953,18 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_FromDafny(i } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_bytesUsed_FromDafny(input interface{}) int32 { diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go index df8ae6a77c..b44cc7d75b 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go @@ -358,14 +358,14 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -414,14 +414,14 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -450,14 +450,14 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_ToDafny(input string) dafny.Sequen func Aws_cryptography_keyStore_HmacKeyMap_value_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -536,7 +536,7 @@ func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_logicalKeyStoreName_ToDafny func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_grantTokens_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -729,7 +729,7 @@ func Aws_cryptography_keyStore_KeyStoreConfig_grantTokens_ToDafny(input []string if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go index 88e1ce273f..9e4496be36 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go @@ -289,15 +289,18 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_keyStore_GetBeaconKeyInput_branchKeyIdentifier_FromDafny(input interface{}) string { @@ -342,15 +345,18 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_keyStore_BeaconKeyMaterials_hmacKeys_FromDafny(input interface{}) map[string][]byte { @@ -379,15 +385,18 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_FromDafny(input interface{}) strin } func Aws_cryptography_keyStore_HmacKeyMap_value_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_keyStore_GetBranchKeyVersionInput_branchKeyIdentifier_FromDafny(input interface{}) string { diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go index e1bf3d0a13..5c6360c812 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go @@ -776,7 +776,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_discov func Aws_cryptography_materialProviders_DiscoveryFilter_accountIds_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_AccountIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -816,7 +816,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_grantT if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -841,7 +841,7 @@ func Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(input stri func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -877,7 +877,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_g if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -945,27 +945,27 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1004,7 +1004,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_grantTokens if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1262,7 +1262,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsKeyringInput_grantTokens_ToD if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1289,7 +1289,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_gra if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1314,7 +1314,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_reg func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1337,7 +1337,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInpu if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1368,7 +1368,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1397,7 +1397,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_kmsKeyI if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1424,7 +1424,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_grantTo if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1453,7 +1453,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_kmsKeyIds_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1467,7 +1467,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1478,14 +1478,14 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -1542,7 +1542,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1588,7 +1588,7 @@ func Aws_cryptography_materialProviders_CreateCryptographicMaterialsCacheInput_c func Aws_cryptography_materialProviders_CreateMultiKeyringInput_childKeyrings_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.IKeyring) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Keyring_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1625,14 +1625,14 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_ToDafny func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1691,14 +1691,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1711,27 +1711,27 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1744,14 +1744,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1835,34 +1835,34 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_T func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1966,14 +1966,14 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_ToDafny(input awscr func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2352,7 +2352,7 @@ func Aws_cryptography_materialProviders_EncryptionContext_value_ToDafny(input st func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2363,40 +2363,40 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2420,7 +2420,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_encryptionContext_To func Aws_cryptography_materialProviders_EncryptionMaterials_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2455,34 +2455,34 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_ToDafny(i func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2493,27 +2493,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2522,7 +2522,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2533,27 +2533,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2587,7 +2587,7 @@ func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2626,7 +2626,7 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2637,27 +2637,27 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2851,27 +2851,27 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_ToDafny(input *km func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2965,14 +2965,14 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_ToDafny(in func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3033,14 +3033,14 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_ToDafny(inp func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3088,7 +3088,7 @@ func Aws_cryptography_materialProviders_DecryptMaterialsInput_commitmentPolicy_T func Aws_cryptography_materialProviders_DecryptMaterialsInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3184,7 +3184,7 @@ func Aws_cryptography_materialProviders_GetEncryptionMaterialsInput_requiredEncr if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3210,7 +3210,7 @@ func Aws_cryptography_materialProviders_OnDecryptInput_materials_ToDafny(input a func Aws_cryptography_materialProviders_OnDecryptInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go index 7bceb4391b..38af8faf30 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go @@ -883,28 +883,34 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1389,15 +1395,18 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_kmsKeyId_FromDafny(input interface{}) string { @@ -1523,15 +1532,18 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_FromDaf } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingAlg_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AesWrappingAlg { @@ -1582,15 +1594,18 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis } func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.RawPrivateKeyToStaticPublicKeyInput { @@ -1600,28 +1615,34 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.EphemeralPrivateKeyToStaticPublicKeyInput { @@ -1629,15 +1650,18 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri } func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRawEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1696,28 +1720,34 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_F } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -1811,15 +1841,18 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_FromDafny(input int } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_messageVersion_FromDafny(input interface{}) int32 { @@ -2170,41 +2203,50 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_algorithmSuite_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteInfo { @@ -2264,28 +2306,34 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_FromDafny } func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -2301,28 +2349,34 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys_FromDafny(input interface{}) [][]byte { @@ -2341,28 +2395,34 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys } func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_algorithmSuiteId_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2457,28 +2517,34 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_ValidateCommitmentPolicyOnDecryptInput_algorithm_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2674,28 +2740,34 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_FromDafny(input i } func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_bytesUsed_FromDafny(input interface{}) *int64 { @@ -2800,15 +2872,18 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_FromDafny( } func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_PutCacheEntryInput_materials_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.Materials { @@ -2878,15 +2953,18 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_FromDafny(i } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_bytesUsed_FromDafny(input interface{}) int32 { diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs index 0f5b0aba49..b5f12b997f 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs @@ -113,10 +113,10 @@ impl AES_GCM { msg: &::dafny_runtime::Sequence, aad: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result, Rc>> { - let iv = &iv.to_array(); - let key = &key.to_array(); - let msg = &msg.to_array(); - let aad = &aad.to_array(); + let iv: Vec = iv.iter().collect(); + let key: Vec = key.iter().collect(); + let msg: Vec = msg.iter().collect(); + let aad: Vec = aad.iter().collect(); if *self.keyLength() as usize != key.len() { let msg = format!( @@ -135,11 +135,11 @@ impl AES_GCM { return enc_result(&msg); } - match self.do_aes_encrypt(iv, key, msg, aad) { + match self.do_aes_encrypt(&iv, &key, &msg, &aad) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: Rc::new(AESEncryptOutput::AESEncryptOutput { - cipherText: dafny_runtime::Sequence::from_array_owned(x.cipher_text), - authTag: dafny_runtime::Sequence::from_array_owned(x.auth_tag), + cipherText: x.cipher_text.iter().cloned().collect(), + authTag: x.auth_tag.iter().cloned().collect(), }), }), Err(e) => { @@ -158,11 +158,11 @@ impl AES_GCM { iv: &::dafny_runtime::Sequence, aad: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let key = &key.to_array(); - let cipher_text = &cipher_text.to_array(); - let auth_tag = &auth_tag.to_array(); - let iv = &iv.to_array(); - let aad = &aad.to_array(); + let key: Vec = key.iter().collect(); + let cipher_text: Vec = cipher_text.iter().collect(); + let auth_tag: Vec = auth_tag.iter().collect(); + let iv: Vec = iv.iter().collect(); + let aad: Vec = aad.iter().collect(); if *self.keyLength() as usize != key.len() { let msg = format!( @@ -191,9 +191,9 @@ impl AES_GCM { return dec_result(&msg); } - match self.do_aes_decrypt(key, cipher_text, auth_tag, iv, aad) { + match self.do_aes_decrypt(&key, &cipher_text, &auth_tag, &iv, &aad) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(x), + value: x.iter().cloned().collect(), }), Err(e) => { let msg = format!("AES Decrypt : {}", e); @@ -208,18 +208,23 @@ mod tests { use super::*; #[test] fn test_generate() { - let iv: ::dafny_runtime::Sequence = dafny_runtime::Sequence::from_array_owned(vec![ - 1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, - ]); - let key: ::dafny_runtime::Sequence = dafny_runtime::Sequence::from_array_owned(vec![ + let iv: ::dafny_runtime::Sequence = [1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] + .iter() + .cloned() + .collect(); + let key: ::dafny_runtime::Sequence = [ 2u8, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - ]); - let msg: ::dafny_runtime::Sequence = - dafny_runtime::Sequence::from_array_owned(vec![2u8, 4, 6, 8, 10, 12]); - let aad: ::dafny_runtime::Sequence = dafny_runtime::Sequence::from_array_owned(vec![ - 3u8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - ]); + ] + .iter() + .cloned() + .collect(); + let msg: ::dafny_runtime::Sequence = [2u8, 4, 6, 8, 10, 12].iter().cloned().collect(); + let aad: ::dafny_runtime::Sequence = + [3u8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] + .iter() + .cloned() + .collect(); let alg = AES_GCM::AES_GCM { keyLength: 32, diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs index cb940bbbc3..5d2800cb82 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs @@ -11,8 +11,8 @@ pub mod AesKdfCtr { use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; use crate::*; use aws_lc_rs::cipher::{EncryptingKey, EncryptionContext, UnboundCipherKey, AES_256}; - use dafny_runtime::Rc; use dafny_runtime::Sequence; + use dafny_runtime::Rc; fn error(s: &str) -> Rc { Rc::new(DafnyError::AwsCryptographicPrimitivesError { @@ -58,11 +58,11 @@ pub mod AesKdfCtr { Rc, >, > { - let nonce = &nonce.to_array(); - let key = &key.to_array(); - match ctr_stream(nonce, key, length) { + let nonce: Vec = nonce.iter().collect(); + let key: Vec = key.iter().collect(); + match ctr_stream(&nonce, &key, length) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(x), + value: x.iter().cloned().collect(), }), Err(e) => { let msg = format!("Aes Kdf Ctr : {}", e); diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs index 75cefe7b8a..7781dc3223 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs @@ -180,19 +180,6 @@ pub mod DafnyLibraries { let file_name = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(path); let path = Path::new(&file_name); - if let Some(parent) = path.parent() { - if let Err(why) = std::fs::create_dir_all(parent) { - let err_msg = format!( - "couldn't create directory {} from {}: {}", - path.display(), - curr_dir(), - why - ); - let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg); - return (true, err_msg); - } - } - let maybe_file = std::fs::OpenOptions::new() .append(append) .write(true) diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs index fda68da344..4d1ca6975f 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs @@ -17,9 +17,7 @@ impl crate::ExternDigest::_default { ) -> ::dafny_runtime::Rc< _Wrappers_Compile::Result< ::dafny_runtime::Sequence, - ::dafny_runtime::Rc< - software::amazon::cryptography::primitives::internaldafny::types::Error, - >, + ::dafny_runtime::Rc, >, > { let algorithm = match **digest_algorithm { @@ -27,10 +25,10 @@ impl crate::ExternDigest::_default { DigestAlgorithm::SHA_384 {} => &digest::SHA384, DigestAlgorithm::SHA_256 {} => &digest::SHA256, }; - let message_vec = &message.to_array(); - let result = digest::digest(algorithm, message_vec); + let message_vec: Vec = message.iter().collect(); + let result = digest::digest(algorithm, &message_vec); ::dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(result.as_ref().to_vec()), + value: result.as_ref().iter().cloned().collect(), }) } } diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs index 1115423712..58cfca088a 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs @@ -279,7 +279,7 @@ pub mod ECDH { ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { let result = get_out_of_bounds(curve_algorithm); Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(result), + value: result.iter().cloned().collect(), }) } @@ -306,17 +306,17 @@ pub mod ECDH { ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { let result = get_infinity(curve_algorithm); Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(result), + value: result.iter().cloned().collect(), }) } pub fn GetPublicKey( curve_algorithm: &Rc, private_key: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let private_key = &private_key.pem().to_array(); - match get_public_key(curve_algorithm, private_key) { + let private_key: Vec = private_key.pem().iter().collect(); + match get_public_key(curve_algorithm, &private_key) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(x), + value: x.iter().cloned().collect(), }), Err(e) => { let msg = format!("ECDH Get Public Key : {}", e); @@ -340,7 +340,7 @@ pub mod ECDH { } let ec_key = unsafe { EVP_PKEY_get0_EC_KEY(evp_pkey) }; - if unsafe { aws_lc_sys::EC_KEY_check_fips(ec_key) } != 1 { + if unsafe {aws_lc_sys::EC_KEY_check_fips(ec_key)} != 1 { return Err(INVALID_KEY.to_string()); } let ec_group = unsafe { EC_KEY_get0_group(ec_key) }; @@ -359,8 +359,8 @@ pub mod ECDH { curve_algorithm: &Rc, public_key: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result>> { - let public_key = &public_key.to_array(); - match valid_public_key(curve_algorithm, public_key) { + let public_key: Vec = public_key.iter().collect(); + match valid_public_key(curve_algorithm, &public_key) { Ok(_) => Rc::new(_Wrappers_Compile::Result::Success { value: true }), Err(e) => Rc::new(_Wrappers_Compile::Result::Failure { error: super::error(&e), @@ -372,10 +372,10 @@ pub mod ECDH { public_key: &::dafny_runtime::Sequence, _curve_algorithm: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let public_key = &public_key.to_array(); - match X509_to_X962(public_key, true, None) { + let public_key: Vec = public_key.iter().collect(); + match X509_to_X962(&public_key, true, None) { Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(v), + value: v.iter().cloned().collect(), }), Err(e) => { let msg = format!("ECDH Compress Public Key {}", e); @@ -390,10 +390,10 @@ pub mod ECDH { public_key: &::dafny_runtime::Sequence, curve_algorithm: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let public_key = &public_key.to_array(); - match X962_to_X509(public_key, curve_algorithm) { + let public_key: Vec = public_key.iter().collect(); + match X962_to_X509(&public_key, curve_algorithm) { Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(v), + value: v.iter().cloned().collect(), }), Err(e) => { let msg = format!("ECDH Decompress Public Key {}", e); @@ -407,8 +407,8 @@ pub mod ECDH { pub fn ParsePublicKey( publicKey: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let public_key = &publicKey.to_array(); - match X509_to_X962(public_key, false, None) { + let public_key: Vec = publicKey.iter().collect(); + match X509_to_X962(&public_key, false, None) { Ok(_) => Rc::new(_Wrappers_Compile::Result::Success { value: publicKey.clone(), }), @@ -451,11 +451,11 @@ pub mod ECDH { private_key: &Rc, public_key: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let private_key = &private_key.pem().to_array(); - let public_key = &public_key.der().to_array(); - match agree(curve_algorithm, private_key, public_key) { + let private_key: Vec = private_key.pem().iter().collect(); + let public_key: Vec = public_key.der().iter().collect(); + match agree(curve_algorithm, &private_key, &public_key) { Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(v), + value: v.iter().cloned().collect(), }), Err(e) => { let msg = format!("ECDH Calculate Shared Secret : {}", e); @@ -500,8 +500,8 @@ pub mod ECDH { match ecdsa_key_gen(s) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: Rc::new(crate::ECDH::EccKeyPair::EccKeyPair { - publicKey: dafny_runtime::Sequence::from_array_owned(x.0), - privateKey: dafny_runtime::Sequence::from_array_owned(x.1), + publicKey: x.0.iter().cloned().collect(), + privateKey: x.1.iter().cloned().collect(), }), }), Err(e) => { diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs index f7b9923333..628b483c99 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs @@ -134,8 +134,8 @@ pub mod Signature { match ecdsa_key_gen(alg) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: Rc::new(Signature::SignatureKeyPair::SignatureKeyPair { - verificationKey: dafny_runtime::Sequence::from_array_owned(x.0), - signingKey: dafny_runtime::Sequence::from_array_owned(x.1), + verificationKey: x.0.iter().cloned().collect(), + signingKey: x.1.iter().cloned().collect(), }), }), Err(e) => { @@ -182,11 +182,11 @@ pub mod Signature { key: &::dafny_runtime::Sequence, msg: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let key = &key.to_array(); - let msg = &msg.to_array(); - match ecdsa_sign(alg, key, msg) { + let key: Vec = key.iter().collect(); + let msg: Vec = msg.iter().collect(); + match ecdsa_sign(alg, &key, &msg) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(x), + value: x.iter().cloned().collect(), }), Err(e) => { let msg = format!("ECDSA Sign : {}", e); @@ -214,10 +214,10 @@ pub mod Signature { msg: &::dafny_runtime::Sequence, sig: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result>> { - let key = &key.to_array(); - let msg = &msg.to_array(); - let sig = &sig.to_array(); - match ecdsa_verify(alg, key, msg, sig) { + let key: Vec = key.iter().collect(); + let msg: Vec = msg.iter().collect(); + let sig: Vec = sig.iter().collect(); + match ecdsa_verify(alg, &key, &msg, &sig) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: x }), Err(e) => { let msg = format!("ECDSA Verify : {}", e); @@ -248,7 +248,7 @@ pub mod Signature { }; let message: ::dafny_runtime::Sequence = - dafny_runtime::Sequence::from_array_owned(vec![1u8, 2, 3, 4, 5]); + [1u8, 2, 3, 4, 5].iter().cloned().collect(); let sig = match &*Sign(&alg, &s_key, &message) { _Wrappers_Compile::Result::Success { value } => value.clone(), diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs index fdbe43ec06..5c441ef551 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs @@ -27,17 +27,15 @@ impl crate::HMAC::_default { ) -> ::dafny_runtime::Rc< _Wrappers_Compile::Result< ::dafny_runtime::Sequence, - ::dafny_runtime::Rc< - software::amazon::cryptography::primitives::internaldafny::types::Error, - >, + ::dafny_runtime::Rc, >, > { - let key_vec = &input.key().to_array(); - let the_key = hmac::Key::new(convert_algorithm(input.digestAlgorithm()), key_vec); - let message_vec = &input.message().to_array(); - let result = hmac::sign(&the_key, message_vec); + let key_vec: Vec = input.key().iter().collect(); + let the_key = hmac::Key::new(convert_algorithm(input.digestAlgorithm()), &key_vec); + let message_vec: Vec = input.message().iter().collect(); + let result = hmac::sign(&the_key, &message_vec); ::dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(result.as_ref().to_vec()), + value: result.as_ref().iter().cloned().collect(), }) } } @@ -45,8 +43,8 @@ impl crate::HMAC::_default { #[allow(non_snake_case)] pub mod HMAC { use crate::*; - use ::dafny_runtime::RefCell; use aws_lc_rs::hmac; + use ::dafny_runtime::RefCell; #[allow(non_camel_case_types)] pub struct _default {} @@ -66,8 +64,8 @@ pub mod HMAC { impl HMac { pub fn Init(&self, salt: &::dafny_runtime::Sequence) { - let salt = &salt.to_array(); - self.inner.lock().unwrap().key = Some(hmac::Key::new(self.algorithm, salt)); + let salt: Vec = salt.iter().collect(); + self.inner.lock().unwrap().key = Some(hmac::Key::new(self.algorithm, &salt)); let context = Some(hmac::Context::with_key( self.inner.lock().unwrap().key.as_ref().unwrap(), )); @@ -102,25 +100,24 @@ pub mod HMAC { ::dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { value: inner }) } pub fn BlockUpdate(&self, block: &::dafny_runtime::Sequence) { - let part = &block.to_array(); + let part: Vec = block.iter().collect(); self.inner - .lock() - .unwrap() + .lock().unwrap() .context .as_mut() .unwrap() - .update(part); + .update(&part); } pub fn GetResult(&self) -> ::dafny_runtime::Sequence { let is_empty = self.inner.lock().unwrap().context.is_none(); if is_empty { - return dafny_runtime::Sequence::from_array_owned(vec![]); + return [].iter().cloned().collect(); } let tag = self.inner.lock().unwrap().context.take().unwrap().sign(); // other languages allow you to call BlockUpdate after GetResult // so we re-initialize to mimic that behavior self.re_init(); - dafny_runtime::Sequence::from_array_owned(tag.as_ref().to_vec()) + tag.as_ref().iter().cloned().collect() } } } diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs new file mode 100644 index 0000000000..217cb11008 --- /dev/null +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs @@ -0,0 +1,7 @@ +// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. +// SPDX-License-Identifier: Apache-2.0 + +pub use crate::deps::aws_cryptography_keyStore; +pub use crate::deps::aws_cryptography_primitives; +pub use crate::deps::com_amazonaws_dynamodb; +pub use crate::deps::com_amazonaws_kms; diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs index ae5bf10913..349d6d8fb8 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs @@ -21,8 +21,8 @@ pub(crate) mod standard_library_conversions; pub(crate) mod standard_library_externs; pub use client::Client; -pub use crate::deps::aws_cryptography_keyStore; pub use crate::deps::aws_cryptography_primitives; +pub use crate::deps::aws_cryptography_keyStore; pub use crate::deps::com_amazonaws_dynamodb; pub use crate::deps::com_amazonaws_kms; @@ -57,9 +57,9 @@ pub(crate) use crate::implementation_from_dafny::ExternDigest; pub(crate) use crate::implementation_from_dafny::ExternRandom; pub(crate) use crate::implementation_from_dafny::Signature; pub(crate) use crate::implementation_from_dafny::Time; -pub(crate) use crate::implementation_from_dafny::_LocalCMC_Compile; -pub(crate) use crate::implementation_from_dafny::_StormTracker_Compile; pub(crate) use crate::implementation_from_dafny::ECDH; pub(crate) use crate::implementation_from_dafny::HMAC; pub(crate) use crate::implementation_from_dafny::UTF8; pub(crate) use crate::implementation_from_dafny::UUID; +pub(crate) use crate::implementation_from_dafny::_StormTracker_Compile; +pub(crate) use crate::implementation_from_dafny::_LocalCMC_Compile; diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs index 089b8471a8..fbacbc0dc5 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs @@ -8,17 +8,16 @@ #![allow(non_snake_case)] impl crate::implementation_from_dafny::OsLang::_default { - pub fn GetLanguageShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { - dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string( - "Rust", - ) + pub fn GetLanguageShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> + { + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string("Rust") } - pub fn GetLanguageLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { - dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string( - "Rust", - ) + pub fn GetLanguageLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> + { + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string("Rust") } - pub fn GetOsShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { + pub fn GetOsShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> + { let os = match std::env::consts::OS { "macos" => "MacOS", "windows" => "Windows", @@ -26,12 +25,14 @@ impl crate::implementation_from_dafny::OsLang::_default { "linux" => "Unix", "freebsd" => "Unix", "netbsd" => "Unix", - _ => "Other", + _ => "Other" }; dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(os) } - pub fn GetOsLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { + pub fn GetOsLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> + { let os = format!("{} {}", std::env::consts::OS, std::env::consts::ARCH); dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&os) } -} + +} \ No newline at end of file diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs index 0aedbbae85..3fafbf6b8e 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs @@ -15,9 +15,7 @@ impl crate::ExternRandom::_default { ) -> ::dafny_runtime::Rc< _Wrappers_Compile::Result< ::dafny_runtime::Sequence, - ::dafny_runtime::Rc< - software::amazon::cryptography::primitives::internaldafny::types::Error, - >, + ::dafny_runtime::Rc, >, > { let mut rand_bytes: Vec = vec![0; num_bytes as usize]; @@ -25,7 +23,7 @@ impl crate::ExternRandom::_default { Ok(_) => { ::dafny_runtime::Rc::new( _Wrappers_Compile::Result::Success{value : - dafny_runtime::Sequence::from_array_owned(rand_bytes) + dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&rand_bytes, |x| *x) } ) } diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs index 72bd24ca98..5edfda2a69 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs @@ -71,10 +71,7 @@ pub mod RSAEncryption { length_bits: i32, ) -> (::dafny_runtime::Sequence, ::dafny_runtime::Sequence) { match generate_key_pair(length_bits) { - Ok(x) => ( - dafny_runtime::Sequence::from_array_owned(x.0), - dafny_runtime::Sequence::from_array_owned(x.1), - ), + Ok(x) => (x.0.iter().cloned().collect(), x.1.iter().cloned().collect()), Err(e) => { panic!("Unexpected error generating RSA Key Pair{}", e); } @@ -105,8 +102,8 @@ pub mod RSAEncryption { pub fn GetRSAKeyModulusLengthExtern( public_key: &::dafny_runtime::Sequence, ) -> Rc>> { - let public_key = &public_key.to_array(); - match get_modulus(public_key) { + let public_key: Vec = public_key.iter().collect(); + match get_modulus(&public_key) { Ok(v) => Rc::new(Wrappers::Result::Success { value: v }), Err(e) => Rc::new(Wrappers::Result::Failure { error: error(&e) }), } @@ -143,11 +140,11 @@ pub mod RSAEncryption { private_key: &::dafny_runtime::Sequence, cipher_text: &::dafny_runtime::Sequence, ) -> Rc, Rc>> { - let private_key = &private_key.to_array(); - let cipher_text = &cipher_text.to_array(); - match decrypt_extern(mode, private_key, cipher_text) { + let private_key: Vec = private_key.iter().collect(); + let cipher_text: Vec = cipher_text.iter().collect(); + match decrypt_extern(mode, &private_key, &cipher_text) { Ok(x) => Rc::new(Wrappers::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(x), + value: x.iter().cloned().collect(), }), Err(e) => { let msg = format!("RSA Decrypt : {}", e); @@ -185,11 +182,11 @@ pub mod RSAEncryption { public_key: &::dafny_runtime::Sequence, message: &::dafny_runtime::Sequence, ) -> Rc, Rc>> { - let public_key = &public_key.to_array(); - let message = &message.to_array(); - match encrypt_extern(mode, public_key, message) { + let public_key: Vec = public_key.iter().collect(); + let message: Vec = message.iter().collect(); + match encrypt_extern(mode, &public_key, &message) { Ok(x) => Rc::new(Wrappers::Result::Success { - value: dafny_runtime::Sequence::from_array_owned(x), + value: x.iter().cloned().collect(), }), Err(e) => { let msg = format!("RSA Encrypt : {}", e); @@ -238,7 +235,7 @@ pub mod RSAEncryption { let mode = RSAPaddingMode::OAEP_SHA256 {}; let plain_text: ::dafny_runtime::Sequence = - dafny_runtime::Sequence::from_array_owned(vec![1u8, 2, 3, 4, 5]); + [1u8, 2, 3, 4, 5].iter().cloned().collect(); let cipher: ::dafny_runtime::Sequence = match &*EncryptExtern(&mode, &public_key, &plain_text) { diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs index 6ac6a71ccc..6c9fb380cc 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs @@ -25,7 +25,7 @@ pub mod SortedSets { ) -> ::dafny_runtime::Sequence<::dafny_runtime::Sequence> { let mut vec = elems.iter().cloned().collect::>(); vec.sort_by(|a, b| Self::order(a, b, less)); - dafny_runtime::Sequence::from_array_owned(vec) + dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&vec, |x| x.clone()) } pub fn SetToOrderedSequence2( diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs index 56f330dbc1..2a75c8babf 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs @@ -26,7 +26,7 @@ impl crate::UUID::_default { Ok(u) => { let b = u.as_bytes(); dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { value : - dafny_runtime::Sequence::from_array_owned(b.to_vec()) + b.iter().cloned().collect() }) } Err(e) => { @@ -47,7 +47,7 @@ impl crate::UUID::_default { ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, >, > { - let vec = &bytes.to_array(); + let vec: Vec = bytes.iter().collect(); if vec.len() != 16 { return dafny_runtime::Rc::new(_Wrappers_Compile::Result::Failure{ error : dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string("Not 16 bytes of input to FromByteArray.") diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs b/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs index 99ee87dc79..5a0e1c96bd 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs @@ -28,19 +28,19 @@ impl From for BoxError { } pub mod local_cmc_tests { - use aws_mpl_rs::client as mpl_client; - use aws_mpl_rs::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials; - use aws_mpl_rs::operation::get_cache_entry::GetCacheEntryOutput; - use aws_mpl_rs::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef; - use aws_mpl_rs::types::error::Error; use aws_mpl_rs::types::material_providers_config::MaterialProvidersConfig; + use aws_mpl_rs::client as mpl_client; use aws_mpl_rs::types::CacheType; use aws_mpl_rs::types::DefaultCache; + use aws_mpl_rs::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef; + use aws_mpl_rs::operation::get_cache_entry::GetCacheEntryOutput; + use aws_mpl_rs::types::error::Error; use aws_mpl_rs::types::Materials; + use aws_mpl_rs::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials; + use std::collections::HashMap; use chrono::Utc; - use futures::stream::StreamExt; use rand::{rng, Rng}; - use std::collections::HashMap; + use futures::stream::StreamExt; // Currently this is commented out to keep it consistent with other // runtimes but every language should eventually have a network // call delay while testing adding to the StormTrackingCache. @@ -50,11 +50,11 @@ pub mod local_cmc_tests { let mpl_config: MaterialProvidersConfig = MaterialProvidersConfig::builder().build()?; let mpl: mpl_client::Client = mpl_client::Client::from_conf(mpl_config)?; - let test: CryptographicMaterialsCacheRef = mpl - .create_cryptographic_materials_cache() + let test: CryptographicMaterialsCacheRef = mpl.create_cryptographic_materials_cache() .cache(CacheType::Default( - DefaultCache::builder().entry_capacity(10).build()?, - )) + DefaultCache::builder() + .entry_capacity(10) + .build()?)) .send() .await?; @@ -79,14 +79,14 @@ pub mod local_cmc_tests { "eighteen", "nineteen", "twenty", - "twenty one", + "twenty one" ]; let id_size: usize = identifiers.len(); let invocations = 300000; let concurrent_tasks = 10; - + futures::stream::iter(0..invocations) .map(|_i| { let identifiers = identifiers.clone(); @@ -97,32 +97,27 @@ pub mod local_cmc_tests { let random = rng().random_range(0..id_size); let beacon_key_identifier: &str = identifiers[random]; - let cache_identifier: aws_smithy_types::Blob = - aws_smithy_types::Blob::new(beacon_key_identifier.as_bytes()); + let cache_identifier: aws_smithy_types::Blob = aws_smithy_types::Blob::new(beacon_key_identifier.as_bytes()); - let cache_entry_output: Result = test - .get_cache_entry() + let cache_entry_output: Result = test.get_cache_entry() .identifier(cache_identifier.clone()) .send() .await; match cache_entry_output { Ok(_) => { - println!( - "Cache hit for beacon key identifier: {}", - beacon_key_identifier - ); + println!("Cache hit for beacon key identifier: {}", beacon_key_identifier); } - Err(Error::EntryDoesNotExist { message: _m }) => { + Err(Error::EntryDoesNotExist {message: _m}) => { let materials = Materials::BeaconKey( - BeaconKeyMaterials::builder() + BeaconKeyMaterials::builder() .beacon_key_identifier(beacon_key_identifier.to_string()) // The cacheIdentifier is used as the material // because we are not testing the cryptography here. .beacon_key(cache_identifier.clone()) .encryption_context(HashMap::new()) - .build()?, - ); + .build()? + ); // This sleep time is to mimic a KMS or DDB call // Currently this is commented out to keep it consistent with other // runtimes but every language should eventually have a network @@ -140,15 +135,13 @@ pub mod local_cmc_tests { .materials(materials) .send() .await?; - - println!( - "Cache miss for beacon key identifier: {}", - beacon_key_identifier - ); + + println!("Cache miss for beacon key identifier: {}", beacon_key_identifier); } Err(e) => { panic!("Unexpected error while accessing cache: {}", e); } + } Ok::<(), crate::BoxError>(()) @@ -157,7 +150,7 @@ pub mod local_cmc_tests { .buffer_unordered(concurrent_tasks) .collect::>() .await; - + Ok(()) } diff --git a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go index d0adeb556e..47bf4f58c6 100644 --- a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go +++ b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go @@ -417,79 +417,79 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input int32) int32 { func Aws_cryptography_primitives_AESDecryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -502,92 +502,92 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_ToDafny(input awscryptog func Aws_cryptography_primitives_AESEncryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptInput_msg_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -600,27 +600,27 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_ToDafny(input int func Aws_cryptography_primitives_AesKdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -633,14 +633,14 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_ToDafny(input func Aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -672,27 +672,27 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -764,14 +764,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_ToDafny(inpu func Aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -784,14 +784,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_ToDafny(input func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -823,27 +823,27 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_DigestInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_DigestOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -875,40 +875,40 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_ToDafny(input func Aws_cryptography_primitives_ECDSASignInput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSASignInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -940,40 +940,40 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_ToDafny(inp func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1104,27 +1104,27 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1137,14 +1137,14 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_ToDafny(input i func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1171,14 +1171,14 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_ToDafny(input int32) in func Aws_cryptography_primitives_RSAPublicKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1198,14 +1198,14 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_ToDafny(input int32) i func Aws_cryptography_primitives_RSAPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1277,27 +1277,27 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_ToD func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1336,40 +1336,40 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HkdfInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_HkdfInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HkdfInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1382,14 +1382,14 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_ToDafny(input int32) i func Aws_cryptography_primitives_HkdfOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1421,27 +1421,27 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_ToDafny(input a func Aws_cryptography_primitives_HkdfExpandInput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HkdfExpandInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1454,14 +1454,14 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_ToDafny(input in func Aws_cryptography_primitives_HkdfExpandOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1493,40 +1493,40 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_ToDafny(input func Aws_cryptography_primitives_HkdfExtractInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1558,40 +1558,40 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HMacInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HMacInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HMacOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1623,14 +1623,14 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_KdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1643,53 +1643,53 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_ToDafny(input int32) func Aws_cryptography_primitives_KdfCtrInput_purpose_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1728,40 +1728,40 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSADecryptInput_privateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1793,40 +1793,40 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSAEncryptInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1858,14 +1858,14 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go index 7bc7d231b5..cf93b68202 100644 --- a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go +++ b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go @@ -377,80 +377,98 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input interface{}) i } func Aws_cryptography_primitives_AESDecryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_GCM { @@ -461,93 +479,114 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interfac } func Aws_cryptography_primitives_AESEncryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_msg_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -558,28 +597,34 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input i } func Aws_cryptography_primitives_AesKdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -587,15 +632,18 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(inpu } func Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -618,28 +666,34 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -686,15 +740,18 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_FromDafny(in } func Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -702,15 +759,18 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(inp } func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -733,28 +793,34 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_DigestInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DigestOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -777,41 +843,50 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(inp } func Aws_cryptography_primitives_ECDSASignInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSASignInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -834,41 +909,50 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(i } func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyOutput_success_FromDafny(input interface{}) bool { @@ -954,28 +1038,34 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input interface{}) int32 { @@ -986,15 +1076,18 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input } func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_FromDafny(input interface{}) int32 { @@ -1016,15 +1109,18 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_FromDafny(input interfa } func Aws_cryptography_primitives_RSAPublicKey_pem_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPrivateKey { @@ -1040,15 +1136,18 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_FromDafny(input interf } func Aws_cryptography_primitives_RSAPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1095,28 +1194,34 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_Fro } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_FromDafny(input interface{}) int32 { @@ -1145,41 +1250,50 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HkdfInput_salt_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfInput_info_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1190,15 +1304,18 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interf } func Aws_cryptography_primitives_HkdfOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1221,28 +1338,34 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandInput_prk_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExpandInput_info_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1253,15 +1376,18 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1284,41 +1410,50 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(inpu } func Aws_cryptography_primitives_HkdfExtractInput_salt_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1341,41 +1476,50 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HMacInput_key_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HMacInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HMacOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1398,15 +1542,18 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_KdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1417,54 +1564,66 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input inte } func Aws_cryptography_primitives_KdfCtrInput_purpose_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -1490,41 +1649,50 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSADecryptInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { @@ -1547,41 +1715,50 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSAEncryptInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1604,15 +1781,18 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ValidatePublicKeyOutput_success_FromDafny(input interface{}) bool { diff --git a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go index d0adeb556e..47bf4f58c6 100644 --- a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go +++ b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go @@ -417,79 +417,79 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input int32) int32 { func Aws_cryptography_primitives_AESDecryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -502,92 +502,92 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_ToDafny(input awscryptog func Aws_cryptography_primitives_AESEncryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptInput_msg_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -600,27 +600,27 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_ToDafny(input int func Aws_cryptography_primitives_AesKdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -633,14 +633,14 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_ToDafny(input func Aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -672,27 +672,27 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -764,14 +764,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_ToDafny(inpu func Aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -784,14 +784,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_ToDafny(input func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -823,27 +823,27 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_DigestInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_DigestOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -875,40 +875,40 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_ToDafny(input func Aws_cryptography_primitives_ECDSASignInput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSASignInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -940,40 +940,40 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_ToDafny(inp func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1104,27 +1104,27 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1137,14 +1137,14 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_ToDafny(input i func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1171,14 +1171,14 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_ToDafny(input int32) in func Aws_cryptography_primitives_RSAPublicKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1198,14 +1198,14 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_ToDafny(input int32) i func Aws_cryptography_primitives_RSAPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1277,27 +1277,27 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_ToD func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1336,40 +1336,40 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HkdfInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_HkdfInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HkdfInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1382,14 +1382,14 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_ToDafny(input int32) i func Aws_cryptography_primitives_HkdfOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1421,27 +1421,27 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_ToDafny(input a func Aws_cryptography_primitives_HkdfExpandInput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HkdfExpandInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1454,14 +1454,14 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_ToDafny(input in func Aws_cryptography_primitives_HkdfExpandOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1493,40 +1493,40 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_ToDafny(input func Aws_cryptography_primitives_HkdfExtractInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1558,40 +1558,40 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HMacInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HMacInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_HMacOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1623,14 +1623,14 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_KdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1643,53 +1643,53 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_ToDafny(input int32) func Aws_cryptography_primitives_KdfCtrInput_purpose_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1728,40 +1728,40 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSADecryptInput_privateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1793,40 +1793,40 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSAEncryptInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -1858,14 +1858,14 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go index 7bc7d231b5..cf93b68202 100644 --- a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go +++ b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go @@ -377,80 +377,98 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input interface{}) i } func Aws_cryptography_primitives_AESDecryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_GCM { @@ -461,93 +479,114 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interfac } func Aws_cryptography_primitives_AESEncryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_msg_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -558,28 +597,34 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input i } func Aws_cryptography_primitives_AesKdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -587,15 +632,18 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(inpu } func Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -618,28 +666,34 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -686,15 +740,18 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_FromDafny(in } func Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -702,15 +759,18 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(inp } func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -733,28 +793,34 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_DigestInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_DigestOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -777,41 +843,50 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(inp } func Aws_cryptography_primitives_ECDSASignInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSASignInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -834,41 +909,50 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(i } func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ECDSAVerifyOutput_success_FromDafny(input interface{}) bool { @@ -954,28 +1038,34 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input interface{}) int32 { @@ -986,15 +1076,18 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input } func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_FromDafny(input interface{}) int32 { @@ -1016,15 +1109,18 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_FromDafny(input interfa } func Aws_cryptography_primitives_RSAPublicKey_pem_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPrivateKey { @@ -1040,15 +1136,18 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_FromDafny(input interf } func Aws_cryptography_primitives_RSAPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1095,28 +1194,34 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_Fro } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_FromDafny(input interface{}) int32 { @@ -1145,41 +1250,50 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HkdfInput_salt_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfInput_info_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1190,15 +1304,18 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interf } func Aws_cryptography_primitives_HkdfOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1221,28 +1338,34 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandInput_prk_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExpandInput_info_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1253,15 +1376,18 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1284,41 +1410,50 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(inpu } func Aws_cryptography_primitives_HkdfExtractInput_salt_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1341,41 +1476,50 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HMacInput_key_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HMacInput_message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_HMacOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1398,15 +1542,18 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_KdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1417,54 +1564,66 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input inte } func Aws_cryptography_primitives_KdfCtrInput_purpose_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -1490,41 +1649,50 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSADecryptInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { @@ -1547,41 +1715,50 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSAEncryptInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1604,15 +1781,18 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_primitives_ValidatePublicKeyOutput_success_FromDafny(input interface{}) bool { diff --git a/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy b/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy index fc75ad8f3a..f8c54b9265 100644 --- a/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy +++ b/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy @@ -13,10 +13,7 @@ module TestKDFK_TestVectors { import opened TestKDF // UTF-8 encoded "aws-kms-hierarchy" - const PURPOSE : UTF8.ValidUTF8Bytes := - var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79]; - assert s == UTF8.EncodeAscii("aws-kms-hierarchy"); - s + const PURPOSE: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("aws-kms-hierarchy") // https://tiny.amazon.com/bhksn4so const rawTestVectors: seq := [b1, b2, b3, b4, b5, b6, b7, b8, b9, b10] diff --git a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go index c250ed82ac..010c3c9e03 100644 --- a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go +++ b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go @@ -1586,14 +1586,14 @@ func Com_amazonaws_dynamodb_AttributeValue_N_ToDafny(input string) Wrappers.Opti func Com_amazonaws_dynamodb_AttributeValue_B_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -1667,14 +1667,14 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_ToDafny(input [][]byte) Wrappers.O func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2079,11 +2079,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_CapacityUnits_ToDafny(input *float6 var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2095,11 +2095,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_ReadCapacityUnits_ToDafny(input *fl var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2111,11 +2111,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_WriteCapacityUnits_ToDafny(input *f var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2136,11 +2136,11 @@ func Com_amazonaws_dynamodb_Capacity_ReadCapacityUnits_ToDafny(input *float64) W var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2152,11 +2152,11 @@ func Com_amazonaws_dynamodb_Capacity_WriteCapacityUnits_ToDafny(input *float64) var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2168,11 +2168,11 @@ func Com_amazonaws_dynamodb_Capacity_CapacityUnits_ToDafny(input *float64) Wrapp var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2858,11 +2858,11 @@ func Com_amazonaws_dynamodb_ItemCollectionSizeEstimateRange_member_ToDafny(input var bits = math.Float64bits(input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -6767,11 +6767,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationD var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -12272,11 +12272,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationU var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go index 971c510f59..b1f03b3f3d 100644 --- a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go +++ b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go @@ -2136,15 +2136,18 @@ func Com_amazonaws_dynamodb_AttributeValue_N_FromDafny(input interface{}) string } func Com_amazonaws_dynamodb_AttributeValue_B_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_dynamodb_AttributeValue_SS_FromDafny(input interface{}) []string { @@ -2213,15 +2216,18 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_FromDafny(input interface{}) [][]b } func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_dynamodb_AttributeValue_M_FromDafny(input interface{}) map[string]types.AttributeValue { diff --git a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go index c250ed82ac..010c3c9e03 100644 --- a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go +++ b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go @@ -1586,14 +1586,14 @@ func Com_amazonaws_dynamodb_AttributeValue_N_ToDafny(input string) Wrappers.Opti func Com_amazonaws_dynamodb_AttributeValue_B_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -1667,14 +1667,14 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_ToDafny(input [][]byte) Wrappers.O func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2079,11 +2079,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_CapacityUnits_ToDafny(input *float6 var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2095,11 +2095,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_ReadCapacityUnits_ToDafny(input *fl var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2111,11 +2111,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_WriteCapacityUnits_ToDafny(input *f var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2136,11 +2136,11 @@ func Com_amazonaws_dynamodb_Capacity_ReadCapacityUnits_ToDafny(input *float64) W var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2152,11 +2152,11 @@ func Com_amazonaws_dynamodb_Capacity_WriteCapacityUnits_ToDafny(input *float64) var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2168,11 +2168,11 @@ func Com_amazonaws_dynamodb_Capacity_CapacityUnits_ToDafny(input *float64) Wrapp var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2858,11 +2858,11 @@ func Com_amazonaws_dynamodb_ItemCollectionSizeEstimateRange_member_ToDafny(input var bits = math.Float64bits(input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -6767,11 +6767,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationD var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -12272,11 +12272,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationU var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - v := make([]interface{}, 0, 8) + var v []interface{} for _, e := range bytes { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go index 971c510f59..b1f03b3f3d 100644 --- a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go +++ b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go @@ -2136,15 +2136,18 @@ func Com_amazonaws_dynamodb_AttributeValue_N_FromDafny(input interface{}) string } func Com_amazonaws_dynamodb_AttributeValue_B_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_dynamodb_AttributeValue_SS_FromDafny(input interface{}) []string { @@ -2213,15 +2216,18 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_FromDafny(input interface{}) [][]b } func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_dynamodb_AttributeValue_M_FromDafny(input interface{}) map[string]types.AttributeValue { diff --git a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go index 2b6f83e896..a79549b57c 100644 --- a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go +++ b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go @@ -2814,14 +2814,14 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_ToDafny(input *string) Wrapper func Com_amazonaws_kms_DecryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2928,14 +2928,14 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_ToDafny(input types. func Com_amazonaws_kms_RecipientInfo_AttestationDocument_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2965,14 +2965,14 @@ func Com_amazonaws_kms_DecryptResponse_KeyId_ToDafny(input *string) Wrappers.Opt func Com_amazonaws_kms_DecryptResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3003,14 +3003,14 @@ func Com_amazonaws_kms_DecryptResponse_EncryptionAlgorithm_ToDafny(input types.E func Com_amazonaws_kms_DecryptResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3101,14 +3101,14 @@ func Com_amazonaws_kms_DeriveSharedSecretRequest_KeyAgreementAlgorithm_ToDafny(i func Com_amazonaws_kms_DeriveSharedSecretRequest_PublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3161,27 +3161,27 @@ func Com_amazonaws_kms_DeriveSharedSecretResponse_KeyId_ToDafny(input *string) W func Com_amazonaws_kms_DeriveSharedSecretResponse_SharedSecret_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_DeriveSharedSecretResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3716,14 +3716,14 @@ func Com_amazonaws_kms_EncryptRequest_KeyId_ToDafny(input *string) dafny.Sequenc func Com_amazonaws_kms_EncryptRequest_Plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3790,14 +3790,14 @@ func Com_amazonaws_kms_EncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Optio func Com_amazonaws_kms_EncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3937,27 +3937,27 @@ func Com_amazonaws_kms_GenerateDataKeyRequest_DryRun_ToDafny(input *bool) Wrappe func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3978,14 +3978,14 @@ func Com_amazonaws_kms_GenerateDataKeyResponse_KeyId_ToDafny(input *string) Wrap func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4076,40 +4076,40 @@ func Com_amazonaws_kms_GenerateDataKeyPairRequest_DryRun_ToDafny(input *bool) Wr func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyPlaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4155,14 +4155,14 @@ func Com_amazonaws_kms_GenerateDataKeyPairResponse_KeyPairSpec_ToDafny(input typ func Com_amazonaws_kms_GenerateDataKeyPairResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4244,27 +4244,27 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextRequest_DryRun_ToDafny func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4395,14 +4395,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextRequest_DryRun_ToDafny(inp func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4423,14 +4423,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_KeyId_ToDafny(inp func Com_amazonaws_kms_GenerateMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -4499,14 +4499,14 @@ func Com_amazonaws_kms_GenerateMacRequest_DryRun_ToDafny(input *bool) Wrappers.O func Com_amazonaws_kms_GenerateMacResponse_Mac_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4585,27 +4585,27 @@ func Com_amazonaws_kms_GenerateRandomRequest_Recipient_ToDafny(input *types.Reci func Com_amazonaws_kms_GenerateRandomResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateRandomResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4829,27 +4829,27 @@ func Com_amazonaws_kms_GetParametersForImportResponse_KeyId_ToDafny(input *strin func Com_amazonaws_kms_GetParametersForImportResponse_ImportToken_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GetParametersForImportResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4915,14 +4915,14 @@ func Com_amazonaws_kms_GetPublicKeyResponse_KeyId_ToDafny(input *string) Wrapper func Com_amazonaws_kms_GetPublicKeyResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -5060,27 +5060,27 @@ func Com_amazonaws_kms_ImportKeyMaterialRequest_KeyId_ToDafny(input *string) daf func Com_amazonaws_kms_ImportKeyMaterialRequest_ImportToken_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Com_amazonaws_kms_ImportKeyMaterialRequest_EncryptedKeyMaterial_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -5977,14 +5977,14 @@ func Com_amazonaws_kms_PutKeyPolicyRequest_BypassPolicyLockoutSafetyCheck_ToDafn func Com_amazonaws_kms_ReEncryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -6119,14 +6119,14 @@ func Com_amazonaws_kms_ReEncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Opt func Com_amazonaws_kms_ReEncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -6558,14 +6558,14 @@ func Com_amazonaws_kms_SignRequest_KeyId_ToDafny(input *string) dafny.Sequence { func Com_amazonaws_kms_SignRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -6659,14 +6659,14 @@ func Com_amazonaws_kms_SignResponse_KeyId_ToDafny(input *string) Wrappers.Option func Com_amazonaws_kms_SignResponse_Signature_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -7012,14 +7012,14 @@ func Com_amazonaws_kms_VerifyRequest_KeyId_ToDafny(input *string) dafny.Sequence func Com_amazonaws_kms_VerifyRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -7050,14 +7050,14 @@ func Com_amazonaws_kms_VerifyRequest_MessageType_ToDafny(input types.MessageType func Com_amazonaws_kms_VerifyRequest_Signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -7158,14 +7158,14 @@ func Com_amazonaws_kms_VerifyResponse_SigningAlgorithm_ToDafny(input types.Signi func Com_amazonaws_kms_VerifyMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -7211,14 +7211,14 @@ func Com_amazonaws_kms_VerifyMacRequest_MacAlgorithm_ToDafny(input types.MacAlgo func Com_amazonaws_kms_VerifyMacRequest_Mac_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go index e8bcb00496..dfb67b7017 100644 --- a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go +++ b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go @@ -3063,15 +3063,18 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_FromDafny(input interface{}) * } func Com_amazonaws_kms_DecryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DecryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3172,15 +3175,18 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_FromDafny(input inte } func Com_amazonaws_kms_RecipientInfo_AttestationDocument_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DecryptInput_DryRun_FromDafny(input interface{}) *bool { @@ -3205,15 +3211,18 @@ func Com_amazonaws_kms_DecryptOutput_KeyId_FromDafny(input interface{}) *string } func Com_amazonaws_kms_DecryptOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interface{}) types.EncryptionAlgorithmSpec { @@ -3239,15 +3248,18 @@ func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interfa } func Com_amazonaws_kms_DecryptOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeleteAliasInput_AliasName_FromDafny(input interface{}) *string { @@ -3302,15 +3314,18 @@ func Com_amazonaws_kms_DeriveSharedSecretInput_KeyAgreementAlgorithm_FromDafny(i } func Com_amazonaws_kms_DeriveSharedSecretInput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeriveSharedSecretInput_GrantTokens_FromDafny(input interface{}) []string { @@ -3362,28 +3377,34 @@ func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyId_FromDafny(input interface{ } func Com_amazonaws_kms_DeriveSharedSecretOutput_SharedSecret_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyAgreementAlgorithm_FromDafny(input interface{}) types.KeyAgreementAlgorithmSpec { @@ -3834,15 +3855,18 @@ func Com_amazonaws_kms_EncryptInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_EncryptInput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_EncryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3911,15 +3935,18 @@ func Com_amazonaws_kms_EncryptInput_DryRun_FromDafny(input interface{}) *bool { } func Com_amazonaws_kms_EncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_EncryptOutput_KeyId_FromDafny(input interface{}) *string { @@ -4048,28 +4075,34 @@ func Com_amazonaws_kms_GenerateDataKeyInput_DryRun_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) *string { @@ -4084,15 +4117,18 @@ func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4177,41 +4213,50 @@ func Com_amazonaws_kms_GenerateDataKeyPairInput_DryRun_FromDafny(input interface } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyPlaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyId_FromDafny(input interface{}) *string { @@ -4247,15 +4292,18 @@ func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyPairSpec_FromDafny(input int } func Com_amazonaws_kms_GenerateDataKeyPairOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4329,28 +4377,34 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_DryRun_FromDafny } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4468,15 +4522,18 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextInput_DryRun_FromDafny(inp } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4491,15 +4548,18 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(inp } func Com_amazonaws_kms_GenerateMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateMacInput_KeyId_FromDafny(input interface{}) *string { @@ -4556,15 +4616,18 @@ func Com_amazonaws_kms_GenerateMacInput_DryRun_FromDafny(input interface{}) *boo } func Com_amazonaws_kms_GenerateMacOutput_Mac_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateMacOutput_MacAlgorithm_FromDafny(input interface{}) types.MacAlgorithmSpec { @@ -4631,28 +4694,34 @@ func Com_amazonaws_kms_GenerateRandomInput_Recipient_FromDafny(input interface{} } func Com_amazonaws_kms_GenerateRandomOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateRandomOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetKeyPolicyInput_KeyId_FromDafny(input interface{}) *string { @@ -4823,28 +4892,34 @@ func Com_amazonaws_kms_GetParametersForImportOutput_KeyId_FromDafny(input interf } func Com_amazonaws_kms_GetParametersForImportOutput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_ParametersValidTo_FromDafny(input interface{}) *time.Time { @@ -4901,15 +4976,18 @@ func Com_amazonaws_kms_GetPublicKeyOutput_KeyId_FromDafny(input interface{}) *st } func Com_amazonaws_kms_GetPublicKeyOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetPublicKeyOutput_CustomerMasterKeySpec_FromDafny(input interface{}) types.CustomerMasterKeySpec { @@ -5033,28 +5111,34 @@ func Com_amazonaws_kms_ImportKeyMaterialInput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_ImportKeyMaterialInput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_EncryptedKeyMaterial_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_ValidTo_FromDafny(input interface{}) *time.Time { @@ -5827,15 +5911,18 @@ func Com_amazonaws_kms_PutKeyPolicyInput_BypassPolicyLockoutSafetyCheck_FromDafn } func Com_amazonaws_kms_ReEncryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ReEncryptInput_SourceEncryptionContext_FromDafny(input interface{}) map[string]string { @@ -5960,15 +6047,18 @@ func Com_amazonaws_kms_ReEncryptInput_DryRun_FromDafny(input interface{}) *bool } func Com_amazonaws_kms_ReEncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ReEncryptOutput_SourceKeyId_FromDafny(input interface{}) *string { @@ -6326,15 +6416,18 @@ func Com_amazonaws_kms_SignInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_SignInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6414,15 +6507,18 @@ func Com_amazonaws_kms_SignOutput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignOutput_Signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_SignOutput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6656,15 +6752,18 @@ func Com_amazonaws_kms_VerifyInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_VerifyInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6690,15 +6789,18 @@ func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) type } func Com_amazonaws_kms_VerifyInput_Signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyInput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6788,15 +6890,18 @@ func Com_amazonaws_kms_VerifyOutput_SigningAlgorithm_FromDafny(input interface{} } func Com_amazonaws_kms_VerifyMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyMacInput_KeyId_FromDafny(input interface{}) *string { @@ -6827,15 +6932,18 @@ func Com_amazonaws_kms_VerifyMacInput_MacAlgorithm_FromDafny(input interface{}) } func Com_amazonaws_kms_VerifyMacInput_Mac_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyMacInput_GrantTokens_FromDafny(input interface{}) []string { diff --git a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go index 2b6f83e896..a79549b57c 100644 --- a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go +++ b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go @@ -2814,14 +2814,14 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_ToDafny(input *string) Wrapper func Com_amazonaws_kms_DecryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -2928,14 +2928,14 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_ToDafny(input types. func Com_amazonaws_kms_RecipientInfo_AttestationDocument_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -2965,14 +2965,14 @@ func Com_amazonaws_kms_DecryptResponse_KeyId_ToDafny(input *string) Wrappers.Opt func Com_amazonaws_kms_DecryptResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3003,14 +3003,14 @@ func Com_amazonaws_kms_DecryptResponse_EncryptionAlgorithm_ToDafny(input types.E func Com_amazonaws_kms_DecryptResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3101,14 +3101,14 @@ func Com_amazonaws_kms_DeriveSharedSecretRequest_KeyAgreementAlgorithm_ToDafny(i func Com_amazonaws_kms_DeriveSharedSecretRequest_PublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3161,27 +3161,27 @@ func Com_amazonaws_kms_DeriveSharedSecretResponse_KeyId_ToDafny(input *string) W func Com_amazonaws_kms_DeriveSharedSecretResponse_SharedSecret_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_DeriveSharedSecretResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3716,14 +3716,14 @@ func Com_amazonaws_kms_EncryptRequest_KeyId_ToDafny(input *string) dafny.Sequenc func Com_amazonaws_kms_EncryptRequest_Plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -3790,14 +3790,14 @@ func Com_amazonaws_kms_EncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Optio func Com_amazonaws_kms_EncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3937,27 +3937,27 @@ func Com_amazonaws_kms_GenerateDataKeyRequest_DryRun_ToDafny(input *bool) Wrappe func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -3978,14 +3978,14 @@ func Com_amazonaws_kms_GenerateDataKeyResponse_KeyId_ToDafny(input *string) Wrap func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4076,40 +4076,40 @@ func Com_amazonaws_kms_GenerateDataKeyPairRequest_DryRun_ToDafny(input *bool) Wr func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyPlaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4155,14 +4155,14 @@ func Com_amazonaws_kms_GenerateDataKeyPairResponse_KeyPairSpec_ToDafny(input typ func Com_amazonaws_kms_GenerateDataKeyPairResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4244,27 +4244,27 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextRequest_DryRun_ToDafny func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4395,14 +4395,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextRequest_DryRun_ToDafny(inp func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4423,14 +4423,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_KeyId_ToDafny(inp func Com_amazonaws_kms_GenerateMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -4499,14 +4499,14 @@ func Com_amazonaws_kms_GenerateMacRequest_DryRun_ToDafny(input *bool) Wrappers.O func Com_amazonaws_kms_GenerateMacResponse_Mac_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4585,27 +4585,27 @@ func Com_amazonaws_kms_GenerateRandomRequest_Recipient_ToDafny(input *types.Reci func Com_amazonaws_kms_GenerateRandomResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GenerateRandomResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4829,27 +4829,27 @@ func Com_amazonaws_kms_GetParametersForImportResponse_KeyId_ToDafny(input *strin func Com_amazonaws_kms_GetParametersForImportResponse_ImportToken_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } func Com_amazonaws_kms_GetParametersForImportResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -4915,14 +4915,14 @@ func Com_amazonaws_kms_GetPublicKeyResponse_KeyId_ToDafny(input *string) Wrapper func Com_amazonaws_kms_GetPublicKeyResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -5060,27 +5060,27 @@ func Com_amazonaws_kms_ImportKeyMaterialRequest_KeyId_ToDafny(input *string) daf func Com_amazonaws_kms_ImportKeyMaterialRequest_ImportToken_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } func Com_amazonaws_kms_ImportKeyMaterialRequest_EncryptedKeyMaterial_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -5977,14 +5977,14 @@ func Com_amazonaws_kms_PutKeyPolicyRequest_BypassPolicyLockoutSafetyCheck_ToDafn func Com_amazonaws_kms_ReEncryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -6119,14 +6119,14 @@ func Com_amazonaws_kms_ReEncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Opt func Com_amazonaws_kms_ReEncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -6558,14 +6558,14 @@ func Com_amazonaws_kms_SignRequest_KeyId_ToDafny(input *string) dafny.Sequence { func Com_amazonaws_kms_SignRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -6659,14 +6659,14 @@ func Com_amazonaws_kms_SignResponse_KeyId_ToDafny(input *string) Wrappers.Option func Com_amazonaws_kms_SignResponse_Signature_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) }() } @@ -7012,14 +7012,14 @@ func Com_amazonaws_kms_VerifyRequest_KeyId_ToDafny(input *string) dafny.Sequence func Com_amazonaws_kms_VerifyRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -7050,14 +7050,14 @@ func Com_amazonaws_kms_VerifyRequest_MessageType_ToDafny(input types.MessageType func Com_amazonaws_kms_VerifyRequest_Signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -7158,14 +7158,14 @@ func Com_amazonaws_kms_VerifyResponse_SigningAlgorithm_ToDafny(input types.Signi func Com_amazonaws_kms_VerifyMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -7211,14 +7211,14 @@ func Com_amazonaws_kms_VerifyMacRequest_MacAlgorithm_ToDafny(input types.MacAlgo func Com_amazonaws_kms_VerifyMacRequest_Mac_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go index e8bcb00496..dfb67b7017 100644 --- a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go +++ b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go @@ -3063,15 +3063,18 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_FromDafny(input interface{}) * } func Com_amazonaws_kms_DecryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DecryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3172,15 +3175,18 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_FromDafny(input inte } func Com_amazonaws_kms_RecipientInfo_AttestationDocument_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DecryptInput_DryRun_FromDafny(input interface{}) *bool { @@ -3205,15 +3211,18 @@ func Com_amazonaws_kms_DecryptOutput_KeyId_FromDafny(input interface{}) *string } func Com_amazonaws_kms_DecryptOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interface{}) types.EncryptionAlgorithmSpec { @@ -3239,15 +3248,18 @@ func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interfa } func Com_amazonaws_kms_DecryptOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeleteAliasInput_AliasName_FromDafny(input interface{}) *string { @@ -3302,15 +3314,18 @@ func Com_amazonaws_kms_DeriveSharedSecretInput_KeyAgreementAlgorithm_FromDafny(i } func Com_amazonaws_kms_DeriveSharedSecretInput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeriveSharedSecretInput_GrantTokens_FromDafny(input interface{}) []string { @@ -3362,28 +3377,34 @@ func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyId_FromDafny(input interface{ } func Com_amazonaws_kms_DeriveSharedSecretOutput_SharedSecret_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyAgreementAlgorithm_FromDafny(input interface{}) types.KeyAgreementAlgorithmSpec { @@ -3834,15 +3855,18 @@ func Com_amazonaws_kms_EncryptInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_EncryptInput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_EncryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3911,15 +3935,18 @@ func Com_amazonaws_kms_EncryptInput_DryRun_FromDafny(input interface{}) *bool { } func Com_amazonaws_kms_EncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_EncryptOutput_KeyId_FromDafny(input interface{}) *string { @@ -4048,28 +4075,34 @@ func Com_amazonaws_kms_GenerateDataKeyInput_DryRun_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) *string { @@ -4084,15 +4117,18 @@ func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4177,41 +4213,50 @@ func Com_amazonaws_kms_GenerateDataKeyPairInput_DryRun_FromDafny(input interface } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyPlaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyId_FromDafny(input interface{}) *string { @@ -4247,15 +4292,18 @@ func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyPairSpec_FromDafny(input int } func Com_amazonaws_kms_GenerateDataKeyPairOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4329,28 +4377,34 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_DryRun_FromDafny } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4468,15 +4522,18 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextInput_DryRun_FromDafny(inp } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4491,15 +4548,18 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(inp } func Com_amazonaws_kms_GenerateMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateMacInput_KeyId_FromDafny(input interface{}) *string { @@ -4556,15 +4616,18 @@ func Com_amazonaws_kms_GenerateMacInput_DryRun_FromDafny(input interface{}) *boo } func Com_amazonaws_kms_GenerateMacOutput_Mac_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateMacOutput_MacAlgorithm_FromDafny(input interface{}) types.MacAlgorithmSpec { @@ -4631,28 +4694,34 @@ func Com_amazonaws_kms_GenerateRandomInput_Recipient_FromDafny(input interface{} } func Com_amazonaws_kms_GenerateRandomOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GenerateRandomOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetKeyPolicyInput_KeyId_FromDafny(input interface{}) *string { @@ -4823,28 +4892,34 @@ func Com_amazonaws_kms_GetParametersForImportOutput_KeyId_FromDafny(input interf } func Com_amazonaws_kms_GetParametersForImportOutput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_ParametersValidTo_FromDafny(input interface{}) *time.Time { @@ -4901,15 +4976,18 @@ func Com_amazonaws_kms_GetPublicKeyOutput_KeyId_FromDafny(input interface{}) *st } func Com_amazonaws_kms_GetPublicKeyOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_GetPublicKeyOutput_CustomerMasterKeySpec_FromDafny(input interface{}) types.CustomerMasterKeySpec { @@ -5033,28 +5111,34 @@ func Com_amazonaws_kms_ImportKeyMaterialInput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_ImportKeyMaterialInput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_EncryptedKeyMaterial_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_ValidTo_FromDafny(input interface{}) *time.Time { @@ -5827,15 +5911,18 @@ func Com_amazonaws_kms_PutKeyPolicyInput_BypassPolicyLockoutSafetyCheck_FromDafn } func Com_amazonaws_kms_ReEncryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ReEncryptInput_SourceEncryptionContext_FromDafny(input interface{}) map[string]string { @@ -5960,15 +6047,18 @@ func Com_amazonaws_kms_ReEncryptInput_DryRun_FromDafny(input interface{}) *bool } func Com_amazonaws_kms_ReEncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_ReEncryptOutput_SourceKeyId_FromDafny(input interface{}) *string { @@ -6326,15 +6416,18 @@ func Com_amazonaws_kms_SignInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_SignInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6414,15 +6507,18 @@ func Com_amazonaws_kms_SignOutput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignOutput_Signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input.(dafny.Sequence)); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_SignOutput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6656,15 +6752,18 @@ func Com_amazonaws_kms_VerifyInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_VerifyInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6690,15 +6789,18 @@ func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) type } func Com_amazonaws_kms_VerifyInput_Signature_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyInput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6788,15 +6890,18 @@ func Com_amazonaws_kms_VerifyOutput_SigningAlgorithm_FromDafny(input interface{} } func Com_amazonaws_kms_VerifyMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyMacInput_KeyId_FromDafny(input interface{}) *string { @@ -6827,15 +6932,18 @@ func Com_amazonaws_kms_VerifyMacInput_MacAlgorithm_FromDafny(input interface{}) } func Com_amazonaws_kms_VerifyMacInput_Mac_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Com_amazonaws_kms_VerifyMacInput_GrantTokens_FromDafny(input interface{}) []string { diff --git a/StandardLibrary/src/Actions.dfy b/StandardLibrary/src/Actions.dfy index a3e4f27b71..d90f55bd8f 100644 --- a/StandardLibrary/src/Actions.dfy +++ b/StandardLibrary/src/Actions.dfy @@ -22,7 +22,6 @@ module Actions { method Invoke(a: A, ghost attemptsState: seq>) returns (r: R) requires Invariant() - requires Requires(a) modifies Modifies decreases Modifies ensures Invariant() @@ -32,8 +31,6 @@ module Actions { reads Modifies decreases Modifies - predicate Requires(a: A) - /* * Contains the assertions that should be true upon return of the Invoke method */ @@ -62,7 +59,6 @@ module Actions { method Invoke(a: A, ghost attemptsState: seq>>) returns (r: Result) requires Invariant() - requires Requires(a) modifies Modifies decreases Modifies ensures Invariant() @@ -329,7 +325,6 @@ module Actions { ) requires 0 < |s| requires action.Invariant() - requires forall i <- s :: action.Requires(i) modifies action.Modifies decreases action.Modifies ensures 0 < |attemptsState| <= |s| diff --git a/StandardLibrary/src/Sequence.dfy b/StandardLibrary/src/Sequence.dfy index 4784927aed..2f87dd3095 100644 --- a/StandardLibrary/src/Sequence.dfy +++ b/StandardLibrary/src/Sequence.dfy @@ -2,50 +2,10 @@ // SPDX-License-Identifier: Apache-2.0 include "UInt.dfy" -include "WrappersInterop.dfy" module StandardLibrary.Sequence { // export provides SequenceEqual, StandardLibrary import opened UInt - import opened Wrappers - - // Just like Seq::MapWithResult, but not O(n^2) - function method {:opaque} {:tailrecursion} MapWithResult(f: (T ~> Result), xs: seq, pos : nat := 0, acc : seq := []) - : (result: Result, E>) - requires forall i :: 0 <= i < |xs| ==> f.requires(xs[i]) - requires pos <= |xs| - requires |acc| == pos - requires forall i :: 0 <= i < pos ==> - && f(xs[i]).Success? - && acc[i] == f(xs[i]).value - - ensures result.Success? ==> - && |result.value| == |xs| - && (forall i :: 0 <= i < |xs| ==> - && f(xs[i]).Success? - && result.value[i] == f(xs[i]).value) - reads set i, o | 0 <= i < |xs| && o in f.reads(xs[i]) :: o - decreases |xs| - pos - { - if |xs| == pos then - Success(acc) - else - var head :- f(xs[pos]); - MapWithResult(f, xs, pos+1, acc + [head]) - } - - - /* Flattens a sequence of sequences into a single sequence by concatenating - subsequences, starting from the first element. */ - function method {:tailrecursion} Flatten(xs: seq>, pos : nat := 0, acc : seq := []): (ret : seq) - requires pos <= |xs| - decreases |xs| - pos - { - if |xs| == pos then - acc - else - Flatten(xs, pos+1, acc + xs[pos]) - } predicate method SequenceEqualNat(seq1: seq, seq2: seq, start1: nat, start2: nat, size: nat) : (ret : bool) requires start1 + size <= |seq1| diff --git a/StandardLibrary/src/Time.dfy b/StandardLibrary/src/Time.dfy index 77ca4bf5e1..2e4b5891eb 100644 --- a/StandardLibrary/src/Time.dfy +++ b/StandardLibrary/src/Time.dfy @@ -5,8 +5,6 @@ include "./StandardLibrary.dfy" include "./UInt.dfy" include "./String.dfy" include "./OsLang.dfy" -include "./UTF8.dfy" -include "../../libraries/src/FileIO/FileIO.dfy" module {:extern "Time"} Time { import opened StandardLibrary @@ -14,8 +12,6 @@ module {:extern "Time"} Time { import opened UInt = StandardLibrary.UInt import StandardLibrary.String import OsLang - import UTF8 - import FileIO // Time is non-deterministic. // In this way it is similar to random number. @@ -138,22 +134,9 @@ module {:extern "Time"} Time { print "Clock Time : ", FormatMilli(time.ClockTime), " CPU Time : ", FormatMilli(time.CpuTime), "\n"; } - method PrintTimeSinceLong(start : AbsoluteTime, tag : string, file : Option := None) + method PrintTimeLong(time : RelativeTime, tag : string) { - var t := TimeSince(start); - PrintTimeLong(t, tag, file); - } - - method PrintTimeLong(time : RelativeTime, tag : string, file : Option := None) - { - var val := tag + " " + OsLang.GetOsShort() + " " + OsLang.GetLanguageShort() + " " + FormatMilli(time.ClockTime) + " " + FormatMilli(time.CpuTime) + "\n"; - print val; - if file.Some? { - var utf8_val := UTF8.Encode(val); - if utf8_val.Success? { - var _ := FileIO.AppendBytesToFile(file.value, utf8_val.value); - } - } + print tag, " ", OsLang.GetOsLong(), " ", OsLang.GetLanguageLong(), " Clock Time : ", FormatMilli(time.ClockTime), " CPU Time : ", FormatMilli(time.CpuTime), "\n"; } method PrintTimeShort(time : RelativeTime) diff --git a/StandardLibrary/src/UInt.dfy b/StandardLibrary/src/UInt.dfy index 9e82cc81d4..2f9daf0621 100644 --- a/StandardLibrary/src/UInt.dfy +++ b/StandardLibrary/src/UInt.dfy @@ -59,21 +59,6 @@ module StandardLibrary.UInt { x0 + s[1] as uint16 } - function method SeqPosToUInt16(s: seq, pos : nat): (x: uint16) - requires |s| >= pos+2 - ensures UInt16ToSeq(x) == s[pos..pos+2] - ensures x >= 0 - { - var x0 := s[pos] as uint16 * 0x100; - x0 + s[pos+1] as uint16 - } - - lemma SeqPosToUInt16Same(s: seq, pos : nat) - requires |s| >= pos+2 - ensures UInt16ToSeq(SeqPosToUInt16(s, pos)) == s[pos..pos+2] - ensures SeqToUInt16(s[pos..pos+2]) == SeqPosToUInt16(s, pos) - {} - lemma UInt16SeqSerializeDeserialize(x: uint16) ensures SeqToUInt16(UInt16ToSeq(x)) == x {} diff --git a/StandardLibrary/src/UTF8.dfy b/StandardLibrary/src/UTF8.dfy index 4579e30a13..dd84ad377e 100644 --- a/StandardLibrary/src/UTF8.dfy +++ b/StandardLibrary/src/UTF8.dfy @@ -59,9 +59,7 @@ module {:extern "UTF8"} UTF8 { } // Encode ASCII as UTF8 in a function, to allow use in ensures clause - // it's a ghost, because it's very expensive - // use explicit bytes in a constant, and then assert that it == EncodeAscii("whatever") - function {:opaque} EncodeAscii(s : string) : (ret : ValidUTF8Bytes) + function method {:opaque} {:tailrecursion} EncodeAscii(s : string) : (ret : ValidUTF8Bytes) requires IsASCIIString(s) ensures |s| == |ret| ensures forall i | 0 <= i < |s| :: s[i] as uint8 == ret[i] @@ -137,7 +135,7 @@ module {:extern "UTF8"} UTF8 { || ((s[0] == 0xF4) && (0x80 <= s[1] <= 0x8F) && (0x80 <= s[2] <= 0xBF) && (0x80 <= s[3] <= 0xBF)) } - predicate ValidUTF8Range(a: seq, lo: nat, hi: nat) + predicate method {:tailrecursion} ValidUTF8Range(a: seq, lo: nat, hi: nat) requires lo <= hi <= |a| decreases hi - lo { @@ -155,126 +153,6 @@ module {:extern "UTF8"} UTF8 { ValidUTF8Range(a, lo + 4, hi) else false - } by method { - - // The slice a[lo..hi] is un-optimized operations in Dafny. - // This means that their usage will result in a lot of data copying. - // Additional, it is very likely that these size of these sequences - // will be less than uint64. - // So writing an optimized version that only works on bounded types - // should further optimized this hot code. - - if HasUint64Len(a) { - return BoundedValidUTF8Range(a, lo as uint64, hi as uint64); - } - - if lo == hi { - assert ValidUTF8Range(a, lo, hi); - return true; - } - - var i := lo; - - while i < hi - invariant lo <= i <= hi - invariant ValidUTF8Range(a, lo, hi) == ValidUTF8Range(a, i, hi) - decreases hi - i - { - if - && i < hi - && 0x00 <= a[i] <= 0x7F - { - assert Uses1Byte(a[i..hi]); - i := i + 1; - } else if - && i + 1 < hi - && (0xC2 <= a[i] <= 0xDF) - && (0x80 <= a[i+1] <= 0xBF) - { - assert Uses2Bytes(a[i..hi]); - i := i + 2; - } else if - && i + 2 < hi - && (((a[i] == 0xE0) && (0xA0 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) - || ((0xE1 <= a[i] <= 0xEC) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) - || ((a[i] == 0xED) && (0x80 <= a[i + 1] <= 0x9F) && (0x80 <= a[i + 2] <= 0xBF)) - || ((0xEE <= a[i] <= 0xEF) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF))) - { - assert Uses3Bytes(a[i..hi]); - i := i + 3; - } else if - && i + 3 < hi - && (((a[i] == 0xF0) && (0x90 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) - || ((0xF1 <= a[i] <= 0xF3) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) - || ((a[i] == 0xF4) && (0x80 <= a[i + 1] <= 0x8F) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF))) - { - assert Uses4Bytes(a[i..hi]); - i := i + 4; - } else { - assert i < hi; - return false; - } - } - - return true; - } - - predicate BoundedValidUTF8Range(a: seq64, lo: uint64, hi: uint64) - requires lo <= hi <= |a| as uint64 - decreases hi - lo - { - ValidUTF8Range(a, lo as nat, hi as nat) - } by method { - if lo == hi { - assert ValidUTF8Range(a, lo as nat, hi as nat); - return true; - } - - var i := lo; - - while i < hi - invariant lo <= i <= hi - invariant ValidUTF8Range(a, lo as nat, hi as nat) == ValidUTF8Range(a, i as nat, hi as nat) - decreases hi - i - { - if - && i < hi - && 0x00 <= a[i] <= 0x7F - { - assert Uses1Byte(a[i..hi]); - i := i + 1; - } else if - && i < hi - 1 - && (0xC2 <= a[i] <= 0xDF) - && (0x80 <= a[i+1] <= 0xBF) - { - assert Uses2Bytes(a[i..hi]); - i := i + 2; - } else if - && 2 <= hi - && i < hi - 2 - && (((a[i] == 0xE0) && (0xA0 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) - || ((0xE1 <= a[i] <= 0xEC) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) - || ((a[i] == 0xED) && (0x80 <= a[i + 1] <= 0x9F) && (0x80 <= a[i + 2] <= 0xBF)) - || ((0xEE <= a[i] <= 0xEF) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF))) - { - assert Uses3Bytes(a[i..hi]); - i := i + 3; - } else if - && 3 <= hi - && i < hi - 3 - && (((a[i] == 0xF0) && (0x90 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) - || ((0xF1 <= a[i] <= 0xF3) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) - || ((a[i] == 0xF4) && (0x80 <= a[i + 1] <= 0x8F) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF))) - { - assert Uses4Bytes(a[i..hi]); - i := i + 4; - } else { - return false; - } - } - - return true; } lemma ValidUTF8Embed(a: seq, b: seq, c: seq, lo: nat, hi: nat) @@ -330,17 +208,4 @@ module {:extern "UTF8"} UTF8 { assert s + t == s + t + [] && lo == |s|; } } - - lemma IsASCIIBytesIsValidUTF8(s: seq) - requires forall i | 0 <= i < |s| :: Uses1Byte([s[i]]) - ensures ValidUTF8Seq(s) - { - if |s| == 0 { - } else { - IsASCIIBytesIsValidUTF8(s[1..]); - assert ValidUTF8Seq(s[..1]); - ValidUTF8Concat(s[..1], s[1..]); - assert s[..1] + s[1..] == s; - } - } } diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy index 6420f5bba0..ee1a10954f 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy @@ -26,15 +26,6 @@ module {:options "-functionSyntax:4"} TestManifests { import MplManifestOptions import CompleteVectors import Time - import OsLang - - function LogFileName() : string - { - if OsLang.GetOsShort() == "Windows" && OsLang.GetLanguageShort() == "Dotnet" then - "..\\..\\PerfLog.txt" - else - "../../PerfLog.txt" - } method StartEncrypt(op: MplManifestOptions.ManifestOptions) returns (output: Result<(), string>) @@ -69,7 +60,6 @@ module {:options "-functionSyntax:4"} TestManifests { var decryptableTests: seq<(TestVectors.EncryptTest, Types.EncryptionMaterials)> := []; - var time := Time.GetAbsoluteTime(); for i := 0 to |tests| invariant forall t <- tests :: t.cmm.ValidState() { @@ -82,8 +72,6 @@ module {:options "-functionSyntax:4"} TestManifests { hasFailure := true; } } - var elapsed :=Time.TimeSince(time); - Time.PrintTimeLong(elapsed, "TestEncrypts", Some(LogFileName())); print "\n=================== Completed ", |tests|, " Encrypt Tests =================== \n\n"; @@ -118,7 +106,6 @@ module {:options "-functionSyntax:4"} TestManifests { var hasFailure := false; - var time := Time.GetAbsoluteTime(); for i := 0 to |tests| invariant forall t <- tests :: t.cmm.ValidState() { @@ -127,8 +114,6 @@ module {:options "-functionSyntax:4"} TestManifests { hasFailure := true; } } - var elapsed := Time.TimeSince(time); - Time.PrintTimeLong(elapsed, "TestDecrypts", Some(LogFileName())); print "\n=================== Completed ", |tests|, " Decrypt Tests =================== \n\n"; expect !hasFailure; diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go index b48b571b7a..c0f7bdb4ce 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go @@ -726,7 +726,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextCMM_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := awscryptographymaterialproviderssmithygenerated.Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -738,7 +738,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_MultiKeyring_childKeyrings_ToDafny(input []awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProvidersTestVectorKeys_KeyDescriptionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -869,14 +869,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -976,14 +976,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go index 355ea9b522..f761006f29 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go @@ -867,15 +867,18 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionOutput_keyDescription_FromDafny(input interface{}) awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription { @@ -1038,15 +1041,18 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp } func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_KeyVectorException_message_FromDafny(input interface{}) string { diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go index b48b571b7a..c0f7bdb4ce 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go @@ -726,7 +726,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextCMM_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := awscryptographymaterialproviderssmithygenerated.Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -738,7 +738,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_MultiKeyring_childKeyrings_ToDafny(input []awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0, len(input)) + var fieldValue []interface{} = make([]interface{}, 0) for _, val := range input { element := Aws_cryptography_materialProvidersTestVectorKeys_KeyDescriptionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -869,14 +869,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } @@ -976,14 +976,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - v := make([]interface{}, 0, len(input)) + var v []interface{} if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqFromArray(v, false) + return dafny.SeqOf(v...) }() } diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go index 355ea9b522..f761006f29 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go @@ -867,15 +867,18 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionOutput_keyDescription_FromDafny(input interface{}) awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription { @@ -1038,15 +1041,18 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp } func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_FromDafny(input interface{}) []byte { return func() []byte { + b := []byte{} if input == nil { return nil } - a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) - b := make([]byte, 0, a.Length()) - for i := uint32(0); i < a.Length(); i++ { - b = append(b, a.Select(i).(byte)) + for i := dafny.Iterate(input); ; { + val, ok := i() + if !ok { + return b + } else { + b = append(b, val.(byte)) + } } - return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_KeyVectorException_message_FromDafny(input interface{}) string { From c5be0435180cfc2d06ec13499132e3f4549b808d Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 9 Apr 2025 16:35:17 -0700 Subject: [PATCH 05/48] m --- .../AwsCryptographyMaterialProvidersTypes.dfy | 2 +- .../src/CMCs/StormTrackingCMC.dfy | 2 +- .../src/CMCs/SynchronizedLocalCMC.dfy | 2 +- .../src/Index.dfy | 2 +- .../Model/AwsCryptographyKeyStoreTypes.dfy | 2 +- .../AwsCryptographyKeyStore/src/Index.dfy | 2 +- .../internaldafny/generated/dafny_src-py.dtr | 46 +++++++++---------- .../Model/AwsCryptographyPrimitivesTypes.dfy | 2 +- AwsCryptographyPrimitives/src/Index.dfy | 2 +- .../Model/ComAmazonawsDynamodbTypes.dfy | 2 +- ComAmazonawsDynamodb/src/Index.dfy | 2 +- .../Model/ComAmazonawsKmsTypes.dfy | 2 +- ComAmazonawsKms/src/Index.dfy | 2 +- smithy-dafny | 2 +- 14 files changed, 36 insertions(+), 36 deletions(-) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy index 99aa830690..af51e21e8b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy @@ -6,7 +6,7 @@ include "../../AwsCryptographyKeyStore/src/Index.dfy" include "../../../../AwsCryptographyPrimitives/src/Index.dfy" include "../../../../ComAmazonawsDynamodb/src/Index.dfy" include "../../../../ComAmazonawsKms/src/Index.dfy" -module AwsCryptographyMaterialProvidersTypes +module {:extern "software.amazon.cryptography.materialproviders.internaldafny.types" } AwsCryptographyMaterialProvidersTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy index a3a344afad..815b7b367e 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTrackingCMC.dfy @@ -3,7 +3,7 @@ include "StormTracker.dfy" -module {:options "/functionSyntax:4" } StormTrackingCMC { +module {:options "/functionSyntax:4" } {:extern "software.amazon.cryptography.internaldafny.StormTrackingCMC" } StormTrackingCMC { import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes import StormTracker diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy index b06110aac3..2c0b873941 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/SynchronizedLocalCMC.dfy @@ -3,7 +3,7 @@ include "LocalCMC.dfy" -module {:options "/functionSyntax:4" } SynchronizedLocalCMC { +module {:options "/functionSyntax:4" } {:extern "software.amazon.cryptography.internaldafny.SynchronizedLocalCMC" } SynchronizedLocalCMC { import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes import LocalCMC diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy index abd4da4432..12517b8fb9 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Index.dfy @@ -3,7 +3,7 @@ include "AwsCryptographyMaterialProvidersOperations.dfy" -module MaterialProviders refines AbstractAwsCryptographyMaterialProvidersService +module {:extern "software.amazon.cryptography.materialproviders.internaldafny" } MaterialProviders refines AbstractAwsCryptographyMaterialProvidersService { import Operations = AwsCryptographyMaterialProvidersOperations diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy index 5c22df60d8..a371045798 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy @@ -4,7 +4,7 @@ include "../../../../StandardLibrary/src/Index.dfy" include "../../../../ComAmazonawsDynamodb/src/Index.dfy" include "../../../../ComAmazonawsKms/src/Index.dfy" -module AwsCryptographyKeyStoreTypes +module {:extern "software.amazon.cryptography.keystore.internaldafny.types" } AwsCryptographyKeyStoreTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy index 51d2e53063..550b8c9be1 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Index.dfy @@ -6,7 +6,7 @@ include "AwsCryptographyKeyStoreOperations.dfy" include "ErrorMessages.dfy" include "KmsArn.dfy" -module KeyStore refines AbstractAwsCryptographyKeyStoreService +module {:extern "software.amazon.cryptography.keystore.internaldafny"} KeyStore refines AbstractAwsCryptographyKeyStoreService { import opened AwsKmsUtils import Operations = AwsCryptographyKeyStoreOperations diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr index 4ff8791824..13809cd289 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr @@ -66,12 +66,21 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.Keyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.CanonicalEncryptionContext] +[options_by_module.MultiKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.AwsKmsMrkAreUnique] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.Constants] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.MaterialWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.CanonicalEncryptionContext] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.IntermediateKeyWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" @@ -81,28 +90,28 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.ErrorMessages] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawAESKeyring] +[options_by_module.AwsKmsKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.Constants] +[options_by_module.StrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.EcdhEdkWrapping] +[options_by_module.AwsKmsDiscoveryKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawECDHKeyring] +[options_by_module.DiscoveryMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawRSAKeyring] +[options_by_module.AwsKmsMrkDiscoveryKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsKeyring] +[options_by_module.MrkAwareDiscoveryMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsDiscoveryKeyring] +[options_by_module.AwsKmsMrkKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsEcdhKeyring] +[options_by_module.MrkAwareStrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.LocalCMC] @@ -123,31 +132,22 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.AwsKmsHierarchicalKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkDiscoveryKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.AwsKmsRsaKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MultiKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkAreUnique] +[options_by_module.EcdhEdkWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.StrictMultiKeyring] +[options_by_module.RawECDHKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.DiscoveryMultiKeyring] +[options_by_module.AwsKmsEcdhKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareDiscoveryMultiKeyring] +[options_by_module.RawAESKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareStrictMultiKeyring] +[options_by_module.RawRSAKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.CMM] diff --git a/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy b/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy index bd55999181..7714244df6 100644 --- a/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy +++ b/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. include "../../StandardLibrary/src/Index.dfy" -module AwsCryptographyPrimitivesTypes +module {:extern "software.amazon.cryptography.primitives.internaldafny.types" } AwsCryptographyPrimitivesTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/AwsCryptographyPrimitives/src/Index.dfy b/AwsCryptographyPrimitives/src/Index.dfy index a0fecaabef..0e49b31506 100644 --- a/AwsCryptographyPrimitives/src/Index.dfy +++ b/AwsCryptographyPrimitives/src/Index.dfy @@ -4,7 +4,7 @@ include "../Model/AwsCryptographyPrimitivesTypes.dfy" include "AwsCryptographyPrimitivesOperations.dfy" -module AtomicPrimitives refines AbstractAwsCryptographyPrimitivesService { +module {:extern "software.amazon.cryptography.primitives.internaldafny" } AtomicPrimitives refines AbstractAwsCryptographyPrimitivesService { import Operations = AwsCryptographyPrimitivesOperations function method DefaultCryptoConfig(): CryptoConfig { diff --git a/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy b/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy index 352d376600..b5c3c9fe41 100644 --- a/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy +++ b/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. include "../../StandardLibrary/src/Index.dfy" -module ComAmazonawsDynamodbTypes +module {:extern "software.amazon.cryptography.services.dynamodb.internaldafny.types" } ComAmazonawsDynamodbTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/ComAmazonawsDynamodb/src/Index.dfy b/ComAmazonawsDynamodb/src/Index.dfy index 80e72e1918..d030b2f3cb 100644 --- a/ComAmazonawsDynamodb/src/Index.dfy +++ b/ComAmazonawsDynamodb/src/Index.dfy @@ -3,7 +3,7 @@ include "../Model/ComAmazonawsDynamodbTypes.dfy" -module Com.Amazonaws.Dynamodb refines AbstractComAmazonawsDynamodbService { +module {:extern "software.amazon.cryptography.services.dynamodb.internaldafny"} Com.Amazonaws.Dynamodb refines AbstractComAmazonawsDynamodbService { function method DefaultDynamoDBClientConfigType() : DynamoDBClientConfigType { DynamoDBClientConfigType diff --git a/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy b/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy index 3607d7d4a0..ff5520a289 100644 --- a/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy +++ b/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. include "../../StandardLibrary/src/Index.dfy" -module ComAmazonawsKmsTypes +module {:extern "software.amazon.cryptography.services.kms.internaldafny.types" } ComAmazonawsKmsTypes { import opened Wrappers import opened StandardLibrary.UInt diff --git a/ComAmazonawsKms/src/Index.dfy b/ComAmazonawsKms/src/Index.dfy index 6f703942e5..be29bf3797 100644 --- a/ComAmazonawsKms/src/Index.dfy +++ b/ComAmazonawsKms/src/Index.dfy @@ -3,7 +3,7 @@ include "../Model/ComAmazonawsKmsTypes.dfy" -module Com.Amazonaws.Kms refines AbstractComAmazonawsKmsService { +module {:extern "software.amazon.cryptography.services.kms.internaldafny"} Com.Amazonaws.Kms refines AbstractComAmazonawsKmsService { function method DefaultKMSClientConfigType() : KMSClientConfigType { KMSClientConfigType diff --git a/smithy-dafny b/smithy-dafny index 5fb3f25ea3..8d3d04ec52 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit 5fb3f25ea3444c51b2ad30b25ab03964cf866cd1 +Subproject commit 8d3d04ec525afbeee8daffd95c73b929e5a938ee From ba790dd22c95c0405b582fac0c74ede3dee150b4 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 15 Apr 2025 09:39:35 -0700 Subject: [PATCH 06/48] m --- .../CreateAwsKmsHierarchicalKeyringInput.java | 22 +- .../materialproviders/model/DefaultCache.java | 24 +- .../model/GetCacheEntryOutput.java | 88 +- .../materialproviders/model/HKDF.java | 76 +- .../model/MultiThreadedCache.java | 47 +- .../model/PutCacheEntryInput.java | 84 +- .../model/SingleThreadedCache.java | 47 +- .../model/StormTrackingCache.java | 157 +- .../model/UpdateUsageMetadataInput.java | 22 +- .../TypeConversion.cs | 540 ++--- .../AwsCryptographyKeyStore/TypeConversion.cs | 78 +- .../aws_cryptography_keystore/client.py | 6 +- .../aws_cryptography_keystore/config.py | 4 +- .../aws_cryptography_keystore/models.py | 16 +- .../client.py | 6 +- .../models.py | 4 +- .../primitives/model/AES_CTR.java | 50 +- .../primitives/model/AES_GCM.java | 74 +- .../primitives/model/AesKdfCtrInput.java | 22 +- .../model/GenerateRSAKeyPairInput.java | 26 +- .../model/GenerateRandomBytesInput.java | 24 +- .../model/GetRSAKeyModulusLengthOutput.java | 24 +- .../primitives/model/HkdfExpandInput.java | 22 +- .../primitives/model/HkdfInput.java | 22 +- .../primitives/model/KdfCtrInput.java | 22 +- .../primitives/model/RSAPrivateKey.java | 22 +- .../primitives/model/RSAPublicKey.java | 22 +- .../net/Generated/AtomicPrimitives.cs | 2 +- .../runtimes/net/Generated/TypeConversion.cs | 266 +-- .../aws_cryptography_primitives/client.py | 6 +- .../runtimes/net/Generated/TypeConversion.cs | 1836 ++++++++--------- .../aws_sdk_format_converter.py | 87 +- .../runtimes/net/Generated/TypeConversion.cs | 872 ++++---- .../client.py | 6 +- .../models.py | 4 +- 35 files changed, 2284 insertions(+), 2346 deletions(-) diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java index da972fa977..e9601e5561 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java @@ -31,7 +31,7 @@ public class CreateAwsKmsHierarchicalKeyringInput { /** * How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - private final long ttlSeconds; + private final Long ttlSeconds; /** * Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. @@ -76,7 +76,7 @@ public KeyStore keyStore() { /** * @return How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - public long ttlSeconds() { + public Long ttlSeconds() { return this.ttlSeconds; } @@ -136,12 +136,12 @@ public interface Builder { /** * @param ttlSeconds How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - Builder ttlSeconds(long ttlSeconds); + Builder ttlSeconds(Long ttlSeconds); /** * @return How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - long ttlSeconds(); + Long ttlSeconds(); /** * @param cache Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. @@ -174,9 +174,7 @@ static class BuilderImpl implements Builder { protected KeyStore keyStore; - protected long ttlSeconds; - - private boolean _ttlSecondsSet = false; + protected Long ttlSeconds; protected CacheType cache; @@ -189,7 +187,6 @@ protected BuilderImpl(CreateAwsKmsHierarchicalKeyringInput model) { this.branchKeyIdSupplier = model.branchKeyIdSupplier(); this.keyStore = model.keyStore(); this.ttlSeconds = model.ttlSeconds(); - this._ttlSecondsSet = true; this.cache = model.cache(); this.partitionId = model.partitionId(); } @@ -223,13 +220,12 @@ public KeyStore keyStore() { return this.keyStore; } - public Builder ttlSeconds(long ttlSeconds) { + public Builder ttlSeconds(Long ttlSeconds) { this.ttlSeconds = ttlSeconds; - this._ttlSecondsSet = true; return this; } - public long ttlSeconds() { + public Long ttlSeconds() { return this.ttlSeconds; } @@ -257,12 +253,12 @@ public CreateAwsKmsHierarchicalKeyringInput build() { "Missing value for required field `keyStore`" ); } - if (!this._ttlSecondsSet) { + if (Objects.isNull(this.ttlSeconds())) { throw new IllegalArgumentException( "Missing value for required field `ttlSeconds`" ); } - if (this._ttlSecondsSet && this.ttlSeconds() < 0) { + if (Objects.nonNull(this.ttlSeconds()) && this.ttlSeconds() < 0) { throw new IllegalArgumentException( "`ttlSeconds` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java index fda8b217cf..844d26eab3 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java @@ -3,6 +3,8 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; +import java.util.Objects; + /** * The best choice for most situations. Probably a StormTrackingCache. */ @@ -11,7 +13,7 @@ public class DefaultCache { /** * Maximum number of entries cached. */ - private final int entryCapacity; + private final Integer entryCapacity; protected DefaultCache(BuilderImpl builder) { this.entryCapacity = builder.entryCapacity(); @@ -20,7 +22,7 @@ protected DefaultCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } @@ -36,46 +38,42 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(int entryCapacity); + Builder entryCapacity(Integer entryCapacity); /** * @return Maximum number of entries cached. */ - int entryCapacity(); + Integer entryCapacity(); DefaultCache build(); } static class BuilderImpl implements Builder { - protected int entryCapacity; - - private boolean _entryCapacitySet = false; + protected Integer entryCapacity; protected BuilderImpl() {} protected BuilderImpl(DefaultCache model) { this.entryCapacity = model.entryCapacity(); - this._entryCapacitySet = true; } - public Builder entryCapacity(int entryCapacity) { + public Builder entryCapacity(Integer entryCapacity) { this.entryCapacity = entryCapacity; - this._entryCapacitySet = true; return this; } - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } public DefaultCache build() { - if (!this._entryCapacitySet) { + if (Objects.isNull(this.entryCapacity())) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (this._entryCapacitySet && this.entryCapacity() < 1) { + if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java index 98f90d6070..d4d4b7f5ec 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java @@ -9,13 +9,13 @@ public class GetCacheEntryOutput { private final Materials materials; - private final long creationTime; + private final Long creationTime; - private final long expiryTime; + private final Long expiryTime; - private final int messagesUsed; + private final Integer messagesUsed; - private final int bytesUsed; + private final Integer bytesUsed; protected GetCacheEntryOutput(BuilderImpl builder) { this.materials = builder.materials(); @@ -29,19 +29,19 @@ public Materials materials() { return this.materials; } - public long creationTime() { + public Long creationTime() { return this.creationTime; } - public long expiryTime() { + public Long expiryTime() { return this.expiryTime; } - public int messagesUsed() { + public Integer messagesUsed() { return this.messagesUsed; } - public int bytesUsed() { + public Integer bytesUsed() { return this.bytesUsed; } @@ -58,21 +58,21 @@ public interface Builder { Materials materials(); - Builder creationTime(long creationTime); + Builder creationTime(Long creationTime); - long creationTime(); + Long creationTime(); - Builder expiryTime(long expiryTime); + Builder expiryTime(Long expiryTime); - long expiryTime(); + Long expiryTime(); - Builder messagesUsed(int messagesUsed); + Builder messagesUsed(Integer messagesUsed); - int messagesUsed(); + Integer messagesUsed(); - Builder bytesUsed(int bytesUsed); + Builder bytesUsed(Integer bytesUsed); - int bytesUsed(); + Integer bytesUsed(); GetCacheEntryOutput build(); } @@ -81,34 +81,22 @@ static class BuilderImpl implements Builder { protected Materials materials; - protected long creationTime; + protected Long creationTime; - private boolean _creationTimeSet = false; + protected Long expiryTime; - protected long expiryTime; + protected Integer messagesUsed; - private boolean _expiryTimeSet = false; - - protected int messagesUsed; - - private boolean _messagesUsedSet = false; - - protected int bytesUsed; - - private boolean _bytesUsedSet = false; + protected Integer bytesUsed; protected BuilderImpl() {} protected BuilderImpl(GetCacheEntryOutput model) { this.materials = model.materials(); this.creationTime = model.creationTime(); - this._creationTimeSet = true; this.expiryTime = model.expiryTime(); - this._expiryTimeSet = true; this.messagesUsed = model.messagesUsed(); - this._messagesUsedSet = true; this.bytesUsed = model.bytesUsed(); - this._bytesUsedSet = true; } public Builder materials(Materials materials) { @@ -120,43 +108,39 @@ public Materials materials() { return this.materials; } - public Builder creationTime(long creationTime) { + public Builder creationTime(Long creationTime) { this.creationTime = creationTime; - this._creationTimeSet = true; return this; } - public long creationTime() { + public Long creationTime() { return this.creationTime; } - public Builder expiryTime(long expiryTime) { + public Builder expiryTime(Long expiryTime) { this.expiryTime = expiryTime; - this._expiryTimeSet = true; return this; } - public long expiryTime() { + public Long expiryTime() { return this.expiryTime; } - public Builder messagesUsed(int messagesUsed) { + public Builder messagesUsed(Integer messagesUsed) { this.messagesUsed = messagesUsed; - this._messagesUsedSet = true; return this; } - public int messagesUsed() { + public Integer messagesUsed() { return this.messagesUsed; } - public Builder bytesUsed(int bytesUsed) { + public Builder bytesUsed(Integer bytesUsed) { this.bytesUsed = bytesUsed; - this._bytesUsedSet = true; return this; } - public int bytesUsed() { + public Integer bytesUsed() { return this.bytesUsed; } @@ -166,42 +150,42 @@ public GetCacheEntryOutput build() { "Missing value for required field `materials`" ); } - if (!this._creationTimeSet) { + if (Objects.isNull(this.creationTime())) { throw new IllegalArgumentException( "Missing value for required field `creationTime`" ); } - if (this._creationTimeSet && this.creationTime() < 0) { + if (Objects.nonNull(this.creationTime()) && this.creationTime() < 0) { throw new IllegalArgumentException( "`creationTime` must be greater than or equal to 0" ); } - if (!this._expiryTimeSet) { + if (Objects.isNull(this.expiryTime())) { throw new IllegalArgumentException( "Missing value for required field `expiryTime`" ); } - if (this._expiryTimeSet && this.expiryTime() < 0) { + if (Objects.nonNull(this.expiryTime()) && this.expiryTime() < 0) { throw new IllegalArgumentException( "`expiryTime` must be greater than or equal to 0" ); } - if (!this._messagesUsedSet) { + if (Objects.isNull(this.messagesUsed())) { throw new IllegalArgumentException( "Missing value for required field `messagesUsed`" ); } - if (this._messagesUsedSet && this.messagesUsed() < 0) { + if (Objects.nonNull(this.messagesUsed()) && this.messagesUsed() < 0) { throw new IllegalArgumentException( "`messagesUsed` must be greater than or equal to 0" ); } - if (!this._bytesUsedSet) { + if (Objects.isNull(this.bytesUsed())) { throw new IllegalArgumentException( "Missing value for required field `bytesUsed`" ); } - if (this._bytesUsedSet && this.bytesUsed() < 0) { + if (Objects.nonNull(this.bytesUsed()) && this.bytesUsed() < 0) { throw new IllegalArgumentException( "`bytesUsed` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java index 65b935b09d..0038e98d62 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java @@ -10,11 +10,11 @@ public class HKDF { private final DigestAlgorithm hmac; - private final int saltLength; + private final Integer saltLength; - private final int inputKeyLength; + private final Integer inputKeyLength; - private final int outputKeyLength; + private final Integer outputKeyLength; protected HKDF(BuilderImpl builder) { this.hmac = builder.hmac(); @@ -27,15 +27,15 @@ public DigestAlgorithm hmac() { return this.hmac; } - public int saltLength() { + public Integer saltLength() { return this.saltLength; } - public int inputKeyLength() { + public Integer inputKeyLength() { return this.inputKeyLength; } - public int outputKeyLength() { + public Integer outputKeyLength() { return this.outputKeyLength; } @@ -52,17 +52,17 @@ public interface Builder { DigestAlgorithm hmac(); - Builder saltLength(int saltLength); + Builder saltLength(Integer saltLength); - int saltLength(); + Integer saltLength(); - Builder inputKeyLength(int inputKeyLength); + Builder inputKeyLength(Integer inputKeyLength); - int inputKeyLength(); + Integer inputKeyLength(); - Builder outputKeyLength(int outputKeyLength); + Builder outputKeyLength(Integer outputKeyLength); - int outputKeyLength(); + Integer outputKeyLength(); HKDF build(); } @@ -71,28 +71,19 @@ static class BuilderImpl implements Builder { protected DigestAlgorithm hmac; - protected int saltLength; + protected Integer saltLength; - private boolean _saltLengthSet = false; + protected Integer inputKeyLength; - protected int inputKeyLength; - - private boolean _inputKeyLengthSet = false; - - protected int outputKeyLength; - - private boolean _outputKeyLengthSet = false; + protected Integer outputKeyLength; protected BuilderImpl() {} protected BuilderImpl(HKDF model) { this.hmac = model.hmac(); this.saltLength = model.saltLength(); - this._saltLengthSet = true; this.inputKeyLength = model.inputKeyLength(); - this._inputKeyLengthSet = true; this.outputKeyLength = model.outputKeyLength(); - this._outputKeyLengthSet = true; } public Builder hmac(DigestAlgorithm hmac) { @@ -104,33 +95,30 @@ public DigestAlgorithm hmac() { return this.hmac; } - public Builder saltLength(int saltLength) { + public Builder saltLength(Integer saltLength) { this.saltLength = saltLength; - this._saltLengthSet = true; return this; } - public int saltLength() { + public Integer saltLength() { return this.saltLength; } - public Builder inputKeyLength(int inputKeyLength) { + public Builder inputKeyLength(Integer inputKeyLength) { this.inputKeyLength = inputKeyLength; - this._inputKeyLengthSet = true; return this; } - public int inputKeyLength() { + public Integer inputKeyLength() { return this.inputKeyLength; } - public Builder outputKeyLength(int outputKeyLength) { + public Builder outputKeyLength(Integer outputKeyLength) { this.outputKeyLength = outputKeyLength; - this._outputKeyLengthSet = true; return this; } - public int outputKeyLength() { + public Integer outputKeyLength() { return this.outputKeyLength; } @@ -140,42 +128,48 @@ public HKDF build() { "Missing value for required field `hmac`" ); } - if (!this._saltLengthSet) { + if (Objects.isNull(this.saltLength())) { throw new IllegalArgumentException( "Missing value for required field `saltLength`" ); } - if (this._saltLengthSet && this.saltLength() < 0) { + if (Objects.nonNull(this.saltLength()) && this.saltLength() < 0) { throw new IllegalArgumentException( "`saltLength` must be greater than or equal to 0" ); } - if (!this._inputKeyLengthSet) { + if (Objects.isNull(this.inputKeyLength())) { throw new IllegalArgumentException( "Missing value for required field `inputKeyLength`" ); } - if (this._inputKeyLengthSet && this.inputKeyLength() < 1) { + if (Objects.nonNull(this.inputKeyLength()) && this.inputKeyLength() < 1) { throw new IllegalArgumentException( "`inputKeyLength` must be greater than or equal to 1" ); } - if (this._inputKeyLengthSet && this.inputKeyLength() > 32) { + if ( + Objects.nonNull(this.inputKeyLength()) && this.inputKeyLength() > 32 + ) { throw new IllegalArgumentException( "`inputKeyLength` must be less than or equal to 32." ); } - if (!this._outputKeyLengthSet) { + if (Objects.isNull(this.outputKeyLength())) { throw new IllegalArgumentException( "Missing value for required field `outputKeyLength`" ); } - if (this._outputKeyLengthSet && this.outputKeyLength() < 1) { + if ( + Objects.nonNull(this.outputKeyLength()) && this.outputKeyLength() < 1 + ) { throw new IllegalArgumentException( "`outputKeyLength` must be greater than or equal to 1" ); } - if (this._outputKeyLengthSet && this.outputKeyLength() > 32) { + if ( + Objects.nonNull(this.outputKeyLength()) && this.outputKeyLength() > 32 + ) { throw new IllegalArgumentException( "`outputKeyLength` must be less than or equal to 32." ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java index 79e146e5f6..742bd24824 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java @@ -3,6 +3,8 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; +import java.util.Objects; + /** * A cache that is safe for use in a multi threaded environment, but no extra functionality. */ @@ -11,12 +13,12 @@ public class MultiThreadedCache { /** * Maximum number of entries cached. */ - private final int entryCapacity; + private final Integer entryCapacity; /** * Number of entries to prune at a time. */ - private final int entryPruningTailSize; + private final Integer entryPruningTailSize; protected MultiThreadedCache(BuilderImpl builder) { this.entryCapacity = builder.entryCapacity(); @@ -26,14 +28,14 @@ protected MultiThreadedCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } /** * @return Number of entries to prune at a time. */ - public int entryPruningTailSize() { + public Integer entryPruningTailSize() { return this.entryPruningTailSize; } @@ -49,77 +51,72 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(int entryCapacity); + Builder entryCapacity(Integer entryCapacity); /** * @return Maximum number of entries cached. */ - int entryCapacity(); + Integer entryCapacity(); /** * @param entryPruningTailSize Number of entries to prune at a time. */ - Builder entryPruningTailSize(int entryPruningTailSize); + Builder entryPruningTailSize(Integer entryPruningTailSize); /** * @return Number of entries to prune at a time. */ - int entryPruningTailSize(); + Integer entryPruningTailSize(); MultiThreadedCache build(); } static class BuilderImpl implements Builder { - protected int entryCapacity; - - private boolean _entryCapacitySet = false; - - protected int entryPruningTailSize; + protected Integer entryCapacity; - private boolean _entryPruningTailSizeSet = false; + protected Integer entryPruningTailSize; protected BuilderImpl() {} protected BuilderImpl(MultiThreadedCache model) { this.entryCapacity = model.entryCapacity(); - this._entryCapacitySet = true; this.entryPruningTailSize = model.entryPruningTailSize(); - this._entryPruningTailSizeSet = true; } - public Builder entryCapacity(int entryCapacity) { + public Builder entryCapacity(Integer entryCapacity) { this.entryCapacity = entryCapacity; - this._entryCapacitySet = true; return this; } - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } - public Builder entryPruningTailSize(int entryPruningTailSize) { + public Builder entryPruningTailSize(Integer entryPruningTailSize) { this.entryPruningTailSize = entryPruningTailSize; - this._entryPruningTailSizeSet = true; return this; } - public int entryPruningTailSize() { + public Integer entryPruningTailSize() { return this.entryPruningTailSize; } public MultiThreadedCache build() { - if (!this._entryCapacitySet) { + if (Objects.isNull(this.entryCapacity())) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (this._entryCapacitySet && this.entryCapacity() < 1) { + if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); } - if (this._entryPruningTailSizeSet && this.entryPruningTailSize() < 1) { + if ( + Objects.nonNull(this.entryPruningTailSize()) && + this.entryPruningTailSize() < 1 + ) { throw new IllegalArgumentException( "`entryPruningTailSize` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java index cdc22c12d1..cdcf808ea2 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java @@ -12,13 +12,13 @@ public class PutCacheEntryInput { private final Materials materials; - private final long creationTime; + private final Long creationTime; - private final long expiryTime; + private final Long expiryTime; - private final int messagesUsed; + private final Integer messagesUsed; - private final int bytesUsed; + private final Integer bytesUsed; protected PutCacheEntryInput(BuilderImpl builder) { this.identifier = builder.identifier(); @@ -37,19 +37,19 @@ public Materials materials() { return this.materials; } - public long creationTime() { + public Long creationTime() { return this.creationTime; } - public long expiryTime() { + public Long expiryTime() { return this.expiryTime; } - public int messagesUsed() { + public Integer messagesUsed() { return this.messagesUsed; } - public int bytesUsed() { + public Integer bytesUsed() { return this.bytesUsed; } @@ -70,21 +70,21 @@ public interface Builder { Materials materials(); - Builder creationTime(long creationTime); + Builder creationTime(Long creationTime); - long creationTime(); + Long creationTime(); - Builder expiryTime(long expiryTime); + Builder expiryTime(Long expiryTime); - long expiryTime(); + Long expiryTime(); - Builder messagesUsed(int messagesUsed); + Builder messagesUsed(Integer messagesUsed); - int messagesUsed(); + Integer messagesUsed(); - Builder bytesUsed(int bytesUsed); + Builder bytesUsed(Integer bytesUsed); - int bytesUsed(); + Integer bytesUsed(); PutCacheEntryInput build(); } @@ -95,21 +95,13 @@ static class BuilderImpl implements Builder { protected Materials materials; - protected long creationTime; + protected Long creationTime; - private boolean _creationTimeSet = false; + protected Long expiryTime; - protected long expiryTime; + protected Integer messagesUsed; - private boolean _expiryTimeSet = false; - - protected int messagesUsed; - - private boolean _messagesUsedSet = false; - - protected int bytesUsed; - - private boolean _bytesUsedSet = false; + protected Integer bytesUsed; protected BuilderImpl() {} @@ -117,13 +109,9 @@ protected BuilderImpl(PutCacheEntryInput model) { this.identifier = model.identifier(); this.materials = model.materials(); this.creationTime = model.creationTime(); - this._creationTimeSet = true; this.expiryTime = model.expiryTime(); - this._expiryTimeSet = true; this.messagesUsed = model.messagesUsed(); - this._messagesUsedSet = true; this.bytesUsed = model.bytesUsed(); - this._bytesUsedSet = true; } public Builder identifier(ByteBuffer identifier) { @@ -144,43 +132,39 @@ public Materials materials() { return this.materials; } - public Builder creationTime(long creationTime) { + public Builder creationTime(Long creationTime) { this.creationTime = creationTime; - this._creationTimeSet = true; return this; } - public long creationTime() { + public Long creationTime() { return this.creationTime; } - public Builder expiryTime(long expiryTime) { + public Builder expiryTime(Long expiryTime) { this.expiryTime = expiryTime; - this._expiryTimeSet = true; return this; } - public long expiryTime() { + public Long expiryTime() { return this.expiryTime; } - public Builder messagesUsed(int messagesUsed) { + public Builder messagesUsed(Integer messagesUsed) { this.messagesUsed = messagesUsed; - this._messagesUsedSet = true; return this; } - public int messagesUsed() { + public Integer messagesUsed() { return this.messagesUsed; } - public Builder bytesUsed(int bytesUsed) { + public Builder bytesUsed(Integer bytesUsed) { this.bytesUsed = bytesUsed; - this._bytesUsedSet = true; return this; } - public int bytesUsed() { + public Integer bytesUsed() { return this.bytesUsed; } @@ -195,32 +179,32 @@ public PutCacheEntryInput build() { "Missing value for required field `materials`" ); } - if (!this._creationTimeSet) { + if (Objects.isNull(this.creationTime())) { throw new IllegalArgumentException( "Missing value for required field `creationTime`" ); } - if (this._creationTimeSet && this.creationTime() < 0) { + if (Objects.nonNull(this.creationTime()) && this.creationTime() < 0) { throw new IllegalArgumentException( "`creationTime` must be greater than or equal to 0" ); } - if (!this._expiryTimeSet) { + if (Objects.isNull(this.expiryTime())) { throw new IllegalArgumentException( "Missing value for required field `expiryTime`" ); } - if (this._expiryTimeSet && this.expiryTime() < 0) { + if (Objects.nonNull(this.expiryTime()) && this.expiryTime() < 0) { throw new IllegalArgumentException( "`expiryTime` must be greater than or equal to 0" ); } - if (this._messagesUsedSet && this.messagesUsed() < 0) { + if (Objects.nonNull(this.messagesUsed()) && this.messagesUsed() < 0) { throw new IllegalArgumentException( "`messagesUsed` must be greater than or equal to 0" ); } - if (this._bytesUsedSet && this.bytesUsed() < 0) { + if (Objects.nonNull(this.bytesUsed()) && this.bytesUsed() < 0) { throw new IllegalArgumentException( "`bytesUsed` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java index 12b64bde31..614182944c 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java @@ -3,6 +3,8 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; +import java.util.Objects; + /** * A cache that is NOT safe for use in a multi threaded environment. */ @@ -11,12 +13,12 @@ public class SingleThreadedCache { /** * Maximum number of entries cached. */ - private final int entryCapacity; + private final Integer entryCapacity; /** * Number of entries to prune at a time. */ - private final int entryPruningTailSize; + private final Integer entryPruningTailSize; protected SingleThreadedCache(BuilderImpl builder) { this.entryCapacity = builder.entryCapacity(); @@ -26,14 +28,14 @@ protected SingleThreadedCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } /** * @return Number of entries to prune at a time. */ - public int entryPruningTailSize() { + public Integer entryPruningTailSize() { return this.entryPruningTailSize; } @@ -49,77 +51,72 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(int entryCapacity); + Builder entryCapacity(Integer entryCapacity); /** * @return Maximum number of entries cached. */ - int entryCapacity(); + Integer entryCapacity(); /** * @param entryPruningTailSize Number of entries to prune at a time. */ - Builder entryPruningTailSize(int entryPruningTailSize); + Builder entryPruningTailSize(Integer entryPruningTailSize); /** * @return Number of entries to prune at a time. */ - int entryPruningTailSize(); + Integer entryPruningTailSize(); SingleThreadedCache build(); } static class BuilderImpl implements Builder { - protected int entryCapacity; - - private boolean _entryCapacitySet = false; - - protected int entryPruningTailSize; + protected Integer entryCapacity; - private boolean _entryPruningTailSizeSet = false; + protected Integer entryPruningTailSize; protected BuilderImpl() {} protected BuilderImpl(SingleThreadedCache model) { this.entryCapacity = model.entryCapacity(); - this._entryCapacitySet = true; this.entryPruningTailSize = model.entryPruningTailSize(); - this._entryPruningTailSizeSet = true; } - public Builder entryCapacity(int entryCapacity) { + public Builder entryCapacity(Integer entryCapacity) { this.entryCapacity = entryCapacity; - this._entryCapacitySet = true; return this; } - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } - public Builder entryPruningTailSize(int entryPruningTailSize) { + public Builder entryPruningTailSize(Integer entryPruningTailSize) { this.entryPruningTailSize = entryPruningTailSize; - this._entryPruningTailSizeSet = true; return this; } - public int entryPruningTailSize() { + public Integer entryPruningTailSize() { return this.entryPruningTailSize; } public SingleThreadedCache build() { - if (!this._entryCapacitySet) { + if (Objects.isNull(this.entryCapacity())) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (this._entryCapacitySet && this.entryCapacity() < 1) { + if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); } - if (this._entryPruningTailSizeSet && this.entryPruningTailSize() < 1) { + if ( + Objects.nonNull(this.entryPruningTailSize()) && + this.entryPruningTailSize() < 1 + ) { throw new IllegalArgumentException( "`entryPruningTailSize` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java index 8f3835b439..f2227c785c 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java @@ -3,6 +3,8 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; +import java.util.Objects; + /** * A cache that is safe for use in a multi threaded environment, * and tries to prevent redundant or overly parallel backend calls. @@ -12,38 +14,38 @@ public class StormTrackingCache { /** * Maximum number of entries cached. */ - private final int entryCapacity; + private final Integer entryCapacity; /** * Number of entries to prune at a time. */ - private final int entryPruningTailSize; + private final Integer entryPruningTailSize; /** * How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - private final int gracePeriod; + private final Integer gracePeriod; /** * How much time between attempts to refresh the materials. */ - private final int graceInterval; + private final Integer graceInterval; /** * How many simultaneous attempts to refresh the materials. */ - private final int fanOut; + private final Integer fanOut; /** * How much time until an attempt to refresh the materials should be forgotten. */ - private final int inFlightTTL; + private final Integer inFlightTTL; /** * How many milliseconds should a thread sleep if fanOut is exceeded. */ - private final int sleepMilli; + private final Integer sleepMilli; /** * The time unit for gracePeriod, graceInterval, and inFlightTTL. @@ -66,14 +68,14 @@ protected StormTrackingCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } /** * @return Number of entries to prune at a time. */ - public int entryPruningTailSize() { + public Integer entryPruningTailSize() { return this.entryPruningTailSize; } @@ -81,35 +83,35 @@ public int entryPruningTailSize() { * @return How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - public int gracePeriod() { + public Integer gracePeriod() { return this.gracePeriod; } /** * @return How much time between attempts to refresh the materials. */ - public int graceInterval() { + public Integer graceInterval() { return this.graceInterval; } /** * @return How many simultaneous attempts to refresh the materials. */ - public int fanOut() { + public Integer fanOut() { return this.fanOut; } /** * @return How much time until an attempt to refresh the materials should be forgotten. */ - public int inFlightTTL() { + public Integer inFlightTTL() { return this.inFlightTTL; } /** * @return How many milliseconds should a thread sleep if fanOut is exceeded. */ - public int sleepMilli() { + public Integer sleepMilli() { return this.sleepMilli; } @@ -134,74 +136,74 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(int entryCapacity); + Builder entryCapacity(Integer entryCapacity); /** * @return Maximum number of entries cached. */ - int entryCapacity(); + Integer entryCapacity(); /** * @param entryPruningTailSize Number of entries to prune at a time. */ - Builder entryPruningTailSize(int entryPruningTailSize); + Builder entryPruningTailSize(Integer entryPruningTailSize); /** * @return Number of entries to prune at a time. */ - int entryPruningTailSize(); + Integer entryPruningTailSize(); /** * @param gracePeriod How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - Builder gracePeriod(int gracePeriod); + Builder gracePeriod(Integer gracePeriod); /** * @return How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - int gracePeriod(); + Integer gracePeriod(); /** * @param graceInterval How much time between attempts to refresh the materials. */ - Builder graceInterval(int graceInterval); + Builder graceInterval(Integer graceInterval); /** * @return How much time between attempts to refresh the materials. */ - int graceInterval(); + Integer graceInterval(); /** * @param fanOut How many simultaneous attempts to refresh the materials. */ - Builder fanOut(int fanOut); + Builder fanOut(Integer fanOut); /** * @return How many simultaneous attempts to refresh the materials. */ - int fanOut(); + Integer fanOut(); /** * @param inFlightTTL How much time until an attempt to refresh the materials should be forgotten. */ - Builder inFlightTTL(int inFlightTTL); + Builder inFlightTTL(Integer inFlightTTL); /** * @return How much time until an attempt to refresh the materials should be forgotten. */ - int inFlightTTL(); + Integer inFlightTTL(); /** * @param sleepMilli How many milliseconds should a thread sleep if fanOut is exceeded. */ - Builder sleepMilli(int sleepMilli); + Builder sleepMilli(Integer sleepMilli); /** * @return How many milliseconds should a thread sleep if fanOut is exceeded. */ - int sleepMilli(); + Integer sleepMilli(); /** * @param timeUnits The time unit for gracePeriod, graceInterval, and inFlightTTL. @@ -222,33 +224,19 @@ public interface Builder { static class BuilderImpl implements Builder { - protected int entryCapacity; - - private boolean _entryCapacitySet = false; - - protected int entryPruningTailSize; - - private boolean _entryPruningTailSizeSet = false; - - protected int gracePeriod; - - private boolean _gracePeriodSet = false; - - protected int graceInterval; - - private boolean _graceIntervalSet = false; + protected Integer entryCapacity; - protected int fanOut; + protected Integer entryPruningTailSize; - private boolean _fanOutSet = false; + protected Integer gracePeriod; - protected int inFlightTTL; + protected Integer graceInterval; - private boolean _inFlightTTLSet = false; + protected Integer fanOut; - protected int sleepMilli; + protected Integer inFlightTTL; - private boolean _sleepMilliSet = false; + protected Integer sleepMilli; protected TimeUnits timeUnits; @@ -256,89 +244,75 @@ protected BuilderImpl() {} protected BuilderImpl(StormTrackingCache model) { this.entryCapacity = model.entryCapacity(); - this._entryCapacitySet = true; this.entryPruningTailSize = model.entryPruningTailSize(); - this._entryPruningTailSizeSet = true; this.gracePeriod = model.gracePeriod(); - this._gracePeriodSet = true; this.graceInterval = model.graceInterval(); - this._graceIntervalSet = true; this.fanOut = model.fanOut(); - this._fanOutSet = true; this.inFlightTTL = model.inFlightTTL(); - this._inFlightTTLSet = true; this.sleepMilli = model.sleepMilli(); - this._sleepMilliSet = true; this.timeUnits = model.timeUnits(); } - public Builder entryCapacity(int entryCapacity) { + public Builder entryCapacity(Integer entryCapacity) { this.entryCapacity = entryCapacity; - this._entryCapacitySet = true; return this; } - public int entryCapacity() { + public Integer entryCapacity() { return this.entryCapacity; } - public Builder entryPruningTailSize(int entryPruningTailSize) { + public Builder entryPruningTailSize(Integer entryPruningTailSize) { this.entryPruningTailSize = entryPruningTailSize; - this._entryPruningTailSizeSet = true; return this; } - public int entryPruningTailSize() { + public Integer entryPruningTailSize() { return this.entryPruningTailSize; } - public Builder gracePeriod(int gracePeriod) { + public Builder gracePeriod(Integer gracePeriod) { this.gracePeriod = gracePeriod; - this._gracePeriodSet = true; return this; } - public int gracePeriod() { + public Integer gracePeriod() { return this.gracePeriod; } - public Builder graceInterval(int graceInterval) { + public Builder graceInterval(Integer graceInterval) { this.graceInterval = graceInterval; - this._graceIntervalSet = true; return this; } - public int graceInterval() { + public Integer graceInterval() { return this.graceInterval; } - public Builder fanOut(int fanOut) { + public Builder fanOut(Integer fanOut) { this.fanOut = fanOut; - this._fanOutSet = true; return this; } - public int fanOut() { + public Integer fanOut() { return this.fanOut; } - public Builder inFlightTTL(int inFlightTTL) { + public Builder inFlightTTL(Integer inFlightTTL) { this.inFlightTTL = inFlightTTL; - this._inFlightTTLSet = true; return this; } - public int inFlightTTL() { + public Integer inFlightTTL() { return this.inFlightTTL; } - public Builder sleepMilli(int sleepMilli) { + public Builder sleepMilli(Integer sleepMilli) { this.sleepMilli = sleepMilli; - this._sleepMilliSet = true; return this; } - public int sleepMilli() { + public Integer sleepMilli() { return this.sleepMilli; } @@ -352,67 +326,70 @@ public TimeUnits timeUnits() { } public StormTrackingCache build() { - if (!this._entryCapacitySet) { + if (Objects.isNull(this.entryCapacity())) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (this._entryCapacitySet && this.entryCapacity() < 1) { + if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); } - if (this._entryPruningTailSizeSet && this.entryPruningTailSize() < 1) { + if ( + Objects.nonNull(this.entryPruningTailSize()) && + this.entryPruningTailSize() < 1 + ) { throw new IllegalArgumentException( "`entryPruningTailSize` must be greater than or equal to 1" ); } - if (!this._gracePeriodSet) { + if (Objects.isNull(this.gracePeriod())) { throw new IllegalArgumentException( "Missing value for required field `gracePeriod`" ); } - if (this._gracePeriodSet && this.gracePeriod() < 1) { + if (Objects.nonNull(this.gracePeriod()) && this.gracePeriod() < 1) { throw new IllegalArgumentException( "`gracePeriod` must be greater than or equal to 1" ); } - if (!this._graceIntervalSet) { + if (Objects.isNull(this.graceInterval())) { throw new IllegalArgumentException( "Missing value for required field `graceInterval`" ); } - if (this._graceIntervalSet && this.graceInterval() < 1) { + if (Objects.nonNull(this.graceInterval()) && this.graceInterval() < 1) { throw new IllegalArgumentException( "`graceInterval` must be greater than or equal to 1" ); } - if (!this._fanOutSet) { + if (Objects.isNull(this.fanOut())) { throw new IllegalArgumentException( "Missing value for required field `fanOut`" ); } - if (this._fanOutSet && this.fanOut() < 1) { + if (Objects.nonNull(this.fanOut()) && this.fanOut() < 1) { throw new IllegalArgumentException( "`fanOut` must be greater than or equal to 1" ); } - if (!this._inFlightTTLSet) { + if (Objects.isNull(this.inFlightTTL())) { throw new IllegalArgumentException( "Missing value for required field `inFlightTTL`" ); } - if (this._inFlightTTLSet && this.inFlightTTL() < 1) { + if (Objects.nonNull(this.inFlightTTL()) && this.inFlightTTL() < 1) { throw new IllegalArgumentException( "`inFlightTTL` must be greater than or equal to 1" ); } - if (!this._sleepMilliSet) { + if (Objects.isNull(this.sleepMilli())) { throw new IllegalArgumentException( "Missing value for required field `sleepMilli`" ); } - if (this._sleepMilliSet && this.sleepMilli() < 1) { + if (Objects.nonNull(this.sleepMilli()) && this.sleepMilli() < 1) { throw new IllegalArgumentException( "`sleepMilli` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java index 4752a7cb80..c87c488b7f 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java @@ -10,7 +10,7 @@ public class UpdateUsageMetadataInput { private final ByteBuffer identifier; - private final int bytesUsed; + private final Integer bytesUsed; protected UpdateUsageMetadataInput(BuilderImpl builder) { this.identifier = builder.identifier(); @@ -21,7 +21,7 @@ public ByteBuffer identifier() { return this.identifier; } - public int bytesUsed() { + public Integer bytesUsed() { return this.bytesUsed; } @@ -38,9 +38,9 @@ public interface Builder { ByteBuffer identifier(); - Builder bytesUsed(int bytesUsed); + Builder bytesUsed(Integer bytesUsed); - int bytesUsed(); + Integer bytesUsed(); UpdateUsageMetadataInput build(); } @@ -49,16 +49,13 @@ static class BuilderImpl implements Builder { protected ByteBuffer identifier; - protected int bytesUsed; - - private boolean _bytesUsedSet = false; + protected Integer bytesUsed; protected BuilderImpl() {} protected BuilderImpl(UpdateUsageMetadataInput model) { this.identifier = model.identifier(); this.bytesUsed = model.bytesUsed(); - this._bytesUsedSet = true; } public Builder identifier(ByteBuffer identifier) { @@ -70,13 +67,12 @@ public ByteBuffer identifier() { return this.identifier; } - public Builder bytesUsed(int bytesUsed) { + public Builder bytesUsed(Integer bytesUsed) { this.bytesUsed = bytesUsed; - this._bytesUsedSet = true; return this; } - public int bytesUsed() { + public Integer bytesUsed() { return this.bytesUsed; } @@ -86,12 +82,12 @@ public UpdateUsageMetadataInput build() { "Missing value for required field `identifier`" ); } - if (!this._bytesUsedSet) { + if (Objects.isNull(this.bytesUsed())) { throw new IllegalArgumentException( "Missing value for required field `bytesUsed`" ); } - if (this._bytesUsedSet && this.bytesUsed() < 0) { + if (Objects.nonNull(this.bytesUsed()) && this.bytesUsed() < 0) { throw new IllegalArgumentException( "`bytesUsed` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs index 4463652497..2db1698f4a 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs @@ -30,12 +30,12 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteId concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteId)value; var converted = new AWS.Cryptography.MaterialProviders.AlgorithmSuiteId(); if (value.is_ESDK) { - converted.ESDK = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M4_ESDK(concrete.dtor_ESDK); + converted.ESDK = (AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M4_ESDK(concrete.dtor_ESDK)); return converted; } if (value.is_DBE) { - converted.DBE = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(concrete.dtor_DBE); + converted.DBE = (AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(concrete.dtor_DBE)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.AlgorithmSuiteId state"); @@ -88,32 +88,32 @@ public static AWS.Cryptography.MaterialProviders.CacheType FromDafny_N3_aws__N12 software.amazon.cryptography.materialproviders.internaldafny.types.CacheType concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.CacheType)value; var converted = new AWS.Cryptography.MaterialProviders.CacheType(); if (value.is_Default) { - converted.Default = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(concrete.dtor_Default); + converted.Default = (AWS.Cryptography.MaterialProviders.DefaultCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(concrete.dtor_Default)); return converted; } if (value.is_No) { - converted.No = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(concrete.dtor_No); + converted.No = (AWS.Cryptography.MaterialProviders.NoCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(concrete.dtor_No)); return converted; } if (value.is_SingleThreaded) { - converted.SingleThreaded = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(concrete.dtor_SingleThreaded); + converted.SingleThreaded = (AWS.Cryptography.MaterialProviders.SingleThreadedCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(concrete.dtor_SingleThreaded)); return converted; } if (value.is_MultiThreaded) { - converted.MultiThreaded = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(concrete.dtor_MultiThreaded); + converted.MultiThreaded = (AWS.Cryptography.MaterialProviders.MultiThreadedCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(concrete.dtor_MultiThreaded)); return converted; } if (value.is_StormTracking) { - converted.StormTracking = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(concrete.dtor_StormTracking); + converted.StormTracking = (AWS.Cryptography.MaterialProviders.StormTrackingCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(concrete.dtor_StormTracking)); return converted; } if (value.is_Shared) { - converted.Shared = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(concrete.dtor_Shared); + converted.Shared = (AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(concrete.dtor_Shared)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.CacheType state"); @@ -151,12 +151,12 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a software.amazon.cryptography.materialproviders.internaldafny.types.CommitmentPolicy concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.CommitmentPolicy)value; var converted = new AWS.Cryptography.MaterialProviders.CommitmentPolicy(); if (value.is_ESDK) { - converted.ESDK = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(concrete.dtor_ESDK); + converted.ESDK = (AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(concrete.dtor_ESDK)); return converted; } if (value.is_DBE) { - converted.DBE = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(concrete.dtor_DBE); + converted.DBE = (AWS.Cryptography.MaterialProviders.DBECommitmentPolicy)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(concrete.dtor_DBE)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.CommitmentPolicy state"); @@ -544,17 +544,17 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.DerivationAlgorithm(); if (value.is_HKDF) { - converted.HKDF = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(concrete.dtor_HKDF); + converted.HKDF = (AWS.Cryptography.MaterialProviders.HKDF)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(concrete.dtor_HKDF)); return converted; } if (value.is_IDENTITY) { - converted.IDENTITY = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(concrete.dtor_IDENTITY); + converted.IDENTITY = (AWS.Cryptography.MaterialProviders.IDENTITY)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(concrete.dtor_IDENTITY)); return converted; } if (value.is_None) { - converted.None = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(concrete.dtor_None); + converted.None = (AWS.Cryptography.MaterialProviders.None)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(concrete.dtor_None)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.DerivationAlgorithm state"); @@ -580,12 +580,12 @@ public static AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm FromDafny_ software.amazon.cryptography.materialproviders.internaldafny.types.EdkWrappingAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.EdkWrappingAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm(); if (value.is_DIRECT__KEY__WRAPPING) { - converted.DIRECT__KEY__WRAPPING = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(concrete.dtor_DIRECT__KEY__WRAPPING); + converted.DIRECT__KEY__WRAPPING = (AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(concrete.dtor_DIRECT__KEY__WRAPPING)); return converted; } if (value.is_IntermediateKeyWrapping) { - converted.IntermediateKeyWrapping = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(concrete.dtor_IntermediateKeyWrapping); + converted.IntermediateKeyWrapping = (AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(concrete.dtor_IntermediateKeyWrapping)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm state"); @@ -607,7 +607,7 @@ public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_c software.amazon.cryptography.materialproviders.internaldafny.types.Encrypt concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.Encrypt)value; var converted = new AWS.Cryptography.MaterialProviders.Encrypt(); if (value.is_AES__GCM) { - converted.AES__GCM = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(concrete.dtor_AES__GCM); + converted.AES__GCM = (AWS.Cryptography.Primitives.AES_GCM)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(concrete.dtor_AES__GCM)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.Encrypt state"); @@ -941,7 +941,7 @@ public static AWS.Cryptography.MaterialProviders.KeyAgreementScheme FromDafny_N3 software.amazon.cryptography.materialproviders.internaldafny.types.KeyAgreementScheme concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.KeyAgreementScheme)value; var converted = new AWS.Cryptography.MaterialProviders.KeyAgreementScheme(); if (value.is_StaticConfiguration) { - converted.StaticConfiguration = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(concrete.dtor_StaticConfiguration); + converted.StaticConfiguration = (AWS.Cryptography.MaterialProviders.StaticConfigurations)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(concrete.dtor_StaticConfiguration)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.KeyAgreementScheme state"); @@ -959,12 +959,12 @@ public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations Fro software.amazon.cryptography.materialproviders.internaldafny.types.KmsEcdhStaticConfigurations concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.KmsEcdhStaticConfigurations)value; var converted = new AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations(); if (value.is_KmsPublicKeyDiscovery) { - converted.KmsPublicKeyDiscovery = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(concrete.dtor_KmsPublicKeyDiscovery); + converted.KmsPublicKeyDiscovery = (AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(concrete.dtor_KmsPublicKeyDiscovery)); return converted; } if (value.is_KmsPrivateKeyToStaticPublicKey) { - converted.KmsPrivateKeyToStaticPublicKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(concrete.dtor_KmsPrivateKeyToStaticPublicKey); + converted.KmsPrivateKeyToStaticPublicKey = (AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(concrete.dtor_KmsPrivateKeyToStaticPublicKey)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations state"); @@ -996,22 +996,22 @@ public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12 software.amazon.cryptography.materialproviders.internaldafny.types.Materials concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.Materials)value; var converted = new AWS.Cryptography.MaterialProviders.Materials(); if (value.is_Encryption) { - converted.Encryption = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(concrete.dtor_Encryption); + converted.Encryption = (AWS.Cryptography.MaterialProviders.EncryptionMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(concrete.dtor_Encryption)); return converted; } if (value.is_Decryption) { - converted.Decryption = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(concrete.dtor_Decryption); + converted.Decryption = (AWS.Cryptography.MaterialProviders.DecryptionMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(concrete.dtor_Decryption)); return converted; } if (value.is_BranchKey) { - converted.BranchKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(concrete.dtor_BranchKey); + converted.BranchKey = (AWS.Cryptography.KeyStore.BranchKeyMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(concrete.dtor_BranchKey)); return converted; } if (value.is_BeaconKey) { - converted.BeaconKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(concrete.dtor_BeaconKey); + converted.BeaconKey = (AWS.Cryptography.KeyStore.BeaconKeyMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(concrete.dtor_BeaconKey)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.Materials state"); @@ -1116,17 +1116,17 @@ public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations Fro software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations)value; var converted = new AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations(); if (value.is_PublicKeyDiscovery) { - converted.PublicKeyDiscovery = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M18_PublicKeyDiscovery(concrete.dtor_PublicKeyDiscovery); + converted.PublicKeyDiscovery = (AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M18_PublicKeyDiscovery(concrete.dtor_PublicKeyDiscovery)); return converted; } if (value.is_RawPrivateKeyToStaticPublicKey) { - converted.RawPrivateKeyToStaticPublicKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(concrete.dtor_RawPrivateKeyToStaticPublicKey); + converted.RawPrivateKeyToStaticPublicKey = (AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(concrete.dtor_RawPrivateKeyToStaticPublicKey)); return converted; } if (value.is_EphemeralPrivateKeyToStaticPublicKey) { - converted.EphemeralPrivateKeyToStaticPublicKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(concrete.dtor_EphemeralPrivateKeyToStaticPublicKey); + converted.EphemeralPrivateKeyToStaticPublicKey = (AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(concrete.dtor_EphemeralPrivateKeyToStaticPublicKey)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations state"); @@ -1152,12 +1152,12 @@ public static AWS.Cryptography.MaterialProviders.SignatureAlgorithm FromDafny_N3 software.amazon.cryptography.materialproviders.internaldafny.types.SignatureAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.SignatureAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.SignatureAlgorithm(); if (value.is_ECDSA) { - converted.ECDSA = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(concrete.dtor_ECDSA); + converted.ECDSA = (AWS.Cryptography.MaterialProviders.ECDSA)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(concrete.dtor_ECDSA)); return converted; } if (value.is_None) { - converted.None = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(concrete.dtor_None); + converted.None = (AWS.Cryptography.MaterialProviders.None)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(concrete.dtor_None)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.SignatureAlgorithm state"); @@ -1179,12 +1179,12 @@ public static AWS.Cryptography.MaterialProviders.StaticConfigurations FromDafny_ software.amazon.cryptography.materialproviders.internaldafny.types.StaticConfigurations concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.StaticConfigurations)value; var converted = new AWS.Cryptography.MaterialProviders.StaticConfigurations(); if (value.is_AWS__KMS__ECDH) { - converted.AWS__KMS__ECDH = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(concrete.dtor_AWS__KMS__ECDH); + converted.AWS__KMS__ECDH = (AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(concrete.dtor_AWS__KMS__ECDH)); return converted; } if (value.is_RAW__ECDH) { - converted.RAW__ECDH = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(concrete.dtor_RAW__ECDH); + converted.RAW__ECDH = (AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(concrete.dtor_RAW__ECDH)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.StaticConfigurations state"); @@ -1206,12 +1206,12 @@ public static AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm Fro software.amazon.cryptography.materialproviders.internaldafny.types.SymmetricSignatureAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.SymmetricSignatureAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm(); if (value.is_HMAC) { - converted.HMAC = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(concrete.dtor_HMAC); + converted.HMAC = (AWS.Cryptography.Primitives.DigestAlgorithm)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(concrete.dtor_HMAC)); return converted; } if (value.is_None) { - converted.None = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(concrete.dtor_None); + converted.None = (AWS.Cryptography.MaterialProviders.None)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(concrete.dtor_None)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm state"); @@ -1301,7 +1301,7 @@ public static AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IESDKAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M4_ESDK(AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKAlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKAlgorithmSuiteId((AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId)value); } public static AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(software.amazon.cryptography.materialproviders.internaldafny.types._IDBEAlgorithmSuiteId value) { @@ -1309,7 +1309,7 @@ public static AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDBEAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBEAlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBEAlgorithmSuiteId((AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M2_id(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -1317,7 +1317,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M2_id(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M8_binaryId(Dafny.ISequence value) { @@ -1325,15 +1325,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M8_binaryId(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int value) { return FromDafny_N6_smithy__N3_api__S7_Integer(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int? value) { - return ToDafny_N6_smithy__N3_api__S7_Integer(value); + return ToDafny_N6_smithy__N3_api__S7_Integer((int)value); } public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M7_encrypt(software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt value) { @@ -1341,7 +1341,7 @@ public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M7_encrypt(AWS.Cryptography.MaterialProviders.Encrypt value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt((AWS.Cryptography.MaterialProviders.Encrypt)value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M3_kdf(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -1349,7 +1349,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M3_kdf(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M10_commitment(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -1357,7 +1357,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M10_commitment(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.SignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M9_signature(software.amazon.cryptography.materialproviders.internaldafny.types._ISignatureAlgorithm value) { @@ -1365,7 +1365,7 @@ public static AWS.Cryptography.MaterialProviders.SignatureAlgorithm FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._ISignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M9_signature(AWS.Cryptography.MaterialProviders.SignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm((AWS.Cryptography.MaterialProviders.SignatureAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M18_symmetricSignature(software.amazon.cryptography.materialproviders.internaldafny.types._ISymmetricSignatureAlgorithm value) { @@ -1373,7 +1373,7 @@ public static AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._ISymmetricSignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M18_symmetricSignature(AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm((AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M11_edkWrapping(software.amazon.cryptography.materialproviders.internaldafny.types._IEdkWrappingAlgorithm value) { @@ -1381,7 +1381,7 @@ public static AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEdkWrappingAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M11_edkWrapping(AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm((AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S42_AwsCryptographicMaterialProvidersException__M7_message(Dafny.ISequence value) { @@ -1389,7 +1389,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S42_AwsCryptographicMaterialProvidersException__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.MaterialProviders.DefaultCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(software.amazon.cryptography.materialproviders.internaldafny.types._IDefaultCache value) { @@ -1397,7 +1397,7 @@ public static AWS.Cryptography.MaterialProviders.DefaultCache FromDafny_N3_aws__ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDefaultCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(AWS.Cryptography.MaterialProviders.DefaultCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache((AWS.Cryptography.MaterialProviders.DefaultCache)value); } public static AWS.Cryptography.MaterialProviders.NoCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(software.amazon.cryptography.materialproviders.internaldafny.types._INoCache value) { @@ -1405,7 +1405,7 @@ public static AWS.Cryptography.MaterialProviders.NoCache FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.materialproviders.internaldafny.types._INoCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(AWS.Cryptography.MaterialProviders.NoCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_NoCache(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_NoCache((AWS.Cryptography.MaterialProviders.NoCache)value); } public static AWS.Cryptography.MaterialProviders.SingleThreadedCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(software.amazon.cryptography.materialproviders.internaldafny.types._ISingleThreadedCache value) { @@ -1413,7 +1413,7 @@ public static AWS.Cryptography.MaterialProviders.SingleThreadedCache FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._ISingleThreadedCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(AWS.Cryptography.MaterialProviders.SingleThreadedCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache((AWS.Cryptography.MaterialProviders.SingleThreadedCache)value); } public static AWS.Cryptography.MaterialProviders.MultiThreadedCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(software.amazon.cryptography.materialproviders.internaldafny.types._IMultiThreadedCache value) { @@ -1421,7 +1421,7 @@ public static AWS.Cryptography.MaterialProviders.MultiThreadedCache FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IMultiThreadedCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(AWS.Cryptography.MaterialProviders.MultiThreadedCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache((AWS.Cryptography.MaterialProviders.MultiThreadedCache)value); } public static AWS.Cryptography.MaterialProviders.StormTrackingCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(software.amazon.cryptography.materialproviders.internaldafny.types._IStormTrackingCache value) { @@ -1429,7 +1429,7 @@ public static AWS.Cryptography.MaterialProviders.StormTrackingCache FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IStormTrackingCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(AWS.Cryptography.MaterialProviders.StormTrackingCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache((AWS.Cryptography.MaterialProviders.StormTrackingCache)value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache value) { @@ -1437,7 +1437,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache Fr } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache)value); } public static AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(software.amazon.cryptography.materialproviders.internaldafny.types._IESDKCommitmentPolicy value) { @@ -1445,7 +1445,7 @@ public static AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IESDKCommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKCommitmentPolicy(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKCommitmentPolicy((AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy)value); } public static AWS.Cryptography.MaterialProviders.DBECommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(software.amazon.cryptography.materialproviders.internaldafny.types._IDBECommitmentPolicy value) { @@ -1453,7 +1453,7 @@ public static AWS.Cryptography.MaterialProviders.DBECommitmentPolicy FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDBECommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(AWS.Cryptography.MaterialProviders.DBECommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBECommitmentPolicy(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBECommitmentPolicy((AWS.Cryptography.MaterialProviders.DBECommitmentPolicy)value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateAwsKmsDiscoveryKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1461,7 +1461,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateAwsKmsDiscoveryKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateAwsKmsDiscoveryKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1485,7 +1485,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CreateAwsKmsDiscoveryMultiKeyringInput__M7_regions(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList((System.Collections.Generic.List)value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CreateAwsKmsDiscoveryMultiKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1517,7 +1517,7 @@ public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M18_KeyAgreementScheme(AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_curveSpec(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1525,7 +1525,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_curveSpec(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1533,7 +1533,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M11_grantTokens(Wrappers_Compile._IOption>> value) { @@ -1565,15 +1565,15 @@ public static AWS.Cryptography.KeyStore.KeyStore FromDafny_N3_aws__N12_cryptogra } public static software.amazon.cryptography.keystore.internaldafny.types.IKeyStoreClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M8_keyStore(AWS.Cryptography.KeyStore.KeyStore value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_KeyStoreReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_KeyStoreReference((AWS.Cryptography.KeyStore.KeyStore)value); } - public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long value) + public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); } public static AWS.Cryptography.MaterialProviders.CacheType FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M5_cache(Wrappers_Compile._IOption value) { @@ -1597,7 +1597,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M8_kmsKeyId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1605,7 +1605,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M11_grantTokens(Wrappers_Compile._IOption>> value) { @@ -1621,7 +1621,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsMrkDiscoveryKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsMrkDiscoveryKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1645,7 +1645,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsMrkDiscoveryKeyringInput__M6_region(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region((string)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateAwsKmsMrkDiscoveryMultiKeyringInput__M7_regions(Dafny.ISequence> value) { @@ -1653,7 +1653,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateAwsKmsMrkDiscoveryMultiKeyringInput__M7_regions(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList((System.Collections.Generic.List)value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateAwsKmsMrkDiscoveryMultiKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1685,7 +1685,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M8_kmsKeyId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1693,7 +1693,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M11_grantTokens(Wrappers_Compile._IOption>> value) { @@ -1781,7 +1781,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M8_kmsKeyId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); } public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M19_encryptionAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec value) { @@ -1789,7 +1789,7 @@ public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M19_encryptionAlgorithm(Amazon.KeyManagementService.EncryptionAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec((Amazon.KeyManagementService.EncryptionAlgorithmSpec)value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M9_kmsClient(Wrappers_Compile._IOption value) { @@ -1813,7 +1813,7 @@ public static AWS.Cryptography.MaterialProviders.CacheType FromDafny_N3_aws__N12 } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICacheType ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CreateCryptographicMaterialsCacheInput__M5_cache(AWS.Cryptography.MaterialProviders.CacheType value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType((AWS.Cryptography.MaterialProviders.CacheType)value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_CreateCryptographicMaterialsCacheOutput__M14_materialsCache(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache value) { @@ -1821,7 +1821,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache Fr } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_CreateCryptographicMaterialsCacheOutput__M14_materialsCache(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache)value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateCryptographicMaterialsManagerOutput__M16_materialsManager(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager value) { @@ -1829,7 +1829,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateCryptographicMaterialsManagerOutput__M16_materialsManager(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager)value); } public static AWS.Cryptography.MaterialProviders.IClientSupplier FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateDefaultClientSupplierOutput__M6_client(software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier value) { @@ -1837,7 +1837,7 @@ public static AWS.Cryptography.MaterialProviders.IClientSupplier FromDafny_N3_aw } public static software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateDefaultClientSupplierOutput__M6_client(AWS.Cryptography.MaterialProviders.IClientSupplier value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_ClientSupplierReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_ClientSupplierReference((AWS.Cryptography.MaterialProviders.IClientSupplier)value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S47_CreateDefaultCryptographicMaterialsManagerInput__M7_keyring(software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring value) { @@ -1845,7 +1845,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S47_CreateDefaultCryptographicMaterialsManagerInput__M7_keyring(AWS.Cryptography.MaterialProviders.IKeyring value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference((AWS.Cryptography.MaterialProviders.IKeyring)value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_CreateKeyringOutput__M7_keyring(software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring value) { @@ -1853,7 +1853,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_CreateKeyringOutput__M7_keyring(AWS.Cryptography.MaterialProviders.IKeyring value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference((AWS.Cryptography.MaterialProviders.IKeyring)value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_CreateMultiKeyringInput__M9_generator(Wrappers_Compile._IOption value) { @@ -1869,7 +1869,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_CreateMultiKeyringInput__M13_childKeyrings(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList((System.Collections.Generic.List)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M12_keyNamespace(Dafny.ISequence value) { @@ -1877,7 +1877,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M12_keyNamespace(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M7_keyName(Dafny.ISequence value) { @@ -1885,7 +1885,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M7_keyName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingKey(Dafny.ISequence value) { @@ -1893,7 +1893,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.MaterialProviders.AesWrappingAlg FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingAlg(software.amazon.cryptography.materialproviders.internaldafny.types._IAesWrappingAlg value) { @@ -1901,7 +1901,7 @@ public static AWS.Cryptography.MaterialProviders.AesWrappingAlg FromDafny_N3_aws } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAesWrappingAlg ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingAlg(AWS.Cryptography.MaterialProviders.AesWrappingAlg value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_AesWrappingAlg(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_AesWrappingAlg((AWS.Cryptography.MaterialProviders.AesWrappingAlg)value); } public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M18_KeyAgreementScheme(software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations value) { @@ -1909,7 +1909,7 @@ public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M18_KeyAgreementScheme(AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M9_curveSpec(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1917,7 +1917,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M9_curveSpec(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M12_keyNamespace(Dafny.ISequence value) { @@ -1925,7 +1925,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M12_keyNamespace(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M7_keyName(Dafny.ISequence value) { @@ -1933,7 +1933,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M7_keyName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.MaterialProviders.PaddingScheme FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M13_paddingScheme(software.amazon.cryptography.materialproviders.internaldafny.types._IPaddingScheme value) { @@ -1941,7 +1941,7 @@ public static AWS.Cryptography.MaterialProviders.PaddingScheme FromDafny_N3_aws_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IPaddingScheme ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M13_paddingScheme(AWS.Cryptography.MaterialProviders.PaddingScheme value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_PaddingScheme(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_PaddingScheme((AWS.Cryptography.MaterialProviders.PaddingScheme)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M9_publicKey(Wrappers_Compile._IOption> value) { @@ -1981,7 +1981,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_CreateRequiredEncryptionContextCMMInput__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S40_CreateRequiredEncryptionContextCMMOutput__M16_materialsManager(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager value) { @@ -1989,7 +1989,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S40_CreateRequiredEncryptionContextCMMOutput__M16_materialsManager(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M14_algorithmSuite(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo value) { @@ -1997,7 +1997,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M14_algorithmSuite(AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo((AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2005,7 +2005,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2013,7 +2013,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M16_plaintextDataKey(Wrappers_Compile._IOption> value) { @@ -2045,7 +2045,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M16_algorithmSuiteId(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2053,7 +2053,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptedDataKeys(Dafny.ISequence value) { @@ -2061,7 +2061,7 @@ public static software.amazon.cryptography.materialproviders.internaldafny.types } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptedDataKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList((System.Collections.Generic.List)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2069,7 +2069,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M27_reproducedEncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -2085,7 +2085,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S22_DecryptMaterialsOutput__M19_decryptionMaterials(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DeleteCacheEntryInput__M10_identifier(Dafny.ISequence value) { @@ -2093,7 +2093,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DeleteCacheEntryInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.MaterialProviders.HKDF FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(software.amazon.cryptography.materialproviders.internaldafny.types._IHKDF value) { @@ -2101,7 +2101,7 @@ public static AWS.Cryptography.MaterialProviders.HKDF FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._IHKDF ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(AWS.Cryptography.MaterialProviders.HKDF value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF((AWS.Cryptography.MaterialProviders.HKDF)value); } public static AWS.Cryptography.MaterialProviders.IDENTITY FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(software.amazon.cryptography.materialproviders.internaldafny.types._IIDENTITY value) { @@ -2109,7 +2109,7 @@ public static AWS.Cryptography.MaterialProviders.IDENTITY FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IIDENTITY ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(AWS.Cryptography.MaterialProviders.IDENTITY value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_IDENTITY(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_IDENTITY((AWS.Cryptography.MaterialProviders.IDENTITY)value); } public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(software.amazon.cryptography.materialproviders.internaldafny.types._INone value) { @@ -2117,7 +2117,7 @@ public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._INone ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(AWS.Cryptography.MaterialProviders.None value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None((AWS.Cryptography.MaterialProviders.None)value); } public static AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(software.amazon.cryptography.materialproviders.internaldafny.types._IDIRECT__KEY__WRAPPING value) { @@ -2125,7 +2125,7 @@ public static AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDIRECT__KEY__WRAPPING ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DIRECT_KEY_WRAPPING(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DIRECT_KEY_WRAPPING((AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING)value); } public static AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(software.amazon.cryptography.materialproviders.internaldafny.types._IIntermediateKeyWrapping value) { @@ -2133,7 +2133,7 @@ public static AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping FromDaf } public static software.amazon.cryptography.materialproviders.internaldafny.types._IIntermediateKeyWrapping ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping((AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping)value); } public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM value) { @@ -2141,7 +2141,7 @@ public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(AWS.Cryptography.Primitives.AES_GCM value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM((AWS.Cryptography.Primitives.AES_GCM)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M14_algorithmSuite(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo value) { @@ -2149,7 +2149,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M14_algorithmSuite(AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo((AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2157,7 +2157,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptedDataKeys(Dafny.ISequence value) { @@ -2165,7 +2165,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptedDataKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList((System.Collections.Generic.List)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2173,7 +2173,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M16_plaintextDataKey(Wrappers_Compile._IOption> value) { @@ -2205,7 +2205,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_EntryAlreadyExists__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EntryDoesNotExist__M7_message(Dafny.ISequence value) { @@ -2213,7 +2213,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EntryDoesNotExist__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_GetAlgorithmSuiteInfoInput__M8_binaryId(Dafny.ISequence value) { @@ -2221,7 +2221,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_GetAlgorithmSuiteInfoInput__M8_binaryId(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetBranchKeyIdInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2229,7 +2229,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetBranchKeyIdInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_GetBranchKeyIdOutput__M11_branchKeyId(Dafny.ISequence value) { @@ -2237,7 +2237,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_GetBranchKeyIdOutput__M11_branchKeyId(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_GetCacheEntryInput__M10_identifier(Dafny.ISequence value) { @@ -2245,7 +2245,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_GetCacheEntryInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_GetCacheEntryInput__M9_bytesUsed(Wrappers_Compile._IOption value) { @@ -2261,39 +2261,39 @@ public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_materials(AWS.Cryptography.MaterialProviders.Materials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials((AWS.Cryptography.MaterialProviders.Materials)value); } - public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long value) + public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); } - public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long value) + public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger((int)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GetClientInput__M6_region(Dafny.ISequence value) { @@ -2301,7 +2301,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GetClientInput__M6_region(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region((string)value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_GetClientOutput__M6_client(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -2309,7 +2309,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_GetClientOutput__M6_client(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2317,7 +2317,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2325,7 +2325,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M16_algorithmSuiteId(Wrappers_Compile._IOption value) { @@ -2357,7 +2357,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_GetEncryptionMaterialsOutput__M19_encryptionMaterials(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_InFlightTTLExceeded__M7_message(Dafny.ISequence value) { @@ -2365,7 +2365,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_InFlightTTLExceeded__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M16_algorithmSuiteId(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2373,7 +2373,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M16_algorithmSuiteId(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2381,7 +2381,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2389,7 +2389,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M16_algorithmSuiteId(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2397,7 +2397,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M16_algorithmSuiteId(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2405,7 +2405,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2413,7 +2413,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M10_signingKey(Wrappers_Compile._IOption> value) { @@ -2437,7 +2437,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_InvalidAlgorithmSuiteInfo__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnDecrypt__M7_message(Dafny.ISequence value) { @@ -2445,7 +2445,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnDecrypt__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnEncrypt__M7_message(Dafny.ISequence value) { @@ -2453,7 +2453,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnEncrypt__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidDecryptionMaterials__M7_message(Dafny.ISequence value) { @@ -2461,7 +2461,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidDecryptionMaterials__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidDecryptionMaterialsTransition__M7_message(Dafny.ISequence value) { @@ -2469,7 +2469,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidDecryptionMaterialsTransition__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidEncryptionMaterials__M7_message(Dafny.ISequence value) { @@ -2477,7 +2477,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidEncryptionMaterials__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidEncryptionMaterialsTransition__M7_message(Dafny.ISequence value) { @@ -2485,7 +2485,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidEncryptionMaterialsTransition__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.MaterialProviders.StaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(software.amazon.cryptography.materialproviders.internaldafny.types._IStaticConfigurations value) { @@ -2493,7 +2493,7 @@ public static AWS.Cryptography.MaterialProviders.StaticConfigurations FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(AWS.Cryptography.MaterialProviders.StaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations((AWS.Cryptography.MaterialProviders.StaticConfigurations)value); } public static AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPublicKeyDiscoveryInput value) { @@ -2501,7 +2501,7 @@ public static AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput From } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPublicKeyDiscoveryInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput((AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput)value); } public static AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPrivateKeyToStaticPublicKeyInput value) { @@ -2509,7 +2509,7 @@ public static AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyI } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPrivateKeyToStaticPublicKeyInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput((AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput)value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2517,7 +2517,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2525,7 +2525,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); } public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials value) { @@ -2533,7 +2533,7 @@ public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(AWS.Cryptography.KeyStore.BranchKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials((AWS.Cryptography.KeyStore.BranchKeyMaterials)value); } public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials value) { @@ -2541,7 +2541,7 @@ public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(AWS.Cryptography.KeyStore.BeaconKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials((AWS.Cryptography.KeyStore.BeaconKeyMaterials)value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2549,7 +2549,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M9_materials(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M17_encryptedDataKeys(Dafny.ISequence value) { @@ -2557,7 +2557,7 @@ public static software.amazon.cryptography.materialproviders.internaldafny.types } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M17_encryptedDataKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList((System.Collections.Generic.List)value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnDecryptOutput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2565,7 +2565,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnDecryptOutput__M9_materials(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnEncryptInput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2573,7 +2573,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnEncryptInput__M9_materials(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnEncryptOutput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2581,7 +2581,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnEncryptOutput__M9_materials(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_identifier(Dafny.ISequence value) { @@ -2589,7 +2589,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IMaterials value) { @@ -2597,23 +2597,23 @@ public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M9_materials(AWS.Cryptography.MaterialProviders.Materials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials((AWS.Cryptography.MaterialProviders.Materials)value); } - public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long value) + public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); } - public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long value) + public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_messagesUsed(Wrappers_Compile._IOption value) { @@ -2637,7 +2637,7 @@ public static AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput FromDaf } public static software.amazon.cryptography.materialproviders.internaldafny.types._IPublicKeyDiscoveryInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M18_PublicKeyDiscovery(AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_PublicKeyDiscoveryInput(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_PublicKeyDiscoveryInput((AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput)value); } public static AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(software.amazon.cryptography.materialproviders.internaldafny.types._IRawPrivateKeyToStaticPublicKeyInput value) { @@ -2645,7 +2645,7 @@ public static AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyI } public static software.amazon.cryptography.materialproviders.internaldafny.types._IRawPrivateKeyToStaticPublicKeyInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput((AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput)value); } public static AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(software.amazon.cryptography.materialproviders.internaldafny.types._IEphemeralPrivateKeyToStaticPublicKeyInput value) { @@ -2653,7 +2653,7 @@ public static AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPubl } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEphemeralPrivateKeyToStaticPublicKeyInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput((AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput)value); } public static AWS.Cryptography.MaterialProviders.ECDSA FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(software.amazon.cryptography.materialproviders.internaldafny.types._IECDSA value) { @@ -2661,7 +2661,7 @@ public static AWS.Cryptography.MaterialProviders.ECDSA FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.materialproviders.internaldafny.types._IECDSA ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(AWS.Cryptography.MaterialProviders.ECDSA value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA((AWS.Cryptography.MaterialProviders.ECDSA)value); } public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(software.amazon.cryptography.materialproviders.internaldafny.types._INone value) { @@ -2669,7 +2669,7 @@ public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._INone ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(AWS.Cryptography.MaterialProviders.None value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None((AWS.Cryptography.MaterialProviders.None)value); } public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(software.amazon.cryptography.materialproviders.internaldafny.types._IKmsEcdhStaticConfigurations value) { @@ -2677,7 +2677,7 @@ public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations)value); } public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations value) { @@ -2685,7 +2685,7 @@ public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -2693,7 +2693,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(software.amazon.cryptography.materialproviders.internaldafny.types._INone value) { @@ -2701,7 +2701,7 @@ public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._INone ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(AWS.Cryptography.MaterialProviders.None value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None((AWS.Cryptography.MaterialProviders.None)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M10_identifier(Dafny.ISequence value) { @@ -2709,15 +2709,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger((int)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M9_algorithm(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2725,7 +2725,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M9_algorithm(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2733,7 +2733,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M9_algorithm(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2741,7 +2741,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M9_algorithm(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2749,7 +2749,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M5_start(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2757,7 +2757,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M5_start(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M4_stop(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2765,7 +2765,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M4_stop(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M5_start(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2773,7 +2773,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M5_start(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M4_stop(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2781,7 +2781,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M4_stop(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); } public static System.IO.MemoryStream FromDafny_N6_smithy__N3_api__S4_Blob(Dafny.ISequence value) { @@ -3324,21 +3324,21 @@ public static software.amazon.cryptography.primitives.internaldafny.types._IDige if (AWS.Cryptography.Primitives.DigestAlgorithm.SHA_256.Equals(value)) return software.amazon.cryptography.primitives.internaldafny.types.DigestAlgorithm.create_SHA__256(); throw new System.ArgumentException("Invalid AWS.Cryptography.Primitives.DigestAlgorithm value"); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M20_entryPruningTailSize(Wrappers_Compile._IOption value) { @@ -3348,13 +3348,13 @@ public static Wrappers_Compile._IOption ToDafny_N3_aws__N12_cryptography__N { return value == null ? Wrappers_Compile.Option.create_None() : Wrappers_Compile.Option.create_Some(ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value)); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M20_entryPruningTailSize(Wrappers_Compile._IOption value) { @@ -3364,13 +3364,13 @@ public static Wrappers_Compile._IOption ToDafny_N3_aws__N12_cryptography__N { return value == null ? Wrappers_Compile.Option.create_None() : Wrappers_Compile.Option.create_Some(ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value)); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M20_entryPruningTailSize(Wrappers_Compile._IOption value) { @@ -3380,45 +3380,45 @@ public static Wrappers_Compile._IOption ToDafny_N3_aws__N12_cryptography__N { return value == null ? Wrappers_Compile.Option.create_None() : Wrappers_Compile.Option.create_Some(ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value)); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int? value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); } public static AWS.Cryptography.MaterialProviders.TimeUnits FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M9_timeUnits(Wrappers_Compile._IOption value) { @@ -3434,7 +3434,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_DiscoveryFilter__M10_accountIds(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_AccountIdList(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_AccountIdList((System.Collections.Generic.List)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_DiscoveryFilter__M9_partition(Dafny.ISequence value) { @@ -3442,7 +3442,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_DiscoveryFilter__M9_partition(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GrantTokenList__M6_member(Dafny.ISequence value) { @@ -3450,7 +3450,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GrantTokenList__M6_member(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList__M6_member(Dafny.ISequence value) { @@ -3458,7 +3458,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_KmsKeyIdList__M6_member(Dafny.ISequence value) { @@ -3466,7 +3466,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_KmsKeyIdList__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList__M6_member(software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring value) { @@ -3474,7 +3474,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList__M6_member(AWS.Cryptography.MaterialProviders.IKeyring value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference((AWS.Cryptography.MaterialProviders.IKeyring)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys__M6_member(Dafny.ISequence value) { @@ -3482,7 +3482,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M3_key(Dafny.ISequence value) { @@ -3490,7 +3490,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M3_key(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M5_value(Dafny.ISequence value) { @@ -3498,7 +3498,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M5_value(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); } public static AWS.Cryptography.MaterialProviders.EncryptedDataKey FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList__M6_member(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptedDataKey value) { @@ -3506,7 +3506,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptedDataKey FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptedDataKey ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList__M6_member(AWS.Cryptography.MaterialProviders.EncryptedDataKey value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey((AWS.Cryptography.MaterialProviders.EncryptedDataKey)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M4_hmac(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -3514,31 +3514,31 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M4_hmac(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_keyEncryptionKeyKdf(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -3546,7 +3546,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_keyEncryptionKeyKdf(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M9_macKeyKdf(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -3554,7 +3554,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M9_macKeyKdf(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); } public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_pdkEncryptAlgorithm(software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt value) { @@ -3562,31 +3562,31 @@ public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_pdkEncryptAlgorithm(AWS.Cryptography.MaterialProviders.Encrypt value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt((AWS.Cryptography.MaterialProviders.Encrypt)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_SymmetricSigningKeyList__M6_member(Dafny.ISequence value) { @@ -3594,7 +3594,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_SymmetricSigningKeyList__M6_member(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Secret(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Secret((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput__M22_recipientKmsIdentifier(Dafny.ISequence value) { @@ -3602,7 +3602,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput__M22_recipientKmsIdentifier(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M19_senderKmsIdentifier(Dafny.ISequence value) { @@ -3610,7 +3610,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M19_senderKmsIdentifier(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M15_senderPublicKey(Wrappers_Compile._IOption> value) { @@ -3626,7 +3626,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -3634,7 +3634,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(Dafny.ISequence value) { @@ -3642,7 +3642,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -3650,7 +3650,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(Dafny.ISequence value) { @@ -3658,7 +3658,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(Dafny.ISequence value) { @@ -3666,7 +3666,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Beacon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -3674,7 +3674,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M9_beaconKey(Wrappers_Compile._IOption> value) { @@ -3698,7 +3698,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_PublicKeyDiscoveryInput__M25_recipientStaticPrivateKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M22_senderStaticPrivateKey(Dafny.ISequence value) { @@ -3706,7 +3706,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M22_senderStaticPrivateKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(Dafny.ISequence value) { @@ -3714,7 +3714,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(Dafny.ISequence value) { @@ -3722,7 +3722,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA__M5_curve(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -3730,7 +3730,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA__M5_curve(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); } public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(int value) { @@ -3863,7 +3863,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_AccountIdList__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_AccountId(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_AccountId((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M13_keyProviderId(Dafny.ISequence value) { @@ -3871,7 +3871,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M13_keyProviderId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M15_keyProviderInfo(Dafny.ISequence value) { @@ -3879,7 +3879,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M15_keyProviderInfo(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M10_ciphertext(Dafny.ISequence value) { @@ -3887,7 +3887,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M10_ciphertext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M3_key(Dafny.ISequence value) { @@ -3895,7 +3895,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M3_key(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(Dafny.ISequence value) { @@ -3903,7 +3903,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M3_key(Dafny.ISequence value) { @@ -3911,7 +3911,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKe } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M3_key(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(Dafny.ISequence value) { @@ -3919,7 +3919,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_AccountId(Dafny.ISequence value) { diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs index 9c9b351d5e..1412d993b6 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs @@ -165,22 +165,22 @@ public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_c software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration concrete = (software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration)value; var converted = new AWS.Cryptography.KeyStore.KMSConfiguration(); if (value.is_kmsKeyArn) { - converted.KmsKeyArn = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(concrete.dtor_kmsKeyArn); + converted.KmsKeyArn = (string)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(concrete.dtor_kmsKeyArn)); return converted; } if (value.is_kmsMRKeyArn) { - converted.KmsMRKeyArn = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(concrete.dtor_kmsMRKeyArn); + converted.KmsMRKeyArn = (string)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(concrete.dtor_kmsMRKeyArn)); return converted; } if (value.is_discovery) { - converted.Discovery = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(concrete.dtor_discovery); + converted.Discovery = (AWS.Cryptography.KeyStore.Discovery)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(concrete.dtor_discovery)); return converted; } if (value.is_mrDiscovery) { - converted.MrDiscovery = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(concrete.dtor_mrDiscovery); + converted.MrDiscovery = (AWS.Cryptography.KeyStore.MRDiscovery)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(concrete.dtor_mrDiscovery)); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.KeyStore.KMSConfiguration state"); @@ -247,7 +247,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S15_Create } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S15_CreateKeyOutput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S20_CreateKeyStoreOutput__M8_tableArn(Dafny.ISequence value) { @@ -255,7 +255,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S20_Create } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S20_CreateKeyStoreOutput__M8_tableArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S23_GetActiveBranchKeyInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -263,7 +263,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S23_GetAct } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S23_GetActiveBranchKeyInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetActiveBranchKeyOutput__M18_branchKeyMaterials(software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials value) { @@ -271,7 +271,7 @@ public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials ToDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetActiveBranchKeyOutput__M18_branchKeyMaterials(AWS.Cryptography.KeyStore.BranchKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials((AWS.Cryptography.KeyStore.BranchKeyMaterials)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_GetBeaconKeyInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -279,7 +279,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_GetBea } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_GetBeaconKeyInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_GetBeaconKeyOutput__M18_beaconKeyMaterials(software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials value) { @@ -287,7 +287,7 @@ public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_GetBeaconKeyOutput__M18_beaconKeyMaterials(AWS.Cryptography.KeyStore.BeaconKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials((AWS.Cryptography.KeyStore.BeaconKeyMaterials)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -295,7 +295,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBra } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M16_branchKeyVersion(Dafny.ISequence value) { @@ -303,7 +303,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBra } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M16_branchKeyVersion(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12_cryptography__N8_keyStore__S25_GetBranchKeyVersionOutput__M18_branchKeyMaterials(software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials value) { @@ -311,7 +311,7 @@ public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials ToDafny_N3_aws__N12_cryptography__N8_keyStore__S25_GetBranchKeyVersionOutput__M18_branchKeyMaterials(AWS.Cryptography.KeyStore.BranchKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials((AWS.Cryptography.KeyStore.BranchKeyMaterials)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M10_keyStoreId(Dafny.ISequence value) { @@ -319,7 +319,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKey } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M10_keyStoreId(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M12_keyStoreName(Dafny.ISequence value) { @@ -327,7 +327,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKey } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M12_keyStoreName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M19_logicalKeyStoreName(Dafny.ISequence value) { @@ -335,7 +335,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKey } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M19_logicalKeyStoreName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M11_grantTokens(Dafny.ISequence> value) { @@ -343,7 +343,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M11_grantTokens(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantTokenList(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantTokenList((System.Collections.Generic.List)value); } public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M16_kmsConfiguration(software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration value) { @@ -351,7 +351,7 @@ public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M16_kmsConfiguration(AWS.Cryptography.KeyStore.KMSConfiguration value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration((AWS.Cryptography.KeyStore.KMSConfiguration)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M12_ddbTableName(Dafny.ISequence value) { @@ -359,7 +359,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeySto } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M12_ddbTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M16_kmsConfiguration(software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration value) { @@ -367,7 +367,7 @@ public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M16_kmsConfiguration(AWS.Cryptography.KeyStore.KMSConfiguration value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration((AWS.Cryptography.KeyStore.KMSConfiguration)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M19_logicalKeyStoreName(Dafny.ISequence value) { @@ -375,7 +375,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeySto } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M19_logicalKeyStoreName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M2_id(Wrappers_Compile._IOption> value) { @@ -415,7 +415,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_KeySto } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_KeyStoreException__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(Dafny.ISequence value) { @@ -423,7 +423,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSCon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(Dafny.ISequence value) { @@ -431,7 +431,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSCon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static AWS.Cryptography.KeyStore.Discovery FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(software.amazon.cryptography.keystore.internaldafny.types._IDiscovery value) { @@ -439,7 +439,7 @@ public static AWS.Cryptography.KeyStore.Discovery FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.keystore.internaldafny.types._IDiscovery ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(AWS.Cryptography.KeyStore.Discovery value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Discovery(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Discovery((AWS.Cryptography.KeyStore.Discovery)value); } public static AWS.Cryptography.KeyStore.MRDiscovery FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(software.amazon.cryptography.keystore.internaldafny.types._IMRDiscovery value) { @@ -447,7 +447,7 @@ public static AWS.Cryptography.KeyStore.MRDiscovery FromDafny_N3_aws__N12_crypto } public static software.amazon.cryptography.keystore.internaldafny.types._IMRDiscovery ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(AWS.Cryptography.KeyStore.MRDiscovery value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery((AWS.Cryptography.KeyStore.MRDiscovery)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S15_VersionKeyInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -455,7 +455,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S15_Versio } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S15_VersionKeyInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N6_smithy__N3_api__S6_String(Dafny.ISequence value) { @@ -580,7 +580,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M3_key(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(Dafny.ISequence value) { @@ -588,7 +588,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -596,7 +596,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(Dafny.ISequence value) { @@ -604,7 +604,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -612,7 +612,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(Dafny.ISequence value) { @@ -620,7 +620,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(Dafny.ISequence value) { @@ -628,7 +628,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Beacon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -636,7 +636,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M9_beaconKey(Wrappers_Compile._IOption> value) { @@ -660,7 +660,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantT } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantTokenList__M6_member(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery__M6_region(Dafny.ISequence value) { @@ -668,7 +668,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDisc } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery__M6_region(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType((string)value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(Dafny.ISequence value) { @@ -717,7 +717,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKe } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M3_key(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(Dafny.ISequence value) { @@ -725,7 +725,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); } public static System.Exception FromDafny_CommonError(software.amazon.cryptography.keystore.internaldafny.types._IError value) { diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/client.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/client.py index f35f125629..fc64f9d019 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/client.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/client.py @@ -224,7 +224,11 @@ def _handle_execution( transport_request=None, transport_response=None, ) - _client_interceptors = config.interceptors + try: + _client_interceptors = config.interceptors + except AttributeError: + config.interceptors = [] + _client_interceptors = config.interceptors client_interceptors = cast( list[Interceptor[Input, Output, DafnyRequest, DafnyResponse]], _client_interceptors, diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py index c79bcff34a..3ea1005114 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py @@ -55,7 +55,7 @@ def __init__( class KeyStoreConfig(Config): - ddb_table_name: str + ddb_table_name: dict[str, Any] kms_configuration: KMSConfiguration logical_key_store_name: str id: Optional[str] @@ -66,7 +66,7 @@ class KeyStoreConfig(Config): def __init__( self, *, - ddb_table_name: str, + ddb_table_name: dict[str, Any], kms_configuration: KMSConfiguration, logical_key_store_name: str, id: Optional[str] = None, diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py index 665891aad1..382fa332bd 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py @@ -280,12 +280,12 @@ def __eq__(self, other: Any) -> bool: class CreateKeyStoreOutput: - table_arn: str + table_arn: dict[str, Any] def __init__( self, *, - table_arn: str, + table_arn: dict[str, Any], ): """Outputs for Key Store DynamoDB table creation. @@ -640,12 +640,12 @@ def __eq__(self, other: Any) -> bool: class MRDiscovery: - region: str + region: dict[str, Any] def __init__( self, *, - region: str, + region: dict[str, Any], ): """ :param region: Any MRK ARN discovered will have its region replaced with this. @@ -699,7 +699,7 @@ class KMSConfigurationKmsKeyArn: MUST strictly equal this value to be considered valid. """ - def __init__(self, value: str): + def __init__(self, value: "dict[str, Any]"): if (value is not None) and (len(value) < 1): raise ValueError("The size of value must be greater than or equal to 1") @@ -736,7 +736,7 @@ class KMSConfigurationKmsMRKeyArn: as kmsKeyArn. """ - def __init__(self, value: str): + def __init__(self, value: "dict[str, Any]"): if (value is not None) and (len(value) < 1): raise ValueError("The size of value must be greater than or equal to 1") @@ -881,7 +881,7 @@ def _kms_configuration_from_dict(d: Dict[str, Any]) -> KMSConfiguration: class GetKeyStoreInfoOutput: key_store_id: str - key_store_name: str + key_store_name: dict[str, Any] logical_key_store_name: str grant_tokens: list[str] kms_configuration: KMSConfiguration @@ -890,7 +890,7 @@ def __init__( self, *, key_store_id: str, - key_store_name: str, + key_store_name: dict[str, Any], logical_key_store_name: str, grant_tokens: list[str], kms_configuration: KMSConfiguration, diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/client.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/client.py index 866be97501..fc839704f6 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/client.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/client.py @@ -666,7 +666,11 @@ def _handle_execution( transport_request=None, transport_response=None, ) - _client_interceptors = config.interceptors + try: + _client_interceptors = config.interceptors + except AttributeError: + config.interceptors = [] + _client_interceptors = config.interceptors client_interceptors = cast( list[Interceptor[Input, Output, DafnyRequest, DafnyResponse]], _client_interceptors, diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py index 1202708e72..0ea76a3ebe 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py @@ -3059,7 +3059,7 @@ def __eq__(self, other: Any) -> bool: class CreateAwsKmsRsaKeyringInput: public_key: Optional[bytes | bytearray] kms_key_id: str - encryption_algorithm: str + encryption_algorithm: dict[str, Any] kms_client: Optional[BaseClient] grant_tokens: Optional[list[str]] @@ -3067,7 +3067,7 @@ def __init__( self, *, kms_key_id: str, - encryption_algorithm: str, + encryption_algorithm: dict[str, Any], public_key: Optional[bytes | bytearray] = None, kms_client: Optional[BaseClient] = None, grant_tokens: Optional[list[str]] = None, diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java index febc571321..e4aa5f87c4 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java @@ -3,22 +3,24 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; +import java.util.Objects; + public class AES_CTR { - private final int keyLength; + private final Integer keyLength; - private final int nonceLength; + private final Integer nonceLength; protected AES_CTR(BuilderImpl builder) { this.keyLength = builder.keyLength(); this.nonceLength = builder.nonceLength(); } - public int keyLength() { + public Integer keyLength() { return this.keyLength; } - public int nonceLength() { + public Integer nonceLength() { return this.nonceLength; } @@ -31,83 +33,75 @@ public static Builder builder() { } public interface Builder { - Builder keyLength(int keyLength); + Builder keyLength(Integer keyLength); - int keyLength(); + Integer keyLength(); - Builder nonceLength(int nonceLength); + Builder nonceLength(Integer nonceLength); - int nonceLength(); + Integer nonceLength(); AES_CTR build(); } static class BuilderImpl implements Builder { - protected int keyLength; - - private boolean _keyLengthSet = false; - - protected int nonceLength; + protected Integer keyLength; - private boolean _nonceLengthSet = false; + protected Integer nonceLength; protected BuilderImpl() {} protected BuilderImpl(AES_CTR model) { this.keyLength = model.keyLength(); - this._keyLengthSet = true; this.nonceLength = model.nonceLength(); - this._nonceLengthSet = true; } - public Builder keyLength(int keyLength) { + public Builder keyLength(Integer keyLength) { this.keyLength = keyLength; - this._keyLengthSet = true; return this; } - public int keyLength() { + public Integer keyLength() { return this.keyLength; } - public Builder nonceLength(int nonceLength) { + public Builder nonceLength(Integer nonceLength) { this.nonceLength = nonceLength; - this._nonceLengthSet = true; return this; } - public int nonceLength() { + public Integer nonceLength() { return this.nonceLength; } public AES_CTR build() { - if (!this._keyLengthSet) { + if (Objects.isNull(this.keyLength())) { throw new IllegalArgumentException( "Missing value for required field `keyLength`" ); } - if (this._keyLengthSet && this.keyLength() < 1) { + if (Objects.nonNull(this.keyLength()) && this.keyLength() < 1) { throw new IllegalArgumentException( "`keyLength` must be greater than or equal to 1" ); } - if (this._keyLengthSet && this.keyLength() > 32) { + if (Objects.nonNull(this.keyLength()) && this.keyLength() > 32) { throw new IllegalArgumentException( "`keyLength` must be less than or equal to 32." ); } - if (!this._nonceLengthSet) { + if (Objects.isNull(this.nonceLength())) { throw new IllegalArgumentException( "Missing value for required field `nonceLength`" ); } - if (this._nonceLengthSet && this.nonceLength() < 0) { + if (Objects.nonNull(this.nonceLength()) && this.nonceLength() < 0) { throw new IllegalArgumentException( "`nonceLength` must be greater than or equal to 0" ); } - if (this._nonceLengthSet && this.nonceLength() > 255) { + if (Objects.nonNull(this.nonceLength()) && this.nonceLength() > 255) { throw new IllegalArgumentException( "`nonceLength` must be less than or equal to 255." ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java index 9c89d9d4f9..4bee027cab 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java @@ -3,13 +3,15 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; +import java.util.Objects; + public class AES_GCM { - private final int keyLength; + private final Integer keyLength; - private final int tagLength; + private final Integer tagLength; - private final int ivLength; + private final Integer ivLength; protected AES_GCM(BuilderImpl builder) { this.keyLength = builder.keyLength(); @@ -17,15 +19,15 @@ protected AES_GCM(BuilderImpl builder) { this.ivLength = builder.ivLength(); } - public int keyLength() { + public Integer keyLength() { return this.keyLength; } - public int tagLength() { + public Integer tagLength() { return this.tagLength; } - public int ivLength() { + public Integer ivLength() { return this.ivLength; } @@ -38,118 +40,106 @@ public static Builder builder() { } public interface Builder { - Builder keyLength(int keyLength); + Builder keyLength(Integer keyLength); - int keyLength(); + Integer keyLength(); - Builder tagLength(int tagLength); + Builder tagLength(Integer tagLength); - int tagLength(); + Integer tagLength(); - Builder ivLength(int ivLength); + Builder ivLength(Integer ivLength); - int ivLength(); + Integer ivLength(); AES_GCM build(); } static class BuilderImpl implements Builder { - protected int keyLength; - - private boolean _keyLengthSet = false; - - protected int tagLength; - - private boolean _tagLengthSet = false; + protected Integer keyLength; - protected int ivLength; + protected Integer tagLength; - private boolean _ivLengthSet = false; + protected Integer ivLength; protected BuilderImpl() {} protected BuilderImpl(AES_GCM model) { this.keyLength = model.keyLength(); - this._keyLengthSet = true; this.tagLength = model.tagLength(); - this._tagLengthSet = true; this.ivLength = model.ivLength(); - this._ivLengthSet = true; } - public Builder keyLength(int keyLength) { + public Builder keyLength(Integer keyLength) { this.keyLength = keyLength; - this._keyLengthSet = true; return this; } - public int keyLength() { + public Integer keyLength() { return this.keyLength; } - public Builder tagLength(int tagLength) { + public Builder tagLength(Integer tagLength) { this.tagLength = tagLength; - this._tagLengthSet = true; return this; } - public int tagLength() { + public Integer tagLength() { return this.tagLength; } - public Builder ivLength(int ivLength) { + public Builder ivLength(Integer ivLength) { this.ivLength = ivLength; - this._ivLengthSet = true; return this; } - public int ivLength() { + public Integer ivLength() { return this.ivLength; } public AES_GCM build() { - if (!this._keyLengthSet) { + if (Objects.isNull(this.keyLength())) { throw new IllegalArgumentException( "Missing value for required field `keyLength`" ); } - if (this._keyLengthSet && this.keyLength() < 1) { + if (Objects.nonNull(this.keyLength()) && this.keyLength() < 1) { throw new IllegalArgumentException( "`keyLength` must be greater than or equal to 1" ); } - if (this._keyLengthSet && this.keyLength() > 32) { + if (Objects.nonNull(this.keyLength()) && this.keyLength() > 32) { throw new IllegalArgumentException( "`keyLength` must be less than or equal to 32." ); } - if (!this._tagLengthSet) { + if (Objects.isNull(this.tagLength())) { throw new IllegalArgumentException( "Missing value for required field `tagLength`" ); } - if (this._tagLengthSet && this.tagLength() < 0) { + if (Objects.nonNull(this.tagLength()) && this.tagLength() < 0) { throw new IllegalArgumentException( "`tagLength` must be greater than or equal to 0" ); } - if (this._tagLengthSet && this.tagLength() > 32) { + if (Objects.nonNull(this.tagLength()) && this.tagLength() > 32) { throw new IllegalArgumentException( "`tagLength` must be less than or equal to 32." ); } - if (!this._ivLengthSet) { + if (Objects.isNull(this.ivLength())) { throw new IllegalArgumentException( "Missing value for required field `ivLength`" ); } - if (this._ivLengthSet && this.ivLength() < 0) { + if (Objects.nonNull(this.ivLength()) && this.ivLength() < 0) { throw new IllegalArgumentException( "`ivLength` must be greater than or equal to 0" ); } - if (this._ivLengthSet && this.ivLength() > 255) { + if (Objects.nonNull(this.ivLength()) && this.ivLength() > 255) { throw new IllegalArgumentException( "`ivLength` must be less than or equal to 255." ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java index 1bb9d4dfb7..11e7780ed9 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java @@ -10,7 +10,7 @@ public class AesKdfCtrInput { private final ByteBuffer ikm; - private final int expectedLength; + private final Integer expectedLength; private final ByteBuffer nonce; @@ -24,7 +24,7 @@ public ByteBuffer ikm() { return this.ikm; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -45,9 +45,9 @@ public interface Builder { ByteBuffer ikm(); - Builder expectedLength(int expectedLength); + Builder expectedLength(Integer expectedLength); - int expectedLength(); + Integer expectedLength(); Builder nonce(ByteBuffer nonce); @@ -60,9 +60,7 @@ static class BuilderImpl implements Builder { protected ByteBuffer ikm; - protected int expectedLength; - - private boolean _expectedLengthSet = false; + protected Integer expectedLength; protected ByteBuffer nonce; @@ -71,7 +69,6 @@ protected BuilderImpl() {} protected BuilderImpl(AesKdfCtrInput model) { this.ikm = model.ikm(); this.expectedLength = model.expectedLength(); - this._expectedLengthSet = true; this.nonce = model.nonce(); } @@ -84,13 +81,12 @@ public ByteBuffer ikm() { return this.ikm; } - public Builder expectedLength(int expectedLength) { + public Builder expectedLength(Integer expectedLength) { this.expectedLength = expectedLength; - this._expectedLengthSet = true; return this; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -109,12 +105,12 @@ public AesKdfCtrInput build() { "Missing value for required field `ikm`" ); } - if (!this._expectedLengthSet) { + if (Objects.isNull(this.expectedLength())) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (this._expectedLengthSet && this.expectedLength() < 0) { + if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java index fefd30a6ec..81fe465513 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java @@ -3,15 +3,17 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; +import java.util.Objects; + public class GenerateRSAKeyPairInput { - private final int lengthBits; + private final Integer lengthBits; protected GenerateRSAKeyPairInput(BuilderImpl builder) { this.lengthBits = builder.lengthBits(); } - public int lengthBits() { + public Integer lengthBits() { return this.lengthBits; } @@ -24,48 +26,44 @@ public static Builder builder() { } public interface Builder { - Builder lengthBits(int lengthBits); + Builder lengthBits(Integer lengthBits); - int lengthBits(); + Integer lengthBits(); GenerateRSAKeyPairInput build(); } static class BuilderImpl implements Builder { - protected int lengthBits; - - private boolean _lengthBitsSet = false; + protected Integer lengthBits; protected BuilderImpl() {} protected BuilderImpl(GenerateRSAKeyPairInput model) { this.lengthBits = model.lengthBits(); - this._lengthBitsSet = true; } - public Builder lengthBits(int lengthBits) { + public Builder lengthBits(Integer lengthBits) { this.lengthBits = lengthBits; - this._lengthBitsSet = true; return this; } - public int lengthBits() { + public Integer lengthBits() { return this.lengthBits; } public GenerateRSAKeyPairInput build() { - if (!this._lengthBitsSet) { + if (Objects.isNull(this.lengthBits())) { throw new IllegalArgumentException( "Missing value for required field `lengthBits`" ); } - if (this._lengthBitsSet && this.lengthBits() < 81) { + if (Objects.nonNull(this.lengthBits()) && this.lengthBits() < 81) { throw new IllegalArgumentException( "`lengthBits` must be greater than or equal to 81" ); } - if (this._lengthBitsSet && this.lengthBits() > 4096) { + if (Objects.nonNull(this.lengthBits()) && this.lengthBits() > 4096) { throw new IllegalArgumentException( "`lengthBits` must be less than or equal to 4096." ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java index 7e1a286ee0..c608275fee 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java @@ -3,15 +3,17 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; +import java.util.Objects; + public class GenerateRandomBytesInput { - private final int length; + private final Integer length; protected GenerateRandomBytesInput(BuilderImpl builder) { this.length = builder.length(); } - public int length() { + public Integer length() { return this.length; } @@ -24,43 +26,39 @@ public static Builder builder() { } public interface Builder { - Builder length(int length); + Builder length(Integer length); - int length(); + Integer length(); GenerateRandomBytesInput build(); } static class BuilderImpl implements Builder { - protected int length; - - private boolean _lengthSet = false; + protected Integer length; protected BuilderImpl() {} protected BuilderImpl(GenerateRandomBytesInput model) { this.length = model.length(); - this._lengthSet = true; } - public Builder length(int length) { + public Builder length(Integer length) { this.length = length; - this._lengthSet = true; return this; } - public int length() { + public Integer length() { return this.length; } public GenerateRandomBytesInput build() { - if (!this._lengthSet) { + if (Objects.isNull(this.length())) { throw new IllegalArgumentException( "Missing value for required field `length`" ); } - if (this._lengthSet && this.length() < 0) { + if (Objects.nonNull(this.length()) && this.length() < 0) { throw new IllegalArgumentException( "`length` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java index 7834706ede..e830e8a141 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java @@ -3,15 +3,17 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; +import java.util.Objects; + public class GetRSAKeyModulusLengthOutput { - private final int length; + private final Integer length; protected GetRSAKeyModulusLengthOutput(BuilderImpl builder) { this.length = builder.length(); } - public int length() { + public Integer length() { return this.length; } @@ -24,43 +26,39 @@ public static Builder builder() { } public interface Builder { - Builder length(int length); + Builder length(Integer length); - int length(); + Integer length(); GetRSAKeyModulusLengthOutput build(); } static class BuilderImpl implements Builder { - protected int length; - - private boolean _lengthSet = false; + protected Integer length; protected BuilderImpl() {} protected BuilderImpl(GetRSAKeyModulusLengthOutput model) { this.length = model.length(); - this._lengthSet = true; } - public Builder length(int length) { + public Builder length(Integer length) { this.length = length; - this._lengthSet = true; return this; } - public int length() { + public Integer length() { return this.length; } public GetRSAKeyModulusLengthOutput build() { - if (!this._lengthSet) { + if (Objects.isNull(this.length())) { throw new IllegalArgumentException( "Missing value for required field `length`" ); } - if (this._lengthSet && this.length() < 81) { + if (Objects.nonNull(this.length()) && this.length() < 81) { throw new IllegalArgumentException( "`length` must be greater than or equal to 81" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java index b9e521089a..3c2a1a120f 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java @@ -14,7 +14,7 @@ public class HkdfExpandInput { private final ByteBuffer info; - private final int expectedLength; + private final Integer expectedLength; protected HkdfExpandInput(BuilderImpl builder) { this.digestAlgorithm = builder.digestAlgorithm(); @@ -35,7 +35,7 @@ public ByteBuffer info() { return this.info; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -60,9 +60,9 @@ public interface Builder { ByteBuffer info(); - Builder expectedLength(int expectedLength); + Builder expectedLength(Integer expectedLength); - int expectedLength(); + Integer expectedLength(); HkdfExpandInput build(); } @@ -75,9 +75,7 @@ static class BuilderImpl implements Builder { protected ByteBuffer info; - protected int expectedLength; - - private boolean _expectedLengthSet = false; + protected Integer expectedLength; protected BuilderImpl() {} @@ -86,7 +84,6 @@ protected BuilderImpl(HkdfExpandInput model) { this.prk = model.prk(); this.info = model.info(); this.expectedLength = model.expectedLength(); - this._expectedLengthSet = true; } public Builder digestAlgorithm(DigestAlgorithm digestAlgorithm) { @@ -116,13 +113,12 @@ public ByteBuffer info() { return this.info; } - public Builder expectedLength(int expectedLength) { + public Builder expectedLength(Integer expectedLength) { this.expectedLength = expectedLength; - this._expectedLengthSet = true; return this; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -142,12 +138,12 @@ public HkdfExpandInput build() { "Missing value for required field `info`" ); } - if (!this._expectedLengthSet) { + if (Objects.isNull(this.expectedLength())) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (this._expectedLengthSet && this.expectedLength() < 0) { + if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java index 6273a179fe..722bd9d00f 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java @@ -16,7 +16,7 @@ public class HkdfInput { private final ByteBuffer info; - private final int expectedLength; + private final Integer expectedLength; protected HkdfInput(BuilderImpl builder) { this.digestAlgorithm = builder.digestAlgorithm(); @@ -42,7 +42,7 @@ public ByteBuffer info() { return this.info; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -71,9 +71,9 @@ public interface Builder { ByteBuffer info(); - Builder expectedLength(int expectedLength); + Builder expectedLength(Integer expectedLength); - int expectedLength(); + Integer expectedLength(); HkdfInput build(); } @@ -88,9 +88,7 @@ static class BuilderImpl implements Builder { protected ByteBuffer info; - protected int expectedLength; - - private boolean _expectedLengthSet = false; + protected Integer expectedLength; protected BuilderImpl() {} @@ -100,7 +98,6 @@ protected BuilderImpl(HkdfInput model) { this.ikm = model.ikm(); this.info = model.info(); this.expectedLength = model.expectedLength(); - this._expectedLengthSet = true; } public Builder digestAlgorithm(DigestAlgorithm digestAlgorithm) { @@ -139,13 +136,12 @@ public ByteBuffer info() { return this.info; } - public Builder expectedLength(int expectedLength) { + public Builder expectedLength(Integer expectedLength) { this.expectedLength = expectedLength; - this._expectedLengthSet = true; return this; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -165,12 +161,12 @@ public HkdfInput build() { "Missing value for required field `info`" ); } - if (!this._expectedLengthSet) { + if (Objects.isNull(this.expectedLength())) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (this._expectedLengthSet && this.expectedLength() < 0) { + if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java index a6769b03b2..22ab7da5b2 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java @@ -12,7 +12,7 @@ public class KdfCtrInput { private final ByteBuffer ikm; - private final int expectedLength; + private final Integer expectedLength; private final ByteBuffer purpose; @@ -34,7 +34,7 @@ public ByteBuffer ikm() { return this.ikm; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -63,9 +63,9 @@ public interface Builder { ByteBuffer ikm(); - Builder expectedLength(int expectedLength); + Builder expectedLength(Integer expectedLength); - int expectedLength(); + Integer expectedLength(); Builder purpose(ByteBuffer purpose); @@ -84,9 +84,7 @@ static class BuilderImpl implements Builder { protected ByteBuffer ikm; - protected int expectedLength; - - private boolean _expectedLengthSet = false; + protected Integer expectedLength; protected ByteBuffer purpose; @@ -98,7 +96,6 @@ protected BuilderImpl(KdfCtrInput model) { this.digestAlgorithm = model.digestAlgorithm(); this.ikm = model.ikm(); this.expectedLength = model.expectedLength(); - this._expectedLengthSet = true; this.purpose = model.purpose(); this.nonce = model.nonce(); } @@ -121,13 +118,12 @@ public ByteBuffer ikm() { return this.ikm; } - public Builder expectedLength(int expectedLength) { + public Builder expectedLength(Integer expectedLength) { this.expectedLength = expectedLength; - this._expectedLengthSet = true; return this; } - public int expectedLength() { + public Integer expectedLength() { return this.expectedLength; } @@ -160,12 +156,12 @@ public KdfCtrInput build() { "Missing value for required field `ikm`" ); } - if (!this._expectedLengthSet) { + if (Objects.isNull(this.expectedLength())) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (this._expectedLengthSet && this.expectedLength() < 0) { + if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java index de127e1b72..4a4aab25ab 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java @@ -8,7 +8,7 @@ public class RSAPrivateKey { - private final int lengthBits; + private final Integer lengthBits; private final ByteBuffer pem; @@ -17,7 +17,7 @@ protected RSAPrivateKey(BuilderImpl builder) { this.pem = builder.pem(); } - public int lengthBits() { + public Integer lengthBits() { return this.lengthBits; } @@ -34,9 +34,9 @@ public static Builder builder() { } public interface Builder { - Builder lengthBits(int lengthBits); + Builder lengthBits(Integer lengthBits); - int lengthBits(); + Integer lengthBits(); Builder pem(ByteBuffer pem); @@ -47,9 +47,7 @@ public interface Builder { static class BuilderImpl implements Builder { - protected int lengthBits; - - private boolean _lengthBitsSet = false; + protected Integer lengthBits; protected ByteBuffer pem; @@ -57,17 +55,15 @@ protected BuilderImpl() {} protected BuilderImpl(RSAPrivateKey model) { this.lengthBits = model.lengthBits(); - this._lengthBitsSet = true; this.pem = model.pem(); } - public Builder lengthBits(int lengthBits) { + public Builder lengthBits(Integer lengthBits) { this.lengthBits = lengthBits; - this._lengthBitsSet = true; return this; } - public int lengthBits() { + public Integer lengthBits() { return this.lengthBits; } @@ -81,12 +77,12 @@ public ByteBuffer pem() { } public RSAPrivateKey build() { - if (!this._lengthBitsSet) { + if (Objects.isNull(this.lengthBits())) { throw new IllegalArgumentException( "Missing value for required field `lengthBits`" ); } - if (this._lengthBitsSet && this.lengthBits() < 81) { + if (Objects.nonNull(this.lengthBits()) && this.lengthBits() < 81) { throw new IllegalArgumentException( "`lengthBits` must be greater than or equal to 81" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java index 1879f4dc95..2b7656920e 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java @@ -8,7 +8,7 @@ public class RSAPublicKey { - private final int lengthBits; + private final Integer lengthBits; private final ByteBuffer pem; @@ -17,7 +17,7 @@ protected RSAPublicKey(BuilderImpl builder) { this.pem = builder.pem(); } - public int lengthBits() { + public Integer lengthBits() { return this.lengthBits; } @@ -34,9 +34,9 @@ public static Builder builder() { } public interface Builder { - Builder lengthBits(int lengthBits); + Builder lengthBits(Integer lengthBits); - int lengthBits(); + Integer lengthBits(); Builder pem(ByteBuffer pem); @@ -47,9 +47,7 @@ public interface Builder { static class BuilderImpl implements Builder { - protected int lengthBits; - - private boolean _lengthBitsSet = false; + protected Integer lengthBits; protected ByteBuffer pem; @@ -57,17 +55,15 @@ protected BuilderImpl() {} protected BuilderImpl(RSAPublicKey model) { this.lengthBits = model.lengthBits(); - this._lengthBitsSet = true; this.pem = model.pem(); } - public Builder lengthBits(int lengthBits) { + public Builder lengthBits(Integer lengthBits) { this.lengthBits = lengthBits; - this._lengthBitsSet = true; return this; } - public int lengthBits() { + public Integer lengthBits() { return this.lengthBits; } @@ -81,12 +77,12 @@ public ByteBuffer pem() { } public RSAPublicKey build() { - if (!this._lengthBitsSet) { + if (Objects.isNull(this.lengthBits())) { throw new IllegalArgumentException( "Missing value for required field `lengthBits`" ); } - if (this._lengthBitsSet && this.lengthBits() < 81) { + if (Objects.nonNull(this.lengthBits()) && this.lengthBits() < 81) { throw new IllegalArgumentException( "`lengthBits` must be greater than or equal to 81" ); diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs index b217f19a5b..dd7dd6b752 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs @@ -138,7 +138,7 @@ public System.IO.MemoryStream ECDSASign(AWS.Cryptography.Primitives.ECDSASignInp if (result.is_Failure) throw TypeConversion.FromDafny_CommonError(result.dtor_error); return TypeConversion.FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_ECDSASignOutput(result.dtor_value); } - public bool ECDSAVerify(AWS.Cryptography.Primitives.ECDSAVerifyInput input) + public bool? ECDSAVerify(AWS.Cryptography.Primitives.ECDSAVerifyInput input) { software.amazon.cryptography.primitives.internaldafny.types._IECDSAVerifyInput internalInput = TypeConversion.ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput(input); Wrappers_Compile._IResult result = _impl.ECDSAVerify(internalInput); diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs index 83071c6b61..ab262dc31a 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs @@ -260,11 +260,11 @@ public static software.amazon.cryptography.primitives.internaldafny.types._IECDS return new software.amazon.cryptography.primitives.internaldafny.types.ECDSAVerifyInput(ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M18_signatureAlgorithm(value.SignatureAlgorithm), ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M15_verificationKey(value.VerificationKey), ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M7_message(value.Message), ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M9_signature(value.Signature)); } - public static bool FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool value) + public static bool? FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(value); } - public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool value) + public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool? value) { return ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(value); } @@ -605,7 +605,7 @@ public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M6_encAlg(AWS.Cryptography.Primitives.AES_GCM value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM((AWS.Cryptography.Primitives.AES_GCM)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_key(Dafny.ISequence value) { @@ -613,7 +613,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_key(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M9_cipherTxt(Dafny.ISequence value) { @@ -621,7 +621,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M9_cipherTxt(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M7_authTag(Dafny.ISequence value) { @@ -629,7 +629,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M7_authTag(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M2_iv(Dafny.ISequence value) { @@ -637,7 +637,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M2_iv(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_aad(Dafny.ISequence value) { @@ -645,7 +645,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_aad(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESDecryptOutput__M9_plaintext(Dafny.ISequence value) { @@ -653,7 +653,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESDecryptOutput__M9_plaintext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M6_encAlg(software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM value) { @@ -661,7 +661,7 @@ public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M6_encAlg(AWS.Cryptography.Primitives.AES_GCM value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM((AWS.Cryptography.Primitives.AES_GCM)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M2_iv(Dafny.ISequence value) { @@ -669,7 +669,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M2_iv(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_key(Dafny.ISequence value) { @@ -677,7 +677,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_key(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_msg(Dafny.ISequence value) { @@ -685,7 +685,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_msg(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_aad(Dafny.ISequence value) { @@ -693,7 +693,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_aad(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M10_cipherText(Dafny.ISequence value) { @@ -701,7 +701,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M10_cipherText(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M7_authTag(Dafny.ISequence value) { @@ -709,7 +709,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M7_authTag(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M3_ikm(Dafny.ISequence value) { @@ -717,15 +717,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M5_nonce(Wrappers_Compile._IOption> value) { @@ -741,7 +741,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AesKdfCtrOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static string FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_AwsCryptographicPrimitivesError__M7_message(Dafny.ISequence value) { @@ -749,7 +749,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_Aws } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_AwsCryptographicPrimitivesError__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String(value); + return ToDafny_N6_smithy__N3_api__S6_String((string)value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -757,7 +757,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -765,7 +765,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_CompressPublicKeyOutput__M19_compressedPublicKey(Dafny.ISequence value) { @@ -773,7 +773,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_CompressPublicKeyOutput__M19_compressedPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M19_compressedPublicKey(Dafny.ISequence value) { @@ -781,7 +781,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M19_compressedPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -789,7 +789,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S25_DecompressPublicKeyOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -797,7 +797,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S25_DecompressPublicKeyOutput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -805,7 +805,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -813,7 +813,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -821,7 +821,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_DeriveSharedSecretOutput__M12_sharedSecret(Dafny.ISequence value) { @@ -829,7 +829,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_DeriveSharedSecretOutput__M12_sharedSecret(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -837,7 +837,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M7_message(Dafny.ISequence value) { @@ -845,7 +845,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_DigestOutput__M6_digest(Dafny.ISequence value) { @@ -853,7 +853,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_DigestOutput__M6_digest(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -861,7 +861,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M10_signingKey(Dafny.ISequence value) { @@ -869,7 +869,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M10_signingKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M7_message(Dafny.ISequence value) { @@ -877,7 +877,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_ECDSASignOutput__M9_signature(Dafny.ISequence value) { @@ -885,7 +885,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_ECDSASignOutput__M9_signature(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -893,7 +893,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M15_verificationKey(Dafny.ISequence value) { @@ -901,7 +901,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M15_verificationKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M7_message(Dafny.ISequence value) { @@ -909,7 +909,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M9_signature(Dafny.ISequence value) { @@ -917,15 +917,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M9_signature(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static bool FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool value) + public static bool? FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool value) { return FromDafny_N6_smithy__N3_api__S7_Boolean(value); } - public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool value) + public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool? value) { - return ToDafny_N6_smithy__N3_api__S7_Boolean(value); + return ToDafny_N6_smithy__N3_api__S7_Boolean((bool)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateECCKeyPairInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -933,7 +933,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateECCKeyPairInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -941,7 +941,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -949,7 +949,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -957,7 +957,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S30_GenerateECDSASignatureKeyInput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -965,7 +965,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S30_GenerateECDSASignatureKeyInput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -973,7 +973,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M15_verificationKey(Dafny.ISequence value) { @@ -981,7 +981,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M15_verificationKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M10_signingKey(Dafny.ISequence value) { @@ -989,15 +989,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M10_signingKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S25_GenerateRandomBytesOutput__M4_data(Dafny.ISequence value) { @@ -1005,15 +1005,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S25_GenerateRandomBytesOutput__M4_data(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S30_RSAModulusLengthBitsToGenerate(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S30_RSAModulusLengthBitsToGenerate(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S30_RSAModulusLengthBitsToGenerate((int)value); } public static AWS.Cryptography.Primitives.RSAPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IRSAPublicKey value) { @@ -1021,7 +1021,7 @@ public static AWS.Cryptography.Primitives.RSAPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M9_publicKey(AWS.Cryptography.Primitives.RSAPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey((AWS.Cryptography.Primitives.RSAPublicKey)value); } public static AWS.Cryptography.Primitives.RSAPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IRSAPrivateKey value) { @@ -1029,7 +1029,7 @@ public static AWS.Cryptography.Primitives.RSAPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M10_privateKey(AWS.Cryptography.Primitives.RSAPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey((AWS.Cryptography.Primitives.RSAPrivateKey)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1037,7 +1037,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -1045,7 +1045,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1053,7 +1053,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -1061,7 +1061,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M9_publicKey(Dafny.ISequence value) { @@ -1069,7 +1069,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S27_GetRSAKeyModulusLengthInput__M9_publicKey(Dafny.ISequence value) { @@ -1077,15 +1077,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S27_GetRSAKeyModulusLengthInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits((int)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1093,7 +1093,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M3_prk(Dafny.ISequence value) { @@ -1101,7 +1101,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M3_prk(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M4_info(Dafny.ISequence value) { @@ -1109,15 +1109,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M4_info(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExpandOutput__M3_okm(Dafny.ISequence value) { @@ -1125,7 +1125,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExpandOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1133,7 +1133,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M4_salt(Wrappers_Compile._IOption> value) { @@ -1149,7 +1149,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_HkdfExtractOutput__M3_prk(Dafny.ISequence value) { @@ -1157,7 +1157,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_HkdfExtractOutput__M3_prk(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1165,7 +1165,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M4_salt(Wrappers_Compile._IOption> value) { @@ -1181,7 +1181,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M4_info(Dafny.ISequence value) { @@ -1189,15 +1189,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M4_info(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_HkdfOutput__M3_okm(Dafny.ISequence value) { @@ -1205,7 +1205,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_HkdfOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1213,7 +1213,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M3_key(Dafny.ISequence value) { @@ -1221,7 +1221,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M3_key(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M7_message(Dafny.ISequence value) { @@ -1229,7 +1229,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_HMacOutput__M6_digest(Dafny.ISequence value) { @@ -1237,7 +1237,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_HMacOutput__M6_digest(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1245,7 +1245,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M3_ikm(Dafny.ISequence value) { @@ -1253,15 +1253,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M7_purpose(Wrappers_Compile._IOption> value) { @@ -1285,7 +1285,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_KdfCtrOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S19_ParsePublicKeyInput__M9_publicKey(Dafny.ISequence value) { @@ -1293,7 +1293,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S19_ParsePublicKeyInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_ParsePublicKeyOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -1301,7 +1301,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_ParsePublicKeyOutput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); } public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M7_padding(software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode value) { @@ -1309,7 +1309,7 @@ public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M7_padding(AWS.Cryptography.Primitives.RSAPaddingMode value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode((AWS.Cryptography.Primitives.RSAPaddingMode)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_privateKey(Dafny.ISequence value) { @@ -1317,7 +1317,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_privateKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_cipherText(Dafny.ISequence value) { @@ -1325,7 +1325,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_cipherText(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSADecryptOutput__M9_plaintext(Dafny.ISequence value) { @@ -1333,7 +1333,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSADecryptOutput__M9_plaintext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M7_padding(software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode value) { @@ -1341,7 +1341,7 @@ public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M7_padding(AWS.Cryptography.Primitives.RSAPaddingMode value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode((AWS.Cryptography.Primitives.RSAPaddingMode)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_publicKey(Dafny.ISequence value) { @@ -1349,7 +1349,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_plaintext(Dafny.ISequence value) { @@ -1357,7 +1357,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_plaintext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSAEncryptOutput__M10_cipherText(Dafny.ISequence value) { @@ -1365,7 +1365,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSAEncryptOutput__M10_cipherText(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1373,7 +1373,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M9_publicKey(Dafny.ISequence value) { @@ -1381,15 +1381,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static bool FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool value) + public static bool? FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool value) { return FromDafny_N6_smithy__N3_api__S7_Boolean(value); } - public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool value) + public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool? value) { - return ToDafny_N6_smithy__N3_api__S7_Boolean(value); + return ToDafny_N6_smithy__N3_api__S7_Boolean((bool)value); } public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM value) { @@ -1498,29 +1498,29 @@ public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModul { return value; } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes((int)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey__M3_der(Dafny.ISequence value) { @@ -1528,7 +1528,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey__M3_der(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey__M3_pem(Dafny.ISequence value) { @@ -1536,15 +1536,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey__M3_pem(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M3_pem(Dafny.ISequence value) { @@ -1552,15 +1552,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M3_pem(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } - public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int value) + public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int? value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits((int)value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M3_pem(Dafny.ISequence value) { @@ -1568,7 +1568,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M3_pem(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob(value); + return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); } public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(int value) { diff --git a/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/smithygenerated/aws_cryptography_primitives/client.py b/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/smithygenerated/aws_cryptography_primitives/client.py index 34f26b828f..d6b4d62e67 100644 --- a/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/smithygenerated/aws_cryptography_primitives/client.py +++ b/AwsCryptographyPrimitives/runtimes/python/src/aws_cryptography_primitives/smithygenerated/aws_cryptography_primitives/client.py @@ -528,7 +528,11 @@ def _handle_execution( transport_request=None, transport_response=None, ) - _client_interceptors = config.interceptors + try: + _client_interceptors = config.interceptors + except AttributeError: + config.interceptors = [] + _client_interceptors = config.interceptors client_interceptors = cast( list[Interceptor[Input, Output, DafnyRequest, DafnyResponse]], _client_interceptors, diff --git a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs index 88d3d4fa2c..48dbc0ce6d 100644 --- a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs +++ b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs @@ -16,52 +16,52 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue concrete = (software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue)value; var converted = new Amazon.DynamoDBv2.Model.AttributeValue(); if (value.is_S) { - converted.S = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(concrete.dtor_S); + converted.S = (string)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(concrete.dtor_S)); return converted; } if (value.is_N) { - converted.N = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(concrete.dtor_N); + converted.N = (string)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(concrete.dtor_N)); return converted; } if (value.is_B) { - converted.B = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(concrete.dtor_B); + converted.B = (System.IO.MemoryStream)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(concrete.dtor_B)); return converted; } if (value.is_SS) { - converted.SS = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(concrete.dtor_SS); + converted.SS = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(concrete.dtor_SS)); return converted; } if (value.is_NS) { - converted.NS = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(concrete.dtor_NS); + converted.NS = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(concrete.dtor_NS)); return converted; } if (value.is_BS) { - converted.BS = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(concrete.dtor_BS); + converted.BS = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(concrete.dtor_BS)); return converted; } if (value.is_M) { - converted.M = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(concrete.dtor_M); + converted.M = (System.Collections.Generic.Dictionary)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(concrete.dtor_M)); return converted; } if (value.is_L) { - converted.L = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(concrete.dtor_L); + converted.L = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(concrete.dtor_L)); return converted; } if (value.is_NULL) { - converted.NULL = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(concrete.dtor_NULL); + converted.NULL = (bool)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(concrete.dtor_NULL)); return converted; } if (value.is_BOOL) { - converted.BOOL = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(concrete.dtor_BOOL); + converted.BOOL = (bool)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(concrete.dtor_BOOL)); return converted; } throw new System.ArgumentException("Invalid Amazon.DynamoDBv2.Model.AttributeValue state"); @@ -118,7 +118,7 @@ public static Amazon.DynamoDBv2.Model.BackupInUseException FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupInUseException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BackupInUseException(Amazon.DynamoDBv2.Model.BackupInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupInUseException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BackupInUseException__M7_message(var_message) ); @@ -131,7 +131,7 @@ public static Amazon.DynamoDBv2.Model.BackupNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BackupNotFoundException(Amazon.DynamoDBv2.Model.BackupNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BackupNotFoundException__M7_message(var_message) ); @@ -144,7 +144,7 @@ public static Amazon.DynamoDBv2.Model.BatchExecuteStatementRequest FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchExecuteStatementInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput(Amazon.DynamoDBv2.Model.BatchExecuteStatementRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchExecuteStatementInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M10_Statements(value.Statements), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchExecuteStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchExecuteStatementOutput value) @@ -155,8 +155,8 @@ public static Amazon.DynamoDBv2.Model.BatchExecuteStatementResponse FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchExecuteStatementOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput(Amazon.DynamoDBv2.Model.BatchExecuteStatementResponse value) { - System.Collections.Generic.List var_responses = value.Responses; - System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.List var_responses = (System.Collections.Generic.List)value.Responses; + System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchExecuteStatementOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput__M9_Responses(var_responses), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchGetItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemInput value) @@ -167,7 +167,7 @@ public static Amazon.DynamoDBv2.Model.BatchGetItemRequest FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput(Amazon.DynamoDBv2.Model.BatchGetItemRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchGetItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M12_RequestItems(value.RequestItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchGetItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemOutput value) @@ -179,9 +179,9 @@ public static Amazon.DynamoDBv2.Model.BatchGetItemResponse FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput(Amazon.DynamoDBv2.Model.BatchGetItemResponse value) { - System.Collections.Generic.Dictionary>> var_responses = value.Responses; - System.Collections.Generic.Dictionary var_unprocessedKeys = value.UnprocessedKeys; - System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.Dictionary>> var_responses = (System.Collections.Generic.Dictionary>>)value.Responses; + System.Collections.Generic.Dictionary var_unprocessedKeys = (System.Collections.Generic.Dictionary)value.UnprocessedKeys; + System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchGetItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput__M9_Responses(var_responses), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput__M15_UnprocessedKeys(var_unprocessedKeys), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchWriteItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemInput value) @@ -193,8 +193,8 @@ public static Amazon.DynamoDBv2.Model.BatchWriteItemRequest FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput(Amazon.DynamoDBv2.Model.BatchWriteItemRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchWriteItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M12_RequestItems(value.RequestItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.BatchWriteItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemOutput value) @@ -206,9 +206,9 @@ public static Amazon.DynamoDBv2.Model.BatchWriteItemResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput(Amazon.DynamoDBv2.Model.BatchWriteItemResponse value) { - System.Collections.Generic.Dictionary> var_unprocessedItems = value.UnprocessedItems; - System.Collections.Generic.Dictionary> var_itemCollectionMetrics = value.ItemCollectionMetrics; - System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.Dictionary> var_unprocessedItems = (System.Collections.Generic.Dictionary>)value.UnprocessedItems; + System.Collections.Generic.Dictionary> var_itemCollectionMetrics = (System.Collections.Generic.Dictionary>)value.ItemCollectionMetrics; + System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchWriteItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput__M16_UnprocessedItems(var_unprocessedItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.ConditionalCheckFailedException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ConditionalCheckFailedException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ConditionalCheckFailedException value) @@ -222,8 +222,8 @@ public static Amazon.DynamoDBv2.Model.ConditionalCheckFailedException FromDafny_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ConditionalCheckFailedException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ConditionalCheckFailedException(Amazon.DynamoDBv2.Model.ConditionalCheckFailedException value) { - string var_message = value.Message; - System.Collections.Generic.Dictionary var_item = value.Item; + string var_message = (string)value.Message; + System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ConditionalCheckFailedException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ConditionalCheckFailedException__M7_message(var_message) , @@ -238,7 +238,7 @@ public static Amazon.DynamoDBv2.Model.ContinuousBackupsUnavailableException From } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ContinuousBackupsUnavailableException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_ContinuousBackupsUnavailableException(Amazon.DynamoDBv2.Model.ContinuousBackupsUnavailableException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ContinuousBackupsUnavailableException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_ContinuousBackupsUnavailableException__M7_message(var_message) ); @@ -261,7 +261,7 @@ public static Amazon.DynamoDBv2.Model.CreateBackupResponse FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CreateBackupOutput(Amazon.DynamoDBv2.Model.CreateBackupResponse value) { - Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = value.BackupDetails; + Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = (Amazon.DynamoDBv2.Model.BackupDetails)value.BackupDetails; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CreateBackupOutput__M13_BackupDetails(var_backupDetails)); } public static Amazon.DynamoDBv2.Model.CreateGlobalTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalTableInput value) @@ -282,7 +282,7 @@ public static Amazon.DynamoDBv2.Model.CreateGlobalTableResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_CreateGlobalTableOutput(Amazon.DynamoDBv2.Model.CreateGlobalTableResponse value) { - Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = value.GlobalTableDescription; + Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = (Amazon.DynamoDBv2.Model.GlobalTableDescription)value.GlobalTableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_CreateGlobalTableOutput__M22_GlobalTableDescription(var_globalTableDescription)); } public static Amazon.DynamoDBv2.Model.CreateTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableInput value) @@ -305,17 +305,17 @@ public static Amazon.DynamoDBv2.Model.CreateTableRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput(Amazon.DynamoDBv2.Model.CreateTableRequest value) { - System.Collections.Generic.List var_localSecondaryIndexes = value.LocalSecondaryIndexes; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = value.StreamSpecification; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = value.SSESpecification; - System.Collections.Generic.List var_tags = value.Tags; - Amazon.DynamoDBv2.TableClass var_tableClass = value.TableClass; - bool? var_deletionProtectionEnabled = value.DeletionProtectionEnabled; - string var_resourcePolicy = value.ResourcePolicy; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + System.Collections.Generic.List var_localSecondaryIndexes = (System.Collections.Generic.List)value.LocalSecondaryIndexes; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamSpecification; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecification; + System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; + Amazon.DynamoDBv2.TableClass var_tableClass = (Amazon.DynamoDBv2.TableClass)value.TableClass; + bool? var_deletionProtectionEnabled = (bool?)value.DeletionProtectionEnabled; + string var_resourcePolicy = (string)value.ResourcePolicy; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateTableInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M20_AttributeDefinitions(value.AttributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M19_StreamSpecification(var_streamSpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M16_SSESpecification(var_sSESpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M10_TableClass(var_tableClass), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M25_DeletionProtectionEnabled(var_deletionProtectionEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M14_ResourcePolicy(var_resourcePolicy), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.CreateTableResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateTableOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableOutput value) @@ -325,7 +325,7 @@ public static Amazon.DynamoDBv2.Model.CreateTableResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateTableOutput(Amazon.DynamoDBv2.Model.CreateTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateTableOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.DeleteBackupRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteBackupInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteBackupInput value) @@ -345,7 +345,7 @@ public static Amazon.DynamoDBv2.Model.DeleteBackupResponse FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DeleteBackupOutput(Amazon.DynamoDBv2.Model.DeleteBackupResponse value) { - Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = value.BackupDescription; + Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = (Amazon.DynamoDBv2.Model.BackupDescription)value.BackupDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DeleteBackupOutput__M17_BackupDescription(var_backupDescription)); } public static Amazon.DynamoDBv2.Model.DeleteItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemInput value) @@ -365,15 +365,15 @@ public static Amazon.DynamoDBv2.Model.DeleteItemRequest FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput(Amazon.DynamoDBv2.Model.DeleteItemRequest value) { - System.Collections.Generic.Dictionary var_expected = value.Expected; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; - Amazon.DynamoDBv2.ReturnValue var_returnValues = value.ReturnValues; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; - string var_conditionExpression = value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_expected = (System.Collections.Generic.Dictionary)value.Expected; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; + Amazon.DynamoDBv2.ReturnValue var_returnValues = (Amazon.DynamoDBv2.ReturnValue)value.ReturnValues; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; + string var_conditionExpression = (string)value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M8_Expected(var_expected), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M12_ReturnValues(var_returnValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.DeleteItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemOutput value) @@ -385,9 +385,9 @@ public static Amazon.DynamoDBv2.Model.DeleteItemResponse FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput(Amazon.DynamoDBv2.Model.DeleteItemResponse value) { - System.Collections.Generic.Dictionary var_attributes = value.Attributes; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; - Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = value.ItemCollectionMetrics; + System.Collections.Generic.Dictionary var_attributes = (System.Collections.Generic.Dictionary)value.Attributes; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = (Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput__M10_Attributes(var_attributes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyInput value) @@ -398,7 +398,7 @@ public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyRequest FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput(Amazon.DynamoDBv2.Model.DeleteResourcePolicyRequest value) { - string var_expectedRevisionId = value.ExpectedRevisionId; + string var_expectedRevisionId = (string)value.ExpectedRevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M11_ResourceArn(value.ResourceArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M18_ExpectedRevisionId(var_expectedRevisionId)); } public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_DeleteResourcePolicyOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyOutput value) @@ -408,7 +408,7 @@ public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyResponse FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_DeleteResourcePolicyOutput(Amazon.DynamoDBv2.Model.DeleteResourcePolicyResponse value) { - string var_revisionId = value.RevisionId; + string var_revisionId = (string)value.RevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_DeleteResourcePolicyOutput__M10_RevisionId(var_revisionId)); } public static Amazon.DynamoDBv2.Model.DeleteTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteTableInput value) @@ -428,7 +428,7 @@ public static Amazon.DynamoDBv2.Model.DeleteTableResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteTableOutput(Amazon.DynamoDBv2.Model.DeleteTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteTableOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.DescribeBackupRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeBackupInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeBackupInput value) @@ -448,7 +448,7 @@ public static Amazon.DynamoDBv2.Model.DescribeBackupResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeBackupOutput(Amazon.DynamoDBv2.Model.DescribeBackupResponse value) { - Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = value.BackupDescription; + Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = (Amazon.DynamoDBv2.Model.BackupDescription)value.BackupDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeBackupOutput__M17_BackupDescription(var_backupDescription)); } public static Amazon.DynamoDBv2.Model.DescribeContinuousBackupsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_DescribeContinuousBackupsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContinuousBackupsInput value) @@ -468,7 +468,7 @@ public static Amazon.DynamoDBv2.Model.DescribeContinuousBackupsResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContinuousBackupsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_DescribeContinuousBackupsOutput(Amazon.DynamoDBv2.Model.DescribeContinuousBackupsResponse value) { - Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = value.ContinuousBackupsDescription; + Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = (Amazon.DynamoDBv2.Model.ContinuousBackupsDescription)value.ContinuousBackupsDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContinuousBackupsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_DescribeContinuousBackupsOutput__M28_ContinuousBackupsDescription(var_continuousBackupsDescription)); } public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsInput value) @@ -479,7 +479,7 @@ public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsRequest FromDaf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput(Amazon.DynamoDBv2.Model.DescribeContributorInsightsRequest value) { - string var_indexName = value.IndexName; + string var_indexName = (string)value.IndexName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContributorInsightsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_IndexName(var_indexName)); } public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsOutput value) @@ -494,12 +494,12 @@ public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsResponse FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput(Amazon.DynamoDBv2.Model.DescribeContributorInsightsResponse value) { - string var_tableName = value.TableName; - string var_indexName = value.IndexName; - System.Collections.Generic.List var_contributorInsightsRuleList = value.ContributorInsightsRuleList; - Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = value.ContributorInsightsStatus; - System.DateTime? var_lastUpdateDateTime = value.LastUpdateDateTime; - Amazon.DynamoDBv2.Model.FailureException var_failureException = value.FailureException; + string var_tableName = (string)value.TableName; + string var_indexName = (string)value.IndexName; + System.Collections.Generic.List var_contributorInsightsRuleList = (System.Collections.Generic.List)value.ContributorInsightsRuleList; + Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = (Amazon.DynamoDBv2.ContributorInsightsStatus)value.ContributorInsightsStatus; + System.DateTime? var_lastUpdateDateTime = (System.DateTime?)value.LastUpdateDateTime; + Amazon.DynamoDBv2.Model.FailureException var_failureException = (Amazon.DynamoDBv2.Model.FailureException)value.FailureException; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContributorInsightsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M27_ContributorInsightsRuleList(var_contributorInsightsRuleList), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M25_ContributorInsightsStatus(var_contributorInsightsStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M18_LastUpdateDateTime(var_lastUpdateDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M16_FailureException(var_failureException)); } public static Amazon.DynamoDBv2.Model.DescribeEndpointsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeEndpointsRequest(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeEndpointsRequest value) @@ -539,7 +539,7 @@ public static Amazon.DynamoDBv2.Model.DescribeExportResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeExportOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeExportOutput(Amazon.DynamoDBv2.Model.DescribeExportResponse value) { - Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = value.ExportDescription; + Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = (Amazon.DynamoDBv2.Model.ExportDescription)value.ExportDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeExportOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeExportOutput__M17_ExportDescription(var_exportDescription)); } public static Amazon.DynamoDBv2.Model.DescribeGlobalTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeGlobalTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableInput value) @@ -559,7 +559,7 @@ public static Amazon.DynamoDBv2.Model.DescribeGlobalTableResponse FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeGlobalTableOutput(Amazon.DynamoDBv2.Model.DescribeGlobalTableResponse value) { - Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = value.GlobalTableDescription; + Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = (Amazon.DynamoDBv2.Model.GlobalTableDescription)value.GlobalTableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeGlobalTableOutput__M22_GlobalTableDescription(var_globalTableDescription)); } public static Amazon.DynamoDBv2.Model.DescribeGlobalTableSettingsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeGlobalTableSettingsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableSettingsInput value) @@ -580,8 +580,8 @@ public static Amazon.DynamoDBv2.Model.DescribeGlobalTableSettingsResponse FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableSettingsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput(Amazon.DynamoDBv2.Model.DescribeGlobalTableSettingsResponse value) { - string var_globalTableName = value.GlobalTableName; - System.Collections.Generic.List var_replicaSettings = value.ReplicaSettings; + string var_globalTableName = (string)value.GlobalTableName; + System.Collections.Generic.List var_replicaSettings = (System.Collections.Generic.List)value.ReplicaSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableSettingsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput__M15_GlobalTableName(var_globalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput__M15_ReplicaSettings(var_replicaSettings)); } public static Amazon.DynamoDBv2.Model.DescribeImportRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeImportInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeImportInput value) @@ -622,8 +622,8 @@ public static Amazon.DynamoDBv2.Model.DescribeKinesisStreamingDestinationRespons public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.DescribeKinesisStreamingDestinationResponse value) { - string var_tableName = value.TableName; - System.Collections.Generic.List var_kinesisDataStreamDestinations = value.KinesisDataStreamDestinations; + string var_tableName = (string)value.TableName; + System.Collections.Generic.List var_kinesisDataStreamDestinations = (System.Collections.Generic.List)value.KinesisDataStreamDestinations; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput__M29_KinesisDataStreamDestinations(var_kinesisDataStreamDestinations)); } public static Amazon.DynamoDBv2.Model.DescribeLimitsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeLimitsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeLimitsInput value) @@ -646,10 +646,10 @@ public static Amazon.DynamoDBv2.Model.DescribeLimitsResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeLimitsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput(Amazon.DynamoDBv2.Model.DescribeLimitsResponse value) { - long? var_accountMaxReadCapacityUnits = value.AccountMaxReadCapacityUnits; - long? var_accountMaxWriteCapacityUnits = value.AccountMaxWriteCapacityUnits; - long? var_tableMaxReadCapacityUnits = value.TableMaxReadCapacityUnits; - long? var_tableMaxWriteCapacityUnits = value.TableMaxWriteCapacityUnits; + long? var_accountMaxReadCapacityUnits = (long?)value.AccountMaxReadCapacityUnits; + long? var_accountMaxWriteCapacityUnits = (long?)value.AccountMaxWriteCapacityUnits; + long? var_tableMaxReadCapacityUnits = (long?)value.TableMaxReadCapacityUnits; + long? var_tableMaxWriteCapacityUnits = (long?)value.TableMaxWriteCapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeLimitsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M27_AccountMaxReadCapacityUnits(var_accountMaxReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M28_AccountMaxWriteCapacityUnits(var_accountMaxWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M25_TableMaxReadCapacityUnits(var_tableMaxReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M26_TableMaxWriteCapacityUnits(var_tableMaxWriteCapacityUnits)); } public static Amazon.DynamoDBv2.Model.DescribeTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DescribeTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableInput value) @@ -669,7 +669,7 @@ public static Amazon.DynamoDBv2.Model.DescribeTableResponse FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeTableOutput(Amazon.DynamoDBv2.Model.DescribeTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_table = value.Table; + Amazon.DynamoDBv2.Model.TableDescription var_table = (Amazon.DynamoDBv2.Model.TableDescription)value.Table; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeTableOutput__M5_Table(var_table)); } public static Amazon.DynamoDBv2.Model.DescribeTableReplicaAutoScalingRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_DescribeTableReplicaAutoScalingInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableReplicaAutoScalingInput value) @@ -689,7 +689,7 @@ public static Amazon.DynamoDBv2.Model.DescribeTableReplicaAutoScalingResponse Fr public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableReplicaAutoScalingOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_DescribeTableReplicaAutoScalingOutput(Amazon.DynamoDBv2.Model.DescribeTableReplicaAutoScalingResponse value) { - Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = value.TableAutoScalingDescription; + Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = (Amazon.DynamoDBv2.Model.TableAutoScalingDescription)value.TableAutoScalingDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableReplicaAutoScalingOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_DescribeTableReplicaAutoScalingOutput__M27_TableAutoScalingDescription(var_tableAutoScalingDescription)); } public static Amazon.DynamoDBv2.Model.DescribeTimeToLiveRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_DescribeTimeToLiveInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTimeToLiveInput value) @@ -709,7 +709,7 @@ public static Amazon.DynamoDBv2.Model.DescribeTimeToLiveResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTimeToLiveOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeTimeToLiveOutput(Amazon.DynamoDBv2.Model.DescribeTimeToLiveResponse value) { - Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = value.TimeToLiveDescription; + Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = (Amazon.DynamoDBv2.Model.TimeToLiveDescription)value.TimeToLiveDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTimeToLiveOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeTimeToLiveOutput__M21_TimeToLiveDescription(var_timeToLiveDescription)); } public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationInput value) @@ -721,7 +721,7 @@ public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationRequest public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput(Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationRequest value) { - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_StreamArn(value.StreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationOutput value) @@ -734,10 +734,10 @@ public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationResponse public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationResponse value) { - string var_tableName = value.TableName; - string var_streamArn = value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; + string var_tableName = (string)value.TableName; + string var_streamArn = (string)value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.DuplicateItemException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_DuplicateItemException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_DuplicateItemException value) @@ -748,7 +748,7 @@ public static Amazon.DynamoDBv2.Model.DuplicateItemException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_DuplicateItemException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_DuplicateItemException(Amazon.DynamoDBv2.Model.DuplicateItemException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_DuplicateItemException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_DuplicateItemException__M7_message(var_message) ); @@ -762,7 +762,7 @@ public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationRequest F public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingDestinationInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput(Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationRequest value) { - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_StreamArn(value.StreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingDestinationOutput value) @@ -775,10 +775,10 @@ public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationResponse public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationResponse value) { - string var_tableName = value.TableName; - string var_streamArn = value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; + string var_tableName = (string)value.TableName; + string var_streamArn = (string)value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.ExecuteStatementRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementInput value) @@ -794,12 +794,12 @@ public static Amazon.DynamoDBv2.Model.ExecuteStatementRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput(Amazon.DynamoDBv2.Model.ExecuteStatementRequest value) { - System.Collections.Generic.List var_parameters = value.Parameters; - bool? var_consistentRead = value.ConsistentRead; - string var_nextToken = value.NextToken; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - int? var_limit = value.Limit; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.List var_parameters = (System.Collections.Generic.List)value.Parameters; + bool? var_consistentRead = (bool?)value.ConsistentRead; + string var_nextToken = (string)value.NextToken; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + int? var_limit = (int?)value.Limit; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteStatementInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M9_Statement(value.Statement), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M10_Parameters(var_parameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M9_NextToken(var_nextToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.ExecuteStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementOutput value) @@ -812,10 +812,10 @@ public static Amazon.DynamoDBv2.Model.ExecuteStatementResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput(Amazon.DynamoDBv2.Model.ExecuteStatementResponse value) { - System.Collections.Generic.List> var_items = value.Items; - string var_nextToken = value.NextToken; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; - System.Collections.Generic.Dictionary var_lastEvaluatedKey = value.LastEvaluatedKey; + System.Collections.Generic.List> var_items = (System.Collections.Generic.List>)value.Items; + string var_nextToken = (string)value.NextToken; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + System.Collections.Generic.Dictionary var_lastEvaluatedKey = (System.Collections.Generic.Dictionary)value.LastEvaluatedKey; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteStatementOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M5_Items(var_items), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M9_NextToken(var_nextToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M16_LastEvaluatedKey(var_lastEvaluatedKey)); } public static Amazon.DynamoDBv2.Model.ExecuteTransactionRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionInput value) @@ -827,8 +827,8 @@ public static Amazon.DynamoDBv2.Model.ExecuteTransactionRequest FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput(Amazon.DynamoDBv2.Model.ExecuteTransactionRequest value) { - string var_clientRequestToken = value.ClientRequestToken; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + string var_clientRequestToken = (string)value.ClientRequestToken; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteTransactionInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_TransactStatements(value.TransactStatements), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_ClientRequestToken(var_clientRequestToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.ExecuteTransactionResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionOutput value) @@ -839,8 +839,8 @@ public static Amazon.DynamoDBv2.Model.ExecuteTransactionResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput(Amazon.DynamoDBv2.Model.ExecuteTransactionResponse value) { - System.Collections.Generic.List var_responses = value.Responses; - System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.List var_responses = (System.Collections.Generic.List)value.Responses; + System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteTransactionOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput__M9_Responses(var_responses), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.ExportConflictException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportConflictException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportConflictException value) @@ -851,7 +851,7 @@ public static Amazon.DynamoDBv2.Model.ExportConflictException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportConflictException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportConflictException(Amazon.DynamoDBv2.Model.ExportConflictException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportConflictException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportConflictException__M7_message(var_message) ); @@ -864,7 +864,7 @@ public static Amazon.DynamoDBv2.Model.ExportNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportNotFoundException(Amazon.DynamoDBv2.Model.ExportNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportNotFoundException__M7_message(var_message) ); @@ -886,15 +886,15 @@ public static Amazon.DynamoDBv2.Model.ExportTableToPointInTimeRequest FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportTableToPointInTimeInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput(Amazon.DynamoDBv2.Model.ExportTableToPointInTimeRequest value) { - System.DateTime? var_exportTime = value.ExportTime; - string var_clientToken = value.ClientToken; - string var_s3BucketOwner = value.S3BucketOwner; - string var_s3Prefix = value.S3Prefix; - Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = value.S3SseAlgorithm; - string var_s3SseKmsKeyId = value.S3SseKmsKeyId; - Amazon.DynamoDBv2.ExportFormat var_exportFormat = value.ExportFormat; - Amazon.DynamoDBv2.ExportType var_exportType = value.ExportType; - Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = value.IncrementalExportSpecification; + System.DateTime? var_exportTime = (System.DateTime?)value.ExportTime; + string var_clientToken = (string)value.ClientToken; + string var_s3BucketOwner = (string)value.S3BucketOwner; + string var_s3Prefix = (string)value.S3Prefix; + Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = (Amazon.DynamoDBv2.S3SseAlgorithm)value.S3SseAlgorithm; + string var_s3SseKmsKeyId = (string)value.S3SseKmsKeyId; + Amazon.DynamoDBv2.ExportFormat var_exportFormat = (Amazon.DynamoDBv2.ExportFormat)value.ExportFormat; + Amazon.DynamoDBv2.ExportType var_exportType = (Amazon.DynamoDBv2.ExportType)value.ExportType; + Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = (Amazon.DynamoDBv2.Model.IncrementalExportSpecification)value.IncrementalExportSpecification; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_TableArn(value.TableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M10_ExportTime(var_exportTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_S3Bucket(value.S3Bucket), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M13_S3BucketOwner(var_s3BucketOwner), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_S3Prefix(var_s3Prefix), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M14_S3SseAlgorithm(var_s3SseAlgorithm), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M13_S3SseKmsKeyId(var_s3SseKmsKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M12_ExportFormat(var_exportFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M10_ExportType(var_exportType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M30_IncrementalExportSpecification(var_incrementalExportSpecification)); } public static Amazon.DynamoDBv2.Model.ExportTableToPointInTimeResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ExportTableToPointInTimeOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportTableToPointInTimeOutput value) @@ -904,7 +904,7 @@ public static Amazon.DynamoDBv2.Model.ExportTableToPointInTimeResponse FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportTableToPointInTimeOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ExportTableToPointInTimeOutput(Amazon.DynamoDBv2.Model.ExportTableToPointInTimeResponse value) { - Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = value.ExportDescription; + Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = (Amazon.DynamoDBv2.Model.ExportDescription)value.ExportDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ExportTableToPointInTimeOutput__M17_ExportDescription(var_exportDescription)); } public static Amazon.DynamoDBv2.Model.GetItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemInput value) @@ -920,11 +920,11 @@ public static Amazon.DynamoDBv2.Model.GetItemRequest FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput(Amazon.DynamoDBv2.Model.GetItemRequest value) { - System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; - bool? var_consistentRead = value.ConsistentRead; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - string var_projectionExpression = value.ProjectionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; + bool? var_consistentRead = (bool?)value.ConsistentRead; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + string var_projectionExpression = (string)value.ProjectionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames)); } public static Amazon.DynamoDBv2.Model.GetItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemOutput value) @@ -935,8 +935,8 @@ public static Amazon.DynamoDBv2.Model.GetItemResponse FromDafny_N3_com__N9_amazo public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput(Amazon.DynamoDBv2.Model.GetItemResponse value) { - System.Collections.Generic.Dictionary var_item = value.Item; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput__M4_Item(var_item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.GetResourcePolicyRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GetResourcePolicyInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetResourcePolicyInput value) @@ -957,8 +957,8 @@ public static Amazon.DynamoDBv2.Model.GetResourcePolicyResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetResourcePolicyOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput(Amazon.DynamoDBv2.Model.GetResourcePolicyResponse value) { - string var_policy = value.Policy; - string var_revisionId = value.RevisionId; + string var_policy = (string)value.Policy; + string var_revisionId = (string)value.RevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput__M10_RevisionId(var_revisionId)); } public static Amazon.DynamoDBv2.Model.GlobalTableAlreadyExistsException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_GlobalTableAlreadyExistsException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableAlreadyExistsException value) @@ -969,7 +969,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableAlreadyExistsException FromDafn } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableAlreadyExistsException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_GlobalTableAlreadyExistsException(Amazon.DynamoDBv2.Model.GlobalTableAlreadyExistsException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableAlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_GlobalTableAlreadyExistsException__M7_message(var_message) ); @@ -982,7 +982,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableNotFoundException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_GlobalTableNotFoundException(Amazon.DynamoDBv2.Model.GlobalTableNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_GlobalTableNotFoundException__M7_message(var_message) ); @@ -995,7 +995,7 @@ public static Amazon.DynamoDBv2.Model.IdempotentParameterMismatchException FromD } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IdempotentParameterMismatchException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_IdempotentParameterMismatchException(Amazon.DynamoDBv2.Model.IdempotentParameterMismatchException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IdempotentParameterMismatchException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_IdempotentParameterMismatchException__M7_Message(var_message) ); @@ -1008,7 +1008,7 @@ public static Amazon.DynamoDBv2.Model.ImportConflictException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportConflictException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportConflictException(Amazon.DynamoDBv2.Model.ImportConflictException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportConflictException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportConflictException__M7_message(var_message) ); @@ -1021,7 +1021,7 @@ public static Amazon.DynamoDBv2.Model.ImportNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportNotFoundException(Amazon.DynamoDBv2.Model.ImportNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportNotFoundException__M7_message(var_message) ); @@ -1038,9 +1038,9 @@ public static Amazon.DynamoDBv2.Model.ImportTableRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput(Amazon.DynamoDBv2.Model.ImportTableRequest value) { - string var_clientToken = value.ClientToken; - Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = value.InputFormatOptions; - Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = value.InputCompressionType; + string var_clientToken = (string)value.ClientToken; + Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = (Amazon.DynamoDBv2.Model.InputFormatOptions)value.InputFormatOptions; + Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = (Amazon.DynamoDBv2.InputCompressionType)value.InputCompressionType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M14_S3BucketSource(value.S3BucketSource), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_InputFormat(value.InputFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M18_InputFormatOptions(var_inputFormatOptions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M20_InputCompressionType(var_inputCompressionType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M23_TableCreationParameters(value.TableCreationParameters)); } public static Amazon.DynamoDBv2.Model.ImportTableResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportTableOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableOutput value) @@ -1061,7 +1061,7 @@ public static Amazon.DynamoDBv2.Model.IndexNotFoundException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IndexNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_IndexNotFoundException(Amazon.DynamoDBv2.Model.IndexNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IndexNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_IndexNotFoundException__M7_message(var_message) ); @@ -1074,7 +1074,7 @@ public static Amazon.DynamoDBv2.Model.InternalServerErrorException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InternalServerError ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_InternalServerError(Amazon.DynamoDBv2.Model.InternalServerErrorException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InternalServerError( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_InternalServerError__M7_message(var_message) ); @@ -1087,7 +1087,7 @@ public static Amazon.DynamoDBv2.Model.InvalidExportTimeException FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidExportTimeException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_InvalidExportTimeException(Amazon.DynamoDBv2.Model.InvalidExportTimeException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidExportTimeException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_InvalidExportTimeException__M7_message(var_message) ); @@ -1100,7 +1100,7 @@ public static Amazon.DynamoDBv2.Model.InvalidRestoreTimeException FromDafny_N3_c } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_InvalidRestoreTimeException(Amazon.DynamoDBv2.Model.InvalidRestoreTimeException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_InvalidRestoreTimeException__M7_message(var_message) ); @@ -1113,7 +1113,7 @@ public static Amazon.DynamoDBv2.Model.ItemCollectionSizeLimitExceededException F } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_ItemCollectionSizeLimitExceededException(Amazon.DynamoDBv2.Model.ItemCollectionSizeLimitExceededException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_ItemCollectionSizeLimitExceededException__M7_message(var_message) ); @@ -1126,7 +1126,7 @@ public static Amazon.DynamoDBv2.Model.LimitExceededException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_LimitExceededException(Amazon.DynamoDBv2.Model.LimitExceededException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_LimitExceededException__M7_message(var_message) ); @@ -1143,12 +1143,12 @@ public static Amazon.DynamoDBv2.Model.ListBackupsRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListBackupsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput(Amazon.DynamoDBv2.Model.ListBackupsRequest value) { - string var_tableName = value.TableName; - int? var_limit = value.Limit; - System.DateTime? var_timeRangeLowerBound = value.TimeRangeLowerBound; - System.DateTime? var_timeRangeUpperBound = value.TimeRangeUpperBound; - string var_exclusiveStartBackupArn = value.ExclusiveStartBackupArn; - Amazon.DynamoDBv2.BackupTypeFilter var_backupType = value.BackupType; + string var_tableName = (string)value.TableName; + int? var_limit = (int?)value.Limit; + System.DateTime? var_timeRangeLowerBound = (System.DateTime?)value.TimeRangeLowerBound; + System.DateTime? var_timeRangeUpperBound = (System.DateTime?)value.TimeRangeUpperBound; + string var_exclusiveStartBackupArn = (string)value.ExclusiveStartBackupArn; + Amazon.DynamoDBv2.BackupTypeFilter var_backupType = (Amazon.DynamoDBv2.BackupTypeFilter)value.BackupType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListBackupsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M19_TimeRangeLowerBound(var_timeRangeLowerBound), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M19_TimeRangeUpperBound(var_timeRangeUpperBound), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M23_ExclusiveStartBackupArn(var_exclusiveStartBackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M10_BackupType(var_backupType)); } public static Amazon.DynamoDBv2.Model.ListBackupsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListBackupsOutput value) @@ -1159,8 +1159,8 @@ public static Amazon.DynamoDBv2.Model.ListBackupsResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListBackupsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput(Amazon.DynamoDBv2.Model.ListBackupsResponse value) { - System.Collections.Generic.List var_backupSummaries = value.BackupSummaries; - string var_lastEvaluatedBackupArn = value.LastEvaluatedBackupArn; + System.Collections.Generic.List var_backupSummaries = (System.Collections.Generic.List)value.BackupSummaries; + string var_lastEvaluatedBackupArn = (string)value.LastEvaluatedBackupArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListBackupsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput__M15_BackupSummaries(var_backupSummaries), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput__M22_LastEvaluatedBackupArn(var_lastEvaluatedBackupArn)); } public static Amazon.DynamoDBv2.Model.ListContributorInsightsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsInput value) @@ -1172,9 +1172,9 @@ public static Amazon.DynamoDBv2.Model.ListContributorInsightsRequest FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput(Amazon.DynamoDBv2.Model.ListContributorInsightsRequest value) { - string var_tableName = value.TableName; - string var_nextToken = value.NextToken; - int? var_maxResults = value.MaxResults; + string var_tableName = (string)value.TableName; + string var_nextToken = (string)value.NextToken; + int? var_maxResults = (int?)value.MaxResults; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListContributorInsightsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput__M9_NextToken(var_nextToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput__M10_MaxResults(var_maxResults)); } public static Amazon.DynamoDBv2.Model.ListContributorInsightsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsOutput value) @@ -1185,8 +1185,8 @@ public static Amazon.DynamoDBv2.Model.ListContributorInsightsResponse FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput(Amazon.DynamoDBv2.Model.ListContributorInsightsResponse value) { - System.Collections.Generic.List var_contributorInsightsSummaries = value.ContributorInsightsSummaries; - string var_nextToken = value.NextToken; + System.Collections.Generic.List var_contributorInsightsSummaries = (System.Collections.Generic.List)value.ContributorInsightsSummaries; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListContributorInsightsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput__M28_ContributorInsightsSummaries(var_contributorInsightsSummaries), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListExportsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsInput value) @@ -1198,9 +1198,9 @@ public static Amazon.DynamoDBv2.Model.ListExportsRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput(Amazon.DynamoDBv2.Model.ListExportsRequest value) { - string var_tableArn = value.TableArn; - int? var_maxResults = value.MaxResults; - string var_nextToken = value.NextToken; + string var_tableArn = (string)value.TableArn; + int? var_maxResults = (int?)value.MaxResults; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListExportsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput__M10_MaxResults(var_maxResults), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListExportsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsOutput value) @@ -1211,8 +1211,8 @@ public static Amazon.DynamoDBv2.Model.ListExportsResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput(Amazon.DynamoDBv2.Model.ListExportsResponse value) { - System.Collections.Generic.List var_exportSummaries = value.ExportSummaries; - string var_nextToken = value.NextToken; + System.Collections.Generic.List var_exportSummaries = (System.Collections.Generic.List)value.ExportSummaries; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListExportsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput__M15_ExportSummaries(var_exportSummaries), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListGlobalTablesRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesInput value) @@ -1224,9 +1224,9 @@ public static Amazon.DynamoDBv2.Model.ListGlobalTablesRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput(Amazon.DynamoDBv2.Model.ListGlobalTablesRequest value) { - string var_exclusiveStartGlobalTableName = value.ExclusiveStartGlobalTableName; - int? var_limit = value.Limit; - string var_regionName = value.RegionName; + string var_exclusiveStartGlobalTableName = (string)value.ExclusiveStartGlobalTableName; + int? var_limit = (int?)value.Limit; + string var_regionName = (string)value.RegionName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListGlobalTablesInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput__M29_ExclusiveStartGlobalTableName(var_exclusiveStartGlobalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput__M10_RegionName(var_regionName)); } public static Amazon.DynamoDBv2.Model.ListGlobalTablesResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesOutput value) @@ -1237,8 +1237,8 @@ public static Amazon.DynamoDBv2.Model.ListGlobalTablesResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput(Amazon.DynamoDBv2.Model.ListGlobalTablesResponse value) { - System.Collections.Generic.List var_globalTables = value.GlobalTables; - string var_lastEvaluatedGlobalTableName = value.LastEvaluatedGlobalTableName; + System.Collections.Generic.List var_globalTables = (System.Collections.Generic.List)value.GlobalTables; + string var_lastEvaluatedGlobalTableName = (string)value.LastEvaluatedGlobalTableName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListGlobalTablesOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput__M12_GlobalTables(var_globalTables), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput__M28_LastEvaluatedGlobalTableName(var_lastEvaluatedGlobalTableName)); } public static Amazon.DynamoDBv2.Model.ListImportsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsInput value) @@ -1250,9 +1250,9 @@ public static Amazon.DynamoDBv2.Model.ListImportsRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput(Amazon.DynamoDBv2.Model.ListImportsRequest value) { - string var_tableArn = value.TableArn; - int? var_pageSize = value.PageSize; - string var_nextToken = value.NextToken; + string var_tableArn = (string)value.TableArn; + int? var_pageSize = (int?)value.PageSize; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListImportsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput__M8_PageSize(var_pageSize), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListImportsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsOutput value) @@ -1263,8 +1263,8 @@ public static Amazon.DynamoDBv2.Model.ListImportsResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput(Amazon.DynamoDBv2.Model.ListImportsResponse value) { - System.Collections.Generic.List var_importSummaryList = value.ImportSummaryList; - string var_nextToken = value.NextToken; + System.Collections.Generic.List var_importSummaryList = (System.Collections.Generic.List)value.ImportSummaryList; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListImportsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput__M17_ImportSummaryList(var_importSummaryList), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListTablesRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesInput value) @@ -1275,8 +1275,8 @@ public static Amazon.DynamoDBv2.Model.ListTablesRequest FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput(Amazon.DynamoDBv2.Model.ListTablesRequest value) { - string var_exclusiveStartTableName = value.ExclusiveStartTableName; - int? var_limit = value.Limit; + string var_exclusiveStartTableName = (string)value.ExclusiveStartTableName; + int? var_limit = (int?)value.Limit; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTablesInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput__M23_ExclusiveStartTableName(var_exclusiveStartTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput__M5_Limit(var_limit)); } public static Amazon.DynamoDBv2.Model.ListTablesResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesOutput value) @@ -1287,8 +1287,8 @@ public static Amazon.DynamoDBv2.Model.ListTablesResponse FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput(Amazon.DynamoDBv2.Model.ListTablesResponse value) { - System.Collections.Generic.List var_tableNames = value.TableNames; - string var_lastEvaluatedTableName = value.LastEvaluatedTableName; + System.Collections.Generic.List var_tableNames = (System.Collections.Generic.List)value.TableNames; + string var_lastEvaluatedTableName = (string)value.LastEvaluatedTableName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTablesOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput__M10_TableNames(var_tableNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput__M22_LastEvaluatedTableName(var_lastEvaluatedTableName)); } public static Amazon.DynamoDBv2.Model.ListTagsOfResourceRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceInput value) @@ -1299,7 +1299,7 @@ public static Amazon.DynamoDBv2.Model.ListTagsOfResourceRequest FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput(Amazon.DynamoDBv2.Model.ListTagsOfResourceRequest value) { - string var_nextToken = value.NextToken; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M11_ResourceArn(value.ResourceArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListTagsOfResourceResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceOutput value) @@ -1310,8 +1310,8 @@ public static Amazon.DynamoDBv2.Model.ListTagsOfResourceResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput(Amazon.DynamoDBv2.Model.ListTagsOfResourceResponse value) { - System.Collections.Generic.List var_tags = value.Tags; - string var_nextToken = value.NextToken; + System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; + string var_nextToken = (string)value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryUnavailableException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_PointInTimeRecoveryUnavailableException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException value) @@ -1322,7 +1322,7 @@ public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryUnavailableException Fr } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_PointInTimeRecoveryUnavailableException(Amazon.DynamoDBv2.Model.PointInTimeRecoveryUnavailableException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_PointInTimeRecoveryUnavailableException__M7_message(var_message) ); @@ -1335,7 +1335,7 @@ public static Amazon.DynamoDBv2.Model.PolicyNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PolicyNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PolicyNotFoundException(Amazon.DynamoDBv2.Model.PolicyNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PolicyNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PolicyNotFoundException__M7_message(var_message) ); @@ -1348,7 +1348,7 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughputExceededException Fro } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ProvisionedThroughputExceededException(Amazon.DynamoDBv2.Model.ProvisionedThroughputExceededException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ProvisionedThroughputExceededException__M7_message(var_message) ); @@ -1370,15 +1370,15 @@ public static Amazon.DynamoDBv2.Model.PutItemRequest FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput(Amazon.DynamoDBv2.Model.PutItemRequest value) { - System.Collections.Generic.Dictionary var_expected = value.Expected; - Amazon.DynamoDBv2.ReturnValue var_returnValues = value.ReturnValues; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; - string var_conditionExpression = value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_expected = (System.Collections.Generic.Dictionary)value.Expected; + Amazon.DynamoDBv2.ReturnValue var_returnValues = (Amazon.DynamoDBv2.ReturnValue)value.ReturnValues; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; + string var_conditionExpression = (string)value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M4_Item(value.Item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M8_Expected(var_expected), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M12_ReturnValues(var_returnValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.PutItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutItemOutput value) @@ -1390,9 +1390,9 @@ public static Amazon.DynamoDBv2.Model.PutItemResponse FromDafny_N3_com__N9_amazo public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput(Amazon.DynamoDBv2.Model.PutItemResponse value) { - System.Collections.Generic.Dictionary var_attributes = value.Attributes; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; - Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = value.ItemCollectionMetrics; + System.Collections.Generic.Dictionary var_attributes = (System.Collections.Generic.Dictionary)value.Attributes; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = (Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput__M10_Attributes(var_attributes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.PutResourcePolicyRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyInput value) @@ -1405,8 +1405,8 @@ public static Amazon.DynamoDBv2.Model.PutResourcePolicyRequest FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput(Amazon.DynamoDBv2.Model.PutResourcePolicyRequest value) { - string var_expectedRevisionId = value.ExpectedRevisionId; - bool? var_confirmRemoveSelfResourceAccess = value.ConfirmRemoveSelfResourceAccess; + string var_expectedRevisionId = (string)value.ExpectedRevisionId; + bool? var_confirmRemoveSelfResourceAccess = (bool?)value.ConfirmRemoveSelfResourceAccess; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M11_ResourceArn(value.ResourceArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M6_Policy(value.Policy), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M18_ExpectedRevisionId(var_expectedRevisionId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M31_ConfirmRemoveSelfResourceAccess(var_confirmRemoveSelfResourceAccess)); } public static Amazon.DynamoDBv2.Model.PutResourcePolicyResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PutResourcePolicyOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyOutput value) @@ -1416,7 +1416,7 @@ public static Amazon.DynamoDBv2.Model.PutResourcePolicyResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PutResourcePolicyOutput(Amazon.DynamoDBv2.Model.PutResourcePolicyResponse value) { - string var_revisionId = value.RevisionId; + string var_revisionId = (string)value.RevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PutResourcePolicyOutput__M10_RevisionId(var_revisionId)); } public static Amazon.DynamoDBv2.Model.QueryRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryInput value) @@ -1442,22 +1442,22 @@ public static Amazon.DynamoDBv2.Model.QueryRequest FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput(Amazon.DynamoDBv2.Model.QueryRequest value) { - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.Select var_select = value.Select; - System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; - int? var_limit = value.Limit; - bool? var_consistentRead = value.ConsistentRead; - System.Collections.Generic.Dictionary var_keyConditions = value.KeyConditions; - System.Collections.Generic.Dictionary var_queryFilter = value.QueryFilter; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; - bool? var_scanIndexForward = value.ScanIndexForward; - System.Collections.Generic.Dictionary var_exclusiveStartKey = value.ExclusiveStartKey; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - string var_projectionExpression = value.ProjectionExpression; - string var_filterExpression = value.FilterExpression; - string var_keyConditionExpression = value.KeyConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.Select var_select = (Amazon.DynamoDBv2.Select)value.Select; + System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; + int? var_limit = (int?)value.Limit; + bool? var_consistentRead = (bool?)value.ConsistentRead; + System.Collections.Generic.Dictionary var_keyConditions = (System.Collections.Generic.Dictionary)value.KeyConditions; + System.Collections.Generic.Dictionary var_queryFilter = (System.Collections.Generic.Dictionary)value.QueryFilter; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; + bool? var_scanIndexForward = (bool?)value.ScanIndexForward; + System.Collections.Generic.Dictionary var_exclusiveStartKey = (System.Collections.Generic.Dictionary)value.ExclusiveStartKey; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + string var_projectionExpression = (string)value.ProjectionExpression; + string var_filterExpression = (string)value.FilterExpression; + string var_keyConditionExpression = (string)value.KeyConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M6_Select(var_select), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M13_KeyConditions(var_keyConditions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M11_QueryFilter(var_queryFilter), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M16_ScanIndexForward(var_scanIndexForward), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M17_ExclusiveStartKey(var_exclusiveStartKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M16_FilterExpression(var_filterExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M22_KeyConditionExpression(var_keyConditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M25_ExpressionAttributeValues(var_expressionAttributeValues)); } public static Amazon.DynamoDBv2.Model.QueryResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryOutput value) @@ -1471,11 +1471,11 @@ public static Amazon.DynamoDBv2.Model.QueryResponse FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput(Amazon.DynamoDBv2.Model.QueryResponse value) { - System.Collections.Generic.List> var_items = value.Items; - int? var_count = value.Count; - int? var_scannedCount = value.ScannedCount; - System.Collections.Generic.Dictionary var_lastEvaluatedKey = value.LastEvaluatedKey; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.List> var_items = (System.Collections.Generic.List>)value.Items; + int? var_count = (int?)value.Count; + int? var_scannedCount = (int?)value.ScannedCount; + System.Collections.Generic.Dictionary var_lastEvaluatedKey = (System.Collections.Generic.Dictionary)value.LastEvaluatedKey; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M5_Items(var_items), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M5_Count(var_count), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M12_ScannedCount(var_scannedCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M16_LastEvaluatedKey(var_lastEvaluatedKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.ReplicaAlreadyExistsException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAlreadyExistsException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException value) @@ -1486,7 +1486,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaAlreadyExistsException FromDafny_N3 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAlreadyExistsException(Amazon.DynamoDBv2.Model.ReplicaAlreadyExistsException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAlreadyExistsException__M7_message(var_message) ); @@ -1499,7 +1499,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaNotFoundException FromDafny_N3_com_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaNotFoundException(Amazon.DynamoDBv2.Model.ReplicaNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaNotFoundException__M7_message(var_message) ); @@ -1512,7 +1512,7 @@ public static Amazon.DynamoDBv2.Model.RequestLimitExceededException FromDafny_N3 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_RequestLimitExceeded ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_RequestLimitExceeded(Amazon.DynamoDBv2.Model.RequestLimitExceededException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_RequestLimitExceeded( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_RequestLimitExceeded__M7_message(var_message) ); @@ -1525,7 +1525,7 @@ public static Amazon.DynamoDBv2.Model.ResourceInUseException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceInUseException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ResourceInUseException(Amazon.DynamoDBv2.Model.ResourceInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceInUseException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ResourceInUseException__M7_message(var_message) ); @@ -1538,7 +1538,7 @@ public static Amazon.DynamoDBv2.Model.ResourceNotFoundException FromDafny_N3_com } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ResourceNotFoundException(Amazon.DynamoDBv2.Model.ResourceNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ResourceNotFoundException__M7_message(var_message) ); @@ -1557,12 +1557,12 @@ public static Amazon.DynamoDBv2.Model.RestoreTableFromBackupRequest FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableFromBackupInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput(Amazon.DynamoDBv2.Model.RestoreTableFromBackupRequest value) { - Amazon.DynamoDBv2.BillingMode var_billingModeOverride = value.BillingModeOverride; - System.Collections.Generic.List var_globalSecondaryIndexOverride = value.GlobalSecondaryIndexOverride; - System.Collections.Generic.List var_localSecondaryIndexOverride = value.LocalSecondaryIndexOverride; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = value.OnDemandThroughputOverride; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = value.SSESpecificationOverride; + Amazon.DynamoDBv2.BillingMode var_billingModeOverride = (Amazon.DynamoDBv2.BillingMode)value.BillingModeOverride; + System.Collections.Generic.List var_globalSecondaryIndexOverride = (System.Collections.Generic.List)value.GlobalSecondaryIndexOverride; + System.Collections.Generic.List var_localSecondaryIndexOverride = (System.Collections.Generic.List)value.LocalSecondaryIndexOverride; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughputOverride; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecificationOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M15_TargetTableName(value.TargetTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M9_BackupArn(value.BackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M19_BillingModeOverride(var_billingModeOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M28_GlobalSecondaryIndexOverride(var_globalSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M27_LocalSecondaryIndexOverride(var_localSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M24_SSESpecificationOverride(var_sSESpecificationOverride)); } public static Amazon.DynamoDBv2.Model.RestoreTableFromBackupResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_RestoreTableFromBackupOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableFromBackupOutput value) @@ -1572,7 +1572,7 @@ public static Amazon.DynamoDBv2.Model.RestoreTableFromBackupResponse FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableFromBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_RestoreTableFromBackupOutput(Amazon.DynamoDBv2.Model.RestoreTableFromBackupResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_RestoreTableFromBackupOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeInput value) @@ -1592,16 +1592,16 @@ public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeRequest FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput(Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeRequest value) { - string var_sourceTableArn = value.SourceTableArn; - string var_sourceTableName = value.SourceTableName; - bool? var_useLatestRestorableTime = value.UseLatestRestorableTime; - System.DateTime? var_restoreDateTime = value.RestoreDateTime; - Amazon.DynamoDBv2.BillingMode var_billingModeOverride = value.BillingModeOverride; - System.Collections.Generic.List var_globalSecondaryIndexOverride = value.GlobalSecondaryIndexOverride; - System.Collections.Generic.List var_localSecondaryIndexOverride = value.LocalSecondaryIndexOverride; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = value.OnDemandThroughputOverride; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = value.SSESpecificationOverride; + string var_sourceTableArn = (string)value.SourceTableArn; + string var_sourceTableName = (string)value.SourceTableName; + bool? var_useLatestRestorableTime = (bool?)value.UseLatestRestorableTime; + System.DateTime? var_restoreDateTime = (System.DateTime?)value.RestoreDateTime; + Amazon.DynamoDBv2.BillingMode var_billingModeOverride = (Amazon.DynamoDBv2.BillingMode)value.BillingModeOverride; + System.Collections.Generic.List var_globalSecondaryIndexOverride = (System.Collections.Generic.List)value.GlobalSecondaryIndexOverride; + System.Collections.Generic.List var_localSecondaryIndexOverride = (System.Collections.Generic.List)value.LocalSecondaryIndexOverride; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughputOverride; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecificationOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableToPointInTimeInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M14_SourceTableArn(var_sourceTableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_SourceTableName(var_sourceTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_TargetTableName(value.TargetTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M23_UseLatestRestorableTime(var_useLatestRestorableTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_RestoreDateTime(var_restoreDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M19_BillingModeOverride(var_billingModeOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M28_GlobalSecondaryIndexOverride(var_globalSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M27_LocalSecondaryIndexOverride(var_localSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M24_SSESpecificationOverride(var_sSESpecificationOverride)); } public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_RestoreTableToPointInTimeOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeOutput value) @@ -1611,7 +1611,7 @@ public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_RestoreTableToPointInTimeOutput(Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableToPointInTimeOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_RestoreTableToPointInTimeOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.ScanRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanInput value) @@ -1636,21 +1636,21 @@ public static Amazon.DynamoDBv2.Model.ScanRequest FromDafny_N3_com__N9_amazonaws public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput(Amazon.DynamoDBv2.Model.ScanRequest value) { - string var_indexName = value.IndexName; - System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; - int? var_limit = value.Limit; - Amazon.DynamoDBv2.Select var_select = value.Select; - System.Collections.Generic.Dictionary var_scanFilter = value.ScanFilter; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; - System.Collections.Generic.Dictionary var_exclusiveStartKey = value.ExclusiveStartKey; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - int? var_totalSegments = value.TotalSegments; - int? var_segment = value.Segment; - string var_projectionExpression = value.ProjectionExpression; - string var_filterExpression = value.FilterExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - bool? var_consistentRead = value.ConsistentRead; + string var_indexName = (string)value.IndexName; + System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; + int? var_limit = (int?)value.Limit; + Amazon.DynamoDBv2.Select var_select = (Amazon.DynamoDBv2.Select)value.Select; + System.Collections.Generic.Dictionary var_scanFilter = (System.Collections.Generic.Dictionary)value.ScanFilter; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; + System.Collections.Generic.Dictionary var_exclusiveStartKey = (System.Collections.Generic.Dictionary)value.ExclusiveStartKey; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + int? var_totalSegments = (int?)value.TotalSegments; + int? var_segment = (int?)value.Segment; + string var_projectionExpression = (string)value.ProjectionExpression; + string var_filterExpression = (string)value.FilterExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + bool? var_consistentRead = (bool?)value.ConsistentRead; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ScanInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M6_Select(var_select), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M10_ScanFilter(var_scanFilter), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M17_ExclusiveStartKey(var_exclusiveStartKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M13_TotalSegments(var_totalSegments), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M7_Segment(var_segment), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M16_FilterExpression(var_filterExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M14_ConsistentRead(var_consistentRead)); } public static Amazon.DynamoDBv2.Model.ScanResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanOutput value) @@ -1664,11 +1664,11 @@ public static Amazon.DynamoDBv2.Model.ScanResponse FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput(Amazon.DynamoDBv2.Model.ScanResponse value) { - System.Collections.Generic.List> var_items = value.Items; - int? var_count = value.Count; - int? var_scannedCount = value.ScannedCount; - System.Collections.Generic.Dictionary var_lastEvaluatedKey = value.LastEvaluatedKey; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.List> var_items = (System.Collections.Generic.List>)value.Items; + int? var_count = (int?)value.Count; + int? var_scannedCount = (int?)value.ScannedCount; + System.Collections.Generic.Dictionary var_lastEvaluatedKey = (System.Collections.Generic.Dictionary)value.LastEvaluatedKey; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ScanOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M5_Items(var_items), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M5_Count(var_count), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M12_ScannedCount(var_scannedCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M16_LastEvaluatedKey(var_lastEvaluatedKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.TableAlreadyExistsException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAlreadyExistsException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableAlreadyExistsException value) @@ -1679,7 +1679,7 @@ public static Amazon.DynamoDBv2.Model.TableAlreadyExistsException FromDafny_N3_c } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableAlreadyExistsException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAlreadyExistsException(Amazon.DynamoDBv2.Model.TableAlreadyExistsException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableAlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAlreadyExistsException__M7_message(var_message) ); @@ -1692,7 +1692,7 @@ public static Amazon.DynamoDBv2.Model.TableInUseException FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableInUseException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TableInUseException(Amazon.DynamoDBv2.Model.TableInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableInUseException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TableInUseException__M7_message(var_message) ); @@ -1705,7 +1705,7 @@ public static Amazon.DynamoDBv2.Model.TableNotFoundException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TableNotFoundException(Amazon.DynamoDBv2.Model.TableNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TableNotFoundException__M7_message(var_message) ); @@ -1729,7 +1729,7 @@ public static Amazon.DynamoDBv2.Model.TransactGetItemsRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItemsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput(Amazon.DynamoDBv2.Model.TransactGetItemsRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactGetItemsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M13_TransactItems(value.TransactItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.TransactGetItemsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItemsOutput value) @@ -1740,8 +1740,8 @@ public static Amazon.DynamoDBv2.Model.TransactGetItemsResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItemsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput(Amazon.DynamoDBv2.Model.TransactGetItemsResponse value) { - System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; - System.Collections.Generic.List var_responses = value.Responses; + System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; + System.Collections.Generic.List var_responses = (System.Collections.Generic.List)value.Responses; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactGetItemsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput__M9_Responses(var_responses)); } public static Amazon.DynamoDBv2.Model.TransactionCanceledException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionCanceledException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionCanceledException value) @@ -1754,8 +1754,8 @@ public static Amazon.DynamoDBv2.Model.TransactionCanceledException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionCanceledException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionCanceledException(Amazon.DynamoDBv2.Model.TransactionCanceledException value) { - string var_message = value.Message; - System.Collections.Generic.List var_cancellationReasons = value.CancellationReasons; + string var_message = (string)value.Message; + System.Collections.Generic.List var_cancellationReasons = (System.Collections.Generic.List)value.CancellationReasons; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionCanceledException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionCanceledException__M7_Message(var_message) , @@ -1770,7 +1770,7 @@ public static Amazon.DynamoDBv2.Model.TransactionConflictException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionConflictException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionConflictException(Amazon.DynamoDBv2.Model.TransactionConflictException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionConflictException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionConflictException__M7_message(var_message) ); @@ -1783,7 +1783,7 @@ public static Amazon.DynamoDBv2.Model.TransactionInProgressException FromDafny_N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionInProgressException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_TransactionInProgressException(Amazon.DynamoDBv2.Model.TransactionInProgressException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionInProgressException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_TransactionInProgressException__M7_Message(var_message) ); @@ -1798,9 +1798,9 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItemsRequest FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItemsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput(Amazon.DynamoDBv2.Model.TransactWriteItemsRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; - string var_clientRequestToken = value.ClientRequestToken; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; + string var_clientRequestToken = (string)value.ClientRequestToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactWriteItemsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M13_TransactItems(value.TransactItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M18_ClientRequestToken(var_clientRequestToken)); } public static Amazon.DynamoDBv2.Model.TransactWriteItemsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItemsOutput value) @@ -1811,8 +1811,8 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItemsResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItemsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput(Amazon.DynamoDBv2.Model.TransactWriteItemsResponse value) { - System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; - System.Collections.Generic.Dictionary> var_itemCollectionMetrics = value.ItemCollectionMetrics; + System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; + System.Collections.Generic.Dictionary> var_itemCollectionMetrics = (System.Collections.Generic.Dictionary>)value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactWriteItemsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.UntagResourceRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUntagResourceInput value) @@ -1844,7 +1844,7 @@ public static Amazon.DynamoDBv2.Model.UpdateContinuousBackupsResponse FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContinuousBackupsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_UpdateContinuousBackupsOutput(Amazon.DynamoDBv2.Model.UpdateContinuousBackupsResponse value) { - Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = value.ContinuousBackupsDescription; + Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = (Amazon.DynamoDBv2.Model.ContinuousBackupsDescription)value.ContinuousBackupsDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateContinuousBackupsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_UpdateContinuousBackupsOutput__M28_ContinuousBackupsDescription(var_continuousBackupsDescription)); } public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsInput value) @@ -1856,7 +1856,7 @@ public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsRequest FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput(Amazon.DynamoDBv2.Model.UpdateContributorInsightsRequest value) { - string var_indexName = value.IndexName; + string var_indexName = (string)value.IndexName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateContributorInsightsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M25_ContributorInsightsAction(value.ContributorInsightsAction)); } public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsOutput value) @@ -1868,9 +1868,9 @@ public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput(Amazon.DynamoDBv2.Model.UpdateContributorInsightsResponse value) { - string var_tableName = value.TableName; - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = value.ContributorInsightsStatus; + string var_tableName = (string)value.TableName; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = (Amazon.DynamoDBv2.ContributorInsightsStatus)value.ContributorInsightsStatus; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateContributorInsightsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M25_ContributorInsightsStatus(var_contributorInsightsStatus)); } public static Amazon.DynamoDBv2.Model.UpdateGlobalTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableInput value) @@ -1891,7 +1891,7 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalTableResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_UpdateGlobalTableOutput(Amazon.DynamoDBv2.Model.UpdateGlobalTableResponse value) { - Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = value.GlobalTableDescription; + Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = (Amazon.DynamoDBv2.Model.GlobalTableDescription)value.GlobalTableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_UpdateGlobalTableOutput__M22_GlobalTableDescription(var_globalTableDescription)); } public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsInput value) @@ -1906,11 +1906,11 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsRequest FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput(Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsRequest value) { - Amazon.DynamoDBv2.BillingMode var_globalTableBillingMode = value.GlobalTableBillingMode; - long? var_globalTableProvisionedWriteCapacityUnits = value.GlobalTableProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = value.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate; - System.Collections.Generic.List var_globalTableGlobalSecondaryIndexSettingsUpdate = value.GlobalTableGlobalSecondaryIndexSettingsUpdate; - System.Collections.Generic.List var_replicaSettingsUpdate = value.ReplicaSettingsUpdate; + Amazon.DynamoDBv2.BillingMode var_globalTableBillingMode = (Amazon.DynamoDBv2.BillingMode)value.GlobalTableBillingMode; + long? var_globalTableProvisionedWriteCapacityUnits = (long?)value.GlobalTableProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate; + System.Collections.Generic.List var_globalTableGlobalSecondaryIndexSettingsUpdate = (System.Collections.Generic.List)value.GlobalTableGlobalSecondaryIndexSettingsUpdate; + System.Collections.Generic.List var_replicaSettingsUpdate = (System.Collections.Generic.List)value.ReplicaSettingsUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M15_GlobalTableName(value.GlobalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M22_GlobalTableBillingMode(var_globalTableBillingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M40_GlobalTableProvisionedWriteCapacityUnits(var_globalTableProvisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M60_GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate(var_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M45_GlobalTableGlobalSecondaryIndexSettingsUpdate(var_globalTableGlobalSecondaryIndexSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M21_ReplicaSettingsUpdate(var_replicaSettingsUpdate)); } public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsOutput value) @@ -1921,8 +1921,8 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput(Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsResponse value) { - string var_globalTableName = value.GlobalTableName; - System.Collections.Generic.List var_replicaSettings = value.ReplicaSettings; + string var_globalTableName = (string)value.GlobalTableName; + System.Collections.Generic.List var_replicaSettings = (System.Collections.Generic.List)value.ReplicaSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput__M15_GlobalTableName(var_globalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput__M15_ReplicaSettings(var_replicaSettings)); } public static Amazon.DynamoDBv2.Model.UpdateItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemInput value) @@ -1944,17 +1944,17 @@ public static Amazon.DynamoDBv2.Model.UpdateItemRequest FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput(Amazon.DynamoDBv2.Model.UpdateItemRequest value) { - System.Collections.Generic.Dictionary var_attributeUpdates = value.AttributeUpdates; - System.Collections.Generic.Dictionary var_expected = value.Expected; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; - Amazon.DynamoDBv2.ReturnValue var_returnValues = value.ReturnValues; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; - string var_updateExpression = value.UpdateExpression; - string var_conditionExpression = value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_attributeUpdates = (System.Collections.Generic.Dictionary)value.AttributeUpdates; + System.Collections.Generic.Dictionary var_expected = (System.Collections.Generic.Dictionary)value.Expected; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; + Amazon.DynamoDBv2.ReturnValue var_returnValues = (Amazon.DynamoDBv2.ReturnValue)value.ReturnValues; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; + string var_updateExpression = (string)value.UpdateExpression; + string var_conditionExpression = (string)value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M16_AttributeUpdates(var_attributeUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M8_Expected(var_expected), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M12_ReturnValues(var_returnValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M16_UpdateExpression(var_updateExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.UpdateItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemOutput value) @@ -1966,9 +1966,9 @@ public static Amazon.DynamoDBv2.Model.UpdateItemResponse FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput(Amazon.DynamoDBv2.Model.UpdateItemResponse value) { - System.Collections.Generic.Dictionary var_attributes = value.Attributes; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; - Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = value.ItemCollectionMetrics; + System.Collections.Generic.Dictionary var_attributes = (System.Collections.Generic.Dictionary)value.Attributes; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = (Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput__M10_Attributes(var_attributes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationInput value) @@ -1980,7 +1980,7 @@ public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationRequest F public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput(Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationRequest value) { - Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = value.UpdateKinesisStreamingConfiguration; + Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration)value.UpdateKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_StreamArn(value.StreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M35_UpdateKinesisStreamingConfiguration(var_updateKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationOutput value) @@ -1993,10 +1993,10 @@ public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationResponse public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationResponse value) { - string var_tableName = value.TableName; - string var_streamArn = value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; - Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = value.UpdateKinesisStreamingConfiguration; + string var_tableName = (string)value.TableName; + string var_streamArn = (string)value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; + Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration)value.UpdateKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M35_UpdateKinesisStreamingConfiguration(var_updateKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.UpdateTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableInput value) @@ -2016,16 +2016,16 @@ public static Amazon.DynamoDBv2.Model.UpdateTableRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput(Amazon.DynamoDBv2.Model.UpdateTableRequest value) { - System.Collections.Generic.List var_attributeDefinitions = value.AttributeDefinitions; - Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - System.Collections.Generic.List var_globalSecondaryIndexUpdates = value.GlobalSecondaryIndexUpdates; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = value.StreamSpecification; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = value.SSESpecification; - System.Collections.Generic.List var_replicaUpdates = value.ReplicaUpdates; - Amazon.DynamoDBv2.TableClass var_tableClass = value.TableClass; - bool? var_deletionProtectionEnabled = value.DeletionProtectionEnabled; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + System.Collections.Generic.List var_attributeDefinitions = (System.Collections.Generic.List)value.AttributeDefinitions; + Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + System.Collections.Generic.List var_globalSecondaryIndexUpdates = (System.Collections.Generic.List)value.GlobalSecondaryIndexUpdates; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamSpecification; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecification; + System.Collections.Generic.List var_replicaUpdates = (System.Collections.Generic.List)value.ReplicaUpdates; + Amazon.DynamoDBv2.TableClass var_tableClass = (Amazon.DynamoDBv2.TableClass)value.TableClass; + bool? var_deletionProtectionEnabled = (bool?)value.DeletionProtectionEnabled; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M20_AttributeDefinitions(var_attributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M27_GlobalSecondaryIndexUpdates(var_globalSecondaryIndexUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M19_StreamSpecification(var_streamSpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M16_SSESpecification(var_sSESpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M14_ReplicaUpdates(var_replicaUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M10_TableClass(var_tableClass), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M25_DeletionProtectionEnabled(var_deletionProtectionEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.UpdateTableResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_UpdateTableOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableOutput value) @@ -2035,7 +2035,7 @@ public static Amazon.DynamoDBv2.Model.UpdateTableResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_UpdateTableOutput(Amazon.DynamoDBv2.Model.UpdateTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_UpdateTableOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingInput value) @@ -2048,9 +2048,9 @@ public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingRequest FromD public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput(Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingRequest value) { - System.Collections.Generic.List var_globalSecondaryIndexUpdates = value.GlobalSecondaryIndexUpdates; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = value.ProvisionedWriteCapacityAutoScalingUpdate; - System.Collections.Generic.List var_replicaUpdates = value.ReplicaUpdates; + System.Collections.Generic.List var_globalSecondaryIndexUpdates = (System.Collections.Generic.List)value.GlobalSecondaryIndexUpdates; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedWriteCapacityAutoScalingUpdate; + System.Collections.Generic.List var_replicaUpdates = (System.Collections.Generic.List)value.ReplicaUpdates; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableReplicaAutoScalingInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M27_GlobalSecondaryIndexUpdates(var_globalSecondaryIndexUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M41_ProvisionedWriteCapacityAutoScalingUpdate(var_provisionedWriteCapacityAutoScalingUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M14_ReplicaUpdates(var_replicaUpdates)); } public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateTableReplicaAutoScalingOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingOutput value) @@ -2060,7 +2060,7 @@ public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingResponse From public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateTableReplicaAutoScalingOutput(Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingResponse value) { - Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = value.TableAutoScalingDescription; + Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = (Amazon.DynamoDBv2.Model.TableAutoScalingDescription)value.TableAutoScalingDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableReplicaAutoScalingOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateTableReplicaAutoScalingOutput__M27_TableAutoScalingDescription(var_tableAutoScalingDescription)); } public static Amazon.DynamoDBv2.Model.UpdateTimeToLiveRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTimeToLiveInput value) @@ -2081,7 +2081,7 @@ public static Amazon.DynamoDBv2.Model.UpdateTimeToLiveResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTimeToLiveOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateTimeToLiveOutput(Amazon.DynamoDBv2.Model.UpdateTimeToLiveResponse value) { - Amazon.DynamoDBv2.Model.TimeToLiveSpecification var_timeToLiveSpecification = value.TimeToLiveSpecification; + Amazon.DynamoDBv2.Model.TimeToLiveSpecification var_timeToLiveSpecification = (Amazon.DynamoDBv2.Model.TimeToLiveSpecification)value.TimeToLiveSpecification; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTimeToLiveOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateTimeToLiveOutput__M23_TimeToLiveSpecification(var_timeToLiveSpecification)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(Dafny.ISequence value) @@ -2090,7 +2090,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeV } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(Dafny.ISequence value) { @@ -2098,7 +2098,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeV } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(Dafny.ISequence value) { @@ -2106,7 +2106,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue((System.IO.MemoryStream)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(Dafny.ISequence> value) { @@ -2114,7 +2114,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetAttributeValue((System.Collections.Generic.List)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(Dafny.ISequence> value) { @@ -2122,7 +2122,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue((System.Collections.Generic.List)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(Dafny.ISequence> value) { @@ -2130,7 +2130,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue((System.Collections.Generic.List)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -2138,7 +2138,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(Dafny.ISequence value) { @@ -2146,7 +2146,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue((System.Collections.Generic.List)value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(bool value) { @@ -2154,7 +2154,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeVal } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_NullAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_NullAttributeValue((bool)value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(bool value) { @@ -2162,7 +2162,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeVal } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BooleanAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BooleanAttributeValue((bool)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BackupInUseException__M7_message(Wrappers_Compile._IOption> value) { @@ -2186,7 +2186,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BackupNotF } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M10_Statements(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -2218,7 +2218,7 @@ public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amaz } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M12_RequestItems(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap((System.Collections.Generic.Dictionary)value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -2258,7 +2258,7 @@ public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amaz } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M12_RequestItems(System.Collections.Generic.Dictionary> value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap((System.Collections.Generic.Dictionary>)value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -2330,7 +2330,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBack } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBackupInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBackupInput__M10_BackupName(Dafny.ISequence value) { @@ -2338,7 +2338,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBack } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBackupInput__M10_BackupName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName((string)value); } public static Amazon.DynamoDBv2.Model.BackupDetails FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CreateBackupOutput__M13_BackupDetails(Wrappers_Compile._IOption value) { @@ -2354,7 +2354,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput__M16_ReplicationGroup(Dafny.ISequence value) { @@ -2362,7 +2362,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput__M16_ReplicationGroup(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_ReplicaList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_ReplicaList((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_CreateGlobalTableOutput__M22_GlobalTableDescription(Wrappers_Compile._IOption value) { @@ -2378,7 +2378,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M20_AttributeDefinitions(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_TableName(Dafny.ISequence value) { @@ -2386,7 +2386,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_KeySchema(Dafny.ISequence value) { @@ -2394,7 +2394,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M21_LocalSecondaryIndexes(Wrappers_Compile._IOption> value) { @@ -2498,7 +2498,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteBack } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteBackupInput__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); } public static Amazon.DynamoDBv2.Model.BackupDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DeleteBackupOutput__M17_BackupDescription(Wrappers_Compile._IOption value) { @@ -2514,7 +2514,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItem } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -2522,7 +2522,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M8_Expected(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue>> value) { @@ -2626,7 +2626,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteReso } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M18_ExpectedRevisionId(Wrappers_Compile._IOption> value) { @@ -2650,7 +2650,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteTableOutput__M16_TableDescription(Wrappers_Compile._IOption value) { @@ -2666,7 +2666,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeBa } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeBackupInput__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); } public static Amazon.DynamoDBv2.Model.BackupDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeBackupOutput__M17_BackupDescription(Wrappers_Compile._IOption value) { @@ -2682,7 +2682,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_DescribeCo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_DescribeContinuousBackupsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.ContinuousBackupsDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_DescribeContinuousBackupsOutput__M28_ContinuousBackupsDescription(Wrappers_Compile._IOption value) { @@ -2698,7 +2698,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeCo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -2762,7 +2762,7 @@ public static Amazon.DynamoDBv2.Model.FailureException FromDafny_N3_com__N9_amaz } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeEndpointsResponse__M9_Endpoints(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeExportInput__M9_ExportArn(Dafny.ISequence value) { @@ -2770,7 +2770,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeEx } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeExportInput__M9_ExportArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ExportArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ExportArn((string)value); } public static Amazon.DynamoDBv2.Model.ExportDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeExportOutput__M17_ExportDescription(Wrappers_Compile._IOption value) { @@ -2786,7 +2786,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeGl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeGlobalTableInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeGlobalTableOutput__M22_GlobalTableDescription(Wrappers_Compile._IOption value) { @@ -2802,7 +2802,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeGl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeGlobalTableSettingsInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput__M15_GlobalTableName(Wrappers_Compile._IOption> value) { @@ -2826,7 +2826,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeIm } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeImportInput__M9_ImportArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ImportArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ImportArn((string)value); } public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeImportOutput__M22_ImportTableDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription value) { @@ -2834,7 +2834,7 @@ public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeImportOutput__M22_ImportTableDescription(Amazon.DynamoDBv2.Model.ImportTableDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription((Amazon.DynamoDBv2.Model.ImportTableDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DescribeKinesisStreamingDestinationInput__M9_TableName(Dafny.ISequence value) { @@ -2842,7 +2842,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DescribeKi } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DescribeKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput__M9_TableName(Wrappers_Compile._IOption> value) { @@ -2898,7 +2898,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DescribeTa } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DescribeTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeTableOutput__M5_Table(Wrappers_Compile._IOption value) { @@ -2914,7 +2914,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_DescribeTa } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_DescribeTableReplicaAutoScalingInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.TableAutoScalingDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_DescribeTableReplicaAutoScalingOutput__M27_TableAutoScalingDescription(Wrappers_Compile._IOption value) { @@ -2930,7 +2930,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_DescribeTi } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_DescribeTimeToLiveInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.TimeToLiveDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeTimeToLiveOutput__M21_TimeToLiveDescription(Wrappers_Compile._IOption value) { @@ -2946,7 +2946,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_StreamArn(Dafny.ISequence value) { @@ -2954,7 +2954,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_StreamArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn((string)value); } public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(Wrappers_Compile._IOption value) { @@ -3010,7 +3010,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_StreamArn(Dafny.ISequence value) { @@ -3018,7 +3018,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_StreamArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn((string)value); } public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(Wrappers_Compile._IOption value) { @@ -3066,7 +3066,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteSta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M9_Statement(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M10_Parameters(Wrappers_Compile._IOption> value) { @@ -3154,7 +3154,7 @@ public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amaz } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_TransactStatements(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_ClientRequestToken(Wrappers_Compile._IOption> value) { @@ -3210,7 +3210,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_TableArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M10_ExportTime(Wrappers_Compile._IOption> value) { @@ -3234,7 +3234,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_S3Bucket(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M13_S3BucketOwner(Wrappers_Compile._IOption> value) { @@ -3306,7 +3306,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInp } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -3314,7 +3314,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M15_AttributesToGet(Wrappers_Compile._IOption>> value) { @@ -3378,7 +3378,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GetResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GetResourcePolicyInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput__M6_Policy(Wrappers_Compile._IOption> value) { @@ -3450,7 +3450,7 @@ public static Amazon.DynamoDBv2.Model.S3BucketSource FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IS3BucketSource ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M14_S3BucketSource(Amazon.DynamoDBv2.Model.S3BucketSource value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource((Amazon.DynamoDBv2.Model.S3BucketSource)value); } public static Amazon.DynamoDBv2.InputFormat FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_InputFormat(software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormat value) { @@ -3458,7 +3458,7 @@ public static Amazon.DynamoDBv2.InputFormat FromDafny_N3_com__N9_amazonaws__N8_d } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormat ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_InputFormat(Amazon.DynamoDBv2.InputFormat value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_InputFormat(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_InputFormat((Amazon.DynamoDBv2.InputFormat)value); } public static Amazon.DynamoDBv2.Model.InputFormatOptions FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M18_InputFormatOptions(Wrappers_Compile._IOption value) { @@ -3482,7 +3482,7 @@ public static Amazon.DynamoDBv2.Model.TableCreationParameters FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableCreationParameters ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M23_TableCreationParameters(Amazon.DynamoDBv2.Model.TableCreationParameters value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters((Amazon.DynamoDBv2.Model.TableCreationParameters)value); } public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportTableOutput__M22_ImportTableDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription value) { @@ -3490,7 +3490,7 @@ public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportTableOutput__M22_ImportTableDescription(Amazon.DynamoDBv2.Model.ImportTableDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription((Amazon.DynamoDBv2.Model.ImportTableDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_IndexNotFoundException__M7_message(Wrappers_Compile._IOption> value) { @@ -3810,7 +3810,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOf } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M9_NextToken(Wrappers_Compile._IOption> value) { @@ -3866,7 +3866,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInp } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M4_Item(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -3874,7 +3874,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M4_Item(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M8_Expected(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue>> value) { @@ -3978,7 +3978,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M6_Policy(Dafny.ISequence value) { @@ -3986,7 +3986,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M6_Policy(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ResourcePolicy(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ResourcePolicy((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M18_ExpectedRevisionId(Wrappers_Compile._IOption> value) { @@ -4018,7 +4018,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -4234,7 +4234,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M15_TargetTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M9_BackupArn(Dafny.ISequence value) { @@ -4242,7 +4242,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M19_BillingModeOverride(Wrappers_Compile._IOption value) { @@ -4322,7 +4322,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_TargetTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static bool? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M23_UseLatestRestorableTime(Wrappers_Compile._IOption value) { @@ -4402,7 +4402,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -4594,7 +4594,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourceInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourceInput__M4_Tags(Dafny.ISequence value) { @@ -4602,7 +4602,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourceInput__M4_Tags(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList((System.Collections.Generic.List)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M13_TransactItems(Dafny.ISequence value) { @@ -4610,7 +4610,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M13_TransactItems(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -4674,7 +4674,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_Transactio } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M13_TransactItems(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -4722,7 +4722,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResou } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput__M7_TagKeys(Dafny.ISequence> value) { @@ -4730,7 +4730,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput__M7_TagKeys(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M9_TableName(Dafny.ISequence value) { @@ -4738,7 +4738,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateCont } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M32_PointInTimeRecoverySpecification(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPointInTimeRecoverySpecification value) { @@ -4746,7 +4746,7 @@ public static Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification FromDafny } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPointInTimeRecoverySpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M32_PointInTimeRecoverySpecification(Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification((Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification)value); } public static Amazon.DynamoDBv2.Model.ContinuousBackupsDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_UpdateContinuousBackupsOutput__M28_ContinuousBackupsDescription(Wrappers_Compile._IOption value) { @@ -4762,7 +4762,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateCont } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -4778,7 +4778,7 @@ public static Amazon.DynamoDBv2.ContributorInsightsAction FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M25_ContributorInsightsAction(Amazon.DynamoDBv2.ContributorInsightsAction value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ContributorInsightsAction(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ContributorInsightsAction((Amazon.DynamoDBv2.ContributorInsightsAction)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M9_TableName(Wrappers_Compile._IOption> value) { @@ -4810,7 +4810,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput__M14_ReplicaUpdates(Dafny.ISequence value) { @@ -4818,7 +4818,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput__M14_ReplicaUpdates(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_UpdateGlobalTableOutput__M22_GlobalTableDescription(Wrappers_Compile._IOption value) { @@ -4834,7 +4834,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M22_GlobalTableBillingMode(Wrappers_Compile._IOption value) { @@ -4898,7 +4898,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItem } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -4906,7 +4906,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M16_AttributeUpdates(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate>> value) { @@ -5026,7 +5026,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_StreamArn(Dafny.ISequence value) { @@ -5034,7 +5034,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_StreamArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn((string)value); } public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M35_UpdateKinesisStreamingConfiguration(Wrappers_Compile._IOption value) { @@ -5090,7 +5090,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M11_BillingMode(Wrappers_Compile._IOption value) { @@ -5186,7 +5186,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M41_ProvisionedWriteCapacityAutoScalingUpdate(Wrappers_Compile._IOption value) { @@ -5218,7 +5218,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTime } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.TimeToLiveSpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput__M23_TimeToLiveSpecification(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveSpecification value) { @@ -5226,7 +5226,7 @@ public static Amazon.DynamoDBv2.Model.TimeToLiveSpecification FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveSpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput__M23_TimeToLiveSpecification(Amazon.DynamoDBv2.Model.TimeToLiveSpecification value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification((Amazon.DynamoDBv2.Model.TimeToLiveSpecification)value); } public static Amazon.DynamoDBv2.Model.TimeToLiveSpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateTimeToLiveOutput__M23_TimeToLiveSpecification(Wrappers_Compile._IOption value) { @@ -5460,8 +5460,8 @@ public static Amazon.DynamoDBv2.Model.BackupDetails FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupDetails ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails(Amazon.DynamoDBv2.Model.BackupDetails value) { - long? var_backupSizeBytes = value.BackupSizeBytes; - System.DateTime? var_backupExpiryDateTime = value.BackupExpiryDateTime; + long? var_backupSizeBytes = (long?)value.BackupSizeBytes; + System.DateTime? var_backupExpiryDateTime = (System.DateTime?)value.BackupExpiryDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupDetails(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M9_BackupArn(value.BackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupName(value.BackupName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M15_BackupSizeBytes(var_backupSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M12_BackupStatus(value.BackupStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupType(value.BackupType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M22_BackupCreationDateTime(value.BackupCreationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M20_BackupExpiryDateTime(var_backupExpiryDateTime)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(Dafny.ISequence value) @@ -5491,11 +5491,11 @@ public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription(Amazon.DynamoDBv2.Model.GlobalTableDescription value) { - System.Collections.Generic.List var_replicationGroup = value.ReplicationGroup; - string var_globalTableArn = value.GlobalTableArn; - System.DateTime? var_creationDateTime = value.CreationDateTime; - Amazon.DynamoDBv2.GlobalTableStatus var_globalTableStatus = value.GlobalTableStatus; - string var_globalTableName = value.GlobalTableName; + System.Collections.Generic.List var_replicationGroup = (System.Collections.Generic.List)value.ReplicationGroup; + string var_globalTableArn = (string)value.GlobalTableArn; + System.DateTime? var_creationDateTime = (System.DateTime?)value.CreationDateTime; + Amazon.DynamoDBv2.GlobalTableStatus var_globalTableStatus = (Amazon.DynamoDBv2.GlobalTableStatus)value.GlobalTableStatus; + string var_globalTableName = (string)value.GlobalTableName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M16_ReplicationGroup(var_replicationGroup), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M14_GlobalTableArn(var_globalTableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M16_CreationDateTime(var_creationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M17_GlobalTableStatus(var_globalTableStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M15_GlobalTableName(var_globalTableName)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions(Dafny.ISequence value) @@ -5561,7 +5561,7 @@ public static Amazon.DynamoDBv2.Model.StreamSpecification FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IStreamSpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification(Amazon.DynamoDBv2.Model.StreamSpecification value) { - Amazon.DynamoDBv2.StreamViewType var_streamViewType = value.StreamViewType; + Amazon.DynamoDBv2.StreamViewType var_streamViewType = (Amazon.DynamoDBv2.StreamViewType)value.StreamViewType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.StreamSpecification(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M13_StreamEnabled(value.StreamEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M14_StreamViewType(var_streamViewType)); } public static Amazon.DynamoDBv2.Model.SSESpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSESpecification value) @@ -5573,9 +5573,9 @@ public static Amazon.DynamoDBv2.Model.SSESpecification FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSESpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification(Amazon.DynamoDBv2.Model.SSESpecification value) { - bool? var_enabled = value.Enabled; - Amazon.DynamoDBv2.SSEType var_sSEType = value.SSEType; - string var_kMSMasterKeyId = value.KMSMasterKeyId; + bool? var_enabled = (bool?)value.Enabled; + Amazon.DynamoDBv2.SSEType var_sSEType = (Amazon.DynamoDBv2.SSEType)value.SSEType; + string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SSESpecification(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification__M7_Enabled(var_enabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification__M7_SSEType(var_sSEType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification__M14_KMSMasterKeyId(var_kMSMasterKeyId)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList(Dafny.ISequence value) @@ -5622,8 +5622,8 @@ public static Amazon.DynamoDBv2.Model.OnDemandThroughput FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IOnDemandThroughput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput(Amazon.DynamoDBv2.Model.OnDemandThroughput value) { - long? var_maxReadRequestUnits = value.MaxReadRequestUnits; - long? var_maxWriteRequestUnits = value.MaxWriteRequestUnits; + long? var_maxReadRequestUnits = (long?)value.MaxReadRequestUnits; + long? var_maxWriteRequestUnits = (long?)value.MaxWriteRequestUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput__M19_MaxReadRequestUnits(var_maxReadRequestUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput__M20_MaxWriteRequestUnits(var_maxWriteRequestUnits)); } public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableDescription value) @@ -5656,30 +5656,30 @@ public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription(Amazon.DynamoDBv2.Model.TableDescription value) { - System.Collections.Generic.List var_attributeDefinitions = value.AttributeDefinitions; - string var_tableName = value.TableName; - System.Collections.Generic.List var_keySchema = value.KeySchema; - Amazon.DynamoDBv2.TableStatus var_tableStatus = value.TableStatus; - System.DateTime? var_creationDateTime = value.CreationDateTime; - Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = value.ProvisionedThroughput; - long? var_tableSizeBytes = value.TableSizeBytes; - long? var_itemCount = value.ItemCount; - string var_tableArn = value.TableArn; - string var_tableId = value.TableId; - Amazon.DynamoDBv2.Model.BillingModeSummary var_billingModeSummary = value.BillingModeSummary; - System.Collections.Generic.List var_localSecondaryIndexes = value.LocalSecondaryIndexes; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = value.StreamSpecification; - string var_latestStreamLabel = value.LatestStreamLabel; - string var_latestStreamArn = value.LatestStreamArn; - string var_globalTableVersion = value.GlobalTableVersion; - System.Collections.Generic.List var_replicas = value.Replicas; - Amazon.DynamoDBv2.Model.RestoreSummary var_restoreSummary = value.RestoreSummary; - Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = value.SSEDescription; - Amazon.DynamoDBv2.Model.ArchivalSummary var_archivalSummary = value.ArchivalSummary; - Amazon.DynamoDBv2.Model.TableClassSummary var_tableClassSummary = value.TableClassSummary; - bool? var_deletionProtectionEnabled = value.DeletionProtectionEnabled; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + System.Collections.Generic.List var_attributeDefinitions = (System.Collections.Generic.List)value.AttributeDefinitions; + string var_tableName = (string)value.TableName; + System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; + Amazon.DynamoDBv2.TableStatus var_tableStatus = (Amazon.DynamoDBv2.TableStatus)value.TableStatus; + System.DateTime? var_creationDateTime = (System.DateTime?)value.CreationDateTime; + Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription)value.ProvisionedThroughput; + long? var_tableSizeBytes = (long?)value.TableSizeBytes; + long? var_itemCount = (long?)value.ItemCount; + string var_tableArn = (string)value.TableArn; + string var_tableId = (string)value.TableId; + Amazon.DynamoDBv2.Model.BillingModeSummary var_billingModeSummary = (Amazon.DynamoDBv2.Model.BillingModeSummary)value.BillingModeSummary; + System.Collections.Generic.List var_localSecondaryIndexes = (System.Collections.Generic.List)value.LocalSecondaryIndexes; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamSpecification; + string var_latestStreamLabel = (string)value.LatestStreamLabel; + string var_latestStreamArn = (string)value.LatestStreamArn; + string var_globalTableVersion = (string)value.GlobalTableVersion; + System.Collections.Generic.List var_replicas = (System.Collections.Generic.List)value.Replicas; + Amazon.DynamoDBv2.Model.RestoreSummary var_restoreSummary = (Amazon.DynamoDBv2.Model.RestoreSummary)value.RestoreSummary; + Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = (Amazon.DynamoDBv2.Model.SSEDescription)value.SSEDescription; + Amazon.DynamoDBv2.Model.ArchivalSummary var_archivalSummary = (Amazon.DynamoDBv2.Model.ArchivalSummary)value.ArchivalSummary; + Amazon.DynamoDBv2.Model.TableClassSummary var_tableClassSummary = (Amazon.DynamoDBv2.Model.TableClassSummary)value.TableClassSummary; + bool? var_deletionProtectionEnabled = (bool?)value.DeletionProtectionEnabled; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M20_AttributeDefinitions(var_attributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M11_TableStatus(var_tableStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M16_CreationDateTime(var_creationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M14_TableSizeBytes(var_tableSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M18_BillingModeSummary(var_billingModeSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M19_StreamSpecification(var_streamSpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M17_LatestStreamLabel(var_latestStreamLabel), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M15_LatestStreamArn(var_latestStreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M18_GlobalTableVersion(var_globalTableVersion), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M8_Replicas(var_replicas), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M14_RestoreSummary(var_restoreSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M14_SSEDescription(var_sSEDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M15_ArchivalSummary(var_archivalSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M17_TableClassSummary(var_tableClassSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M25_DeletionProtectionEnabled(var_deletionProtectionEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M18_OnDemandThroughput(var_onDemandThroughput)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(Dafny.ISequence value) @@ -5699,9 +5699,9 @@ public static Amazon.DynamoDBv2.Model.BackupDescription FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription(Amazon.DynamoDBv2.Model.BackupDescription value) { - Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = value.BackupDetails; - Amazon.DynamoDBv2.Model.SourceTableDetails var_sourceTableDetails = value.SourceTableDetails; - Amazon.DynamoDBv2.Model.SourceTableFeatureDetails var_sourceTableFeatureDetails = value.SourceTableFeatureDetails; + Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = (Amazon.DynamoDBv2.Model.BackupDetails)value.BackupDetails; + Amazon.DynamoDBv2.Model.SourceTableDetails var_sourceTableDetails = (Amazon.DynamoDBv2.Model.SourceTableDetails)value.SourceTableDetails; + Amazon.DynamoDBv2.Model.SourceTableFeatureDetails var_sourceTableFeatureDetails = (Amazon.DynamoDBv2.Model.SourceTableFeatureDetails)value.SourceTableFeatureDetails; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription__M13_BackupDetails(var_backupDetails), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription__M18_SourceTableDetails(var_sourceTableDetails), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription__M25_SourceTableFeatureDetails(var_sourceTableFeatureDetails)); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) @@ -5807,13 +5807,13 @@ public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IConsumedCapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity(Amazon.DynamoDBv2.Model.ConsumedCapacity value) { - string var_tableName = value.TableName; - double? var_capacityUnits = value.CapacityUnits; - double? var_readCapacityUnits = value.ReadCapacityUnits; - double? var_writeCapacityUnits = value.WriteCapacityUnits; - Amazon.DynamoDBv2.Model.Capacity var_table = value.Table; - System.Collections.Generic.Dictionary var_localSecondaryIndexes = value.LocalSecondaryIndexes; - System.Collections.Generic.Dictionary var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + string var_tableName = (string)value.TableName; + double? var_capacityUnits = (double?)value.CapacityUnits; + double? var_readCapacityUnits = (double?)value.ReadCapacityUnits; + double? var_writeCapacityUnits = (double?)value.WriteCapacityUnits; + Amazon.DynamoDBv2.Model.Capacity var_table = (Amazon.DynamoDBv2.Model.Capacity)value.Table; + System.Collections.Generic.Dictionary var_localSecondaryIndexes = (System.Collections.Generic.Dictionary)value.LocalSecondaryIndexes; + System.Collections.Generic.Dictionary var_globalSecondaryIndexes = (System.Collections.Generic.Dictionary)value.GlobalSecondaryIndexes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ConsumedCapacity(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M13_CapacityUnits(var_capacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M17_ReadCapacityUnits(var_readCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M18_WriteCapacityUnits(var_writeCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M5_Table(var_table), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes)); } public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics value) @@ -5824,8 +5824,8 @@ public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics(Amazon.DynamoDBv2.Model.ItemCollectionMetrics value) { - System.Collections.Generic.Dictionary var_itemCollectionKey = value.ItemCollectionKey; - System.Collections.Generic.List var_sizeEstimateRangeGB = value.SizeEstimateRangeGB; + System.Collections.Generic.Dictionary var_itemCollectionKey = (System.Collections.Generic.Dictionary)value.ItemCollectionKey; + System.Collections.Generic.List var_sizeEstimateRangeGB = (System.Collections.Generic.List)value.SizeEstimateRangeGB; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ItemCollectionMetrics(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics__M17_ItemCollectionKey(var_itemCollectionKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics__M19_SizeEstimateRangeGB(var_sizeEstimateRangeGB)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(Dafny.ISequence value) @@ -5852,7 +5852,7 @@ public static Amazon.DynamoDBv2.Model.ContinuousBackupsDescription FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContinuousBackupsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription(Amazon.DynamoDBv2.Model.ContinuousBackupsDescription value) { - Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription var_pointInTimeRecoveryDescription = value.PointInTimeRecoveryDescription; + Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription var_pointInTimeRecoveryDescription = (Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription)value.PointInTimeRecoveryDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M23_ContinuousBackupsStatus(value.ContinuousBackupsStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M30_PointInTimeRecoveryDescription(var_pointInTimeRecoveryDescription)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(Dafny.ISequence value) @@ -5909,8 +5909,8 @@ public static Amazon.DynamoDBv2.Model.FailureException FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IFailureException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException(Amazon.DynamoDBv2.Model.FailureException value) { - string var_exceptionName = value.ExceptionName; - string var_exceptionDescription = value.ExceptionDescription; + string var_exceptionName = (string)value.ExceptionName; + string var_exceptionDescription = (string)value.ExceptionDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.FailureException(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException__M13_ExceptionName(var_exceptionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException__M20_ExceptionDescription(var_exceptionDescription)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints(Dafny.ISequence value) @@ -5956,27 +5956,27 @@ public static Amazon.DynamoDBv2.Model.ExportDescription FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription(Amazon.DynamoDBv2.Model.ExportDescription value) { - string var_exportArn = value.ExportArn; - Amazon.DynamoDBv2.ExportStatus var_exportStatus = value.ExportStatus; - System.DateTime? var_startTime = value.StartTime; - System.DateTime? var_endTime = value.EndTime; - string var_exportManifest = value.ExportManifest; - string var_tableArn = value.TableArn; - string var_tableId = value.TableId; - System.DateTime? var_exportTime = value.ExportTime; - string var_clientToken = value.ClientToken; - string var_s3Bucket = value.S3Bucket; - string var_s3BucketOwner = value.S3BucketOwner; - string var_s3Prefix = value.S3Prefix; - Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = value.S3SseAlgorithm; - string var_s3SseKmsKeyId = value.S3SseKmsKeyId; - string var_failureCode = value.FailureCode; - string var_failureMessage = value.FailureMessage; - Amazon.DynamoDBv2.ExportFormat var_exportFormat = value.ExportFormat; - long? var_billedSizeBytes = value.BilledSizeBytes; - long? var_itemCount = value.ItemCount; - Amazon.DynamoDBv2.ExportType var_exportType = value.ExportType; - Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = value.IncrementalExportSpecification; + string var_exportArn = (string)value.ExportArn; + Amazon.DynamoDBv2.ExportStatus var_exportStatus = (Amazon.DynamoDBv2.ExportStatus)value.ExportStatus; + System.DateTime? var_startTime = (System.DateTime?)value.StartTime; + System.DateTime? var_endTime = (System.DateTime?)value.EndTime; + string var_exportManifest = (string)value.ExportManifest; + string var_tableArn = (string)value.TableArn; + string var_tableId = (string)value.TableId; + System.DateTime? var_exportTime = (System.DateTime?)value.ExportTime; + string var_clientToken = (string)value.ClientToken; + string var_s3Bucket = (string)value.S3Bucket; + string var_s3BucketOwner = (string)value.S3BucketOwner; + string var_s3Prefix = (string)value.S3Prefix; + Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = (Amazon.DynamoDBv2.S3SseAlgorithm)value.S3SseAlgorithm; + string var_s3SseKmsKeyId = (string)value.S3SseKmsKeyId; + string var_failureCode = (string)value.FailureCode; + string var_failureMessage = (string)value.FailureMessage; + Amazon.DynamoDBv2.ExportFormat var_exportFormat = (Amazon.DynamoDBv2.ExportFormat)value.ExportFormat; + long? var_billedSizeBytes = (long?)value.BilledSizeBytes; + long? var_itemCount = (long?)value.ItemCount; + Amazon.DynamoDBv2.ExportType var_exportType = (Amazon.DynamoDBv2.ExportType)value.ExportType; + Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = (Amazon.DynamoDBv2.Model.IncrementalExportSpecification)value.IncrementalExportSpecification; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_ExportArn(var_exportArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M12_ExportStatus(var_exportStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_StartTime(var_startTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M7_EndTime(var_endTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M14_ExportManifest(var_exportManifest), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M10_ExportTime(var_exportTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M8_S3Bucket(var_s3Bucket), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M13_S3BucketOwner(var_s3BucketOwner), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M8_S3Prefix(var_s3Prefix), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M14_S3SseAlgorithm(var_s3SseAlgorithm), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M13_S3SseKmsKeyId(var_s3SseKmsKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M11_FailureCode(var_failureCode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M14_FailureMessage(var_failureMessage), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M12_ExportFormat(var_exportFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M15_BilledSizeBytes(var_billedSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M10_ExportType(var_exportType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M30_IncrementalExportSpecification(var_incrementalExportSpecification)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ReplicaSettingsDescriptionList(Dafny.ISequence value) @@ -6020,25 +6020,25 @@ public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription(Amazon.DynamoDBv2.Model.ImportTableDescription value) { - string var_importArn = value.ImportArn; - Amazon.DynamoDBv2.ImportStatus var_importStatus = value.ImportStatus; - string var_tableArn = value.TableArn; - string var_tableId = value.TableId; - string var_clientToken = value.ClientToken; - Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = value.S3BucketSource; - long? var_errorCount = value.ErrorCount; - string var_cloudWatchLogGroupArn = value.CloudWatchLogGroupArn; - Amazon.DynamoDBv2.InputFormat var_inputFormat = value.InputFormat; - Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = value.InputFormatOptions; - Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = value.InputCompressionType; - Amazon.DynamoDBv2.Model.TableCreationParameters var_tableCreationParameters = value.TableCreationParameters; - System.DateTime? var_startTime = value.StartTime; - System.DateTime? var_endTime = value.EndTime; - long? var_processedSizeBytes = value.ProcessedSizeBytes; - long? var_processedItemCount = value.ProcessedItemCount; - long? var_importedItemCount = value.ImportedItemCount; - string var_failureCode = value.FailureCode; - string var_failureMessage = value.FailureMessage; + string var_importArn = (string)value.ImportArn; + Amazon.DynamoDBv2.ImportStatus var_importStatus = (Amazon.DynamoDBv2.ImportStatus)value.ImportStatus; + string var_tableArn = (string)value.TableArn; + string var_tableId = (string)value.TableId; + string var_clientToken = (string)value.ClientToken; + Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = (Amazon.DynamoDBv2.Model.S3BucketSource)value.S3BucketSource; + long? var_errorCount = (long?)value.ErrorCount; + string var_cloudWatchLogGroupArn = (string)value.CloudWatchLogGroupArn; + Amazon.DynamoDBv2.InputFormat var_inputFormat = (Amazon.DynamoDBv2.InputFormat)value.InputFormat; + Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = (Amazon.DynamoDBv2.Model.InputFormatOptions)value.InputFormatOptions; + Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = (Amazon.DynamoDBv2.InputCompressionType)value.InputCompressionType; + Amazon.DynamoDBv2.Model.TableCreationParameters var_tableCreationParameters = (Amazon.DynamoDBv2.Model.TableCreationParameters)value.TableCreationParameters; + System.DateTime? var_startTime = (System.DateTime?)value.StartTime; + System.DateTime? var_endTime = (System.DateTime?)value.EndTime; + long? var_processedSizeBytes = (long?)value.ProcessedSizeBytes; + long? var_processedItemCount = (long?)value.ProcessedItemCount; + long? var_importedItemCount = (long?)value.ImportedItemCount; + string var_failureCode = (string)value.FailureCode; + string var_failureMessage = (string)value.FailureMessage; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M9_ImportArn(var_importArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M12_ImportStatus(var_importStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M14_S3BucketSource(var_s3BucketSource), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M10_ErrorCount(var_errorCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M21_CloudWatchLogGroupArn(var_cloudWatchLogGroupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M11_InputFormat(var_inputFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M18_InputFormatOptions(var_inputFormatOptions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M20_InputCompressionType(var_inputCompressionType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M23_TableCreationParameters(var_tableCreationParameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M9_StartTime(var_startTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M7_EndTime(var_endTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M18_ProcessedSizeBytes(var_processedSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M18_ProcessedItemCount(var_processedItemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M17_ImportedItemCount(var_importedItemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M11_FailureCode(var_failureCode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M14_FailureMessage(var_failureMessage)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_KinesisDataStreamDestinations(Dafny.ISequence value) @@ -6066,9 +6066,9 @@ public static Amazon.DynamoDBv2.Model.TableAutoScalingDescription FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription(Amazon.DynamoDBv2.Model.TableAutoScalingDescription value) { - string var_tableName = value.TableName; - Amazon.DynamoDBv2.TableStatus var_tableStatus = value.TableStatus; - System.Collections.Generic.List var_replicas = value.Replicas; + string var_tableName = (string)value.TableName; + Amazon.DynamoDBv2.TableStatus var_tableStatus = (Amazon.DynamoDBv2.TableStatus)value.TableStatus; + System.Collections.Generic.List var_replicas = (System.Collections.Generic.List)value.Replicas; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableAutoScalingDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M11_TableStatus(var_tableStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M8_Replicas(var_replicas)); } public static Amazon.DynamoDBv2.Model.TimeToLiveDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveDescription value) @@ -6079,8 +6079,8 @@ public static Amazon.DynamoDBv2.Model.TimeToLiveDescription FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription(Amazon.DynamoDBv2.Model.TimeToLiveDescription value) { - Amazon.DynamoDBv2.TimeToLiveStatus var_timeToLiveStatus = value.TimeToLiveStatus; - string var_attributeName = value.AttributeName; + Amazon.DynamoDBv2.TimeToLiveStatus var_timeToLiveStatus = (Amazon.DynamoDBv2.TimeToLiveStatus)value.TimeToLiveStatus; + string var_attributeName = (string)value.AttributeName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TimeToLiveDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription__M16_TimeToLiveStatus(var_timeToLiveStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription__M13_AttributeName(var_attributeName)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(Dafny.ISequence value) @@ -6098,7 +6098,7 @@ public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingConfiguration ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_EnableKinesisStreamingConfiguration(Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration value) { - Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = value.ApproximateCreationDateTimePrecision; + Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = (Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision)value.ApproximateCreationDateTimePrecision; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingConfiguration(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_EnableKinesisStreamingConfiguration__M36_ApproximateCreationDateTimePrecision(var_approximateCreationDateTimePrecision)); } public static Amazon.DynamoDBv2.DestinationStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DestinationStatus(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDestinationStatus value) @@ -6290,9 +6290,9 @@ public static Amazon.DynamoDBv2.Model.IncrementalExportSpecification FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IIncrementalExportSpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification(Amazon.DynamoDBv2.Model.IncrementalExportSpecification value) { - System.DateTime? var_exportFromTime = value.ExportFromTime; - System.DateTime? var_exportToTime = value.ExportToTime; - Amazon.DynamoDBv2.ExportViewType var_exportViewType = value.ExportViewType; + System.DateTime? var_exportFromTime = (System.DateTime?)value.ExportFromTime; + System.DateTime? var_exportToTime = (System.DateTime?)value.ExportToTime; + Amazon.DynamoDBv2.ExportViewType var_exportViewType = (Amazon.DynamoDBv2.ExportViewType)value.ExportViewType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.IncrementalExportSpecification(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M14_ExportFromTime(var_exportFromTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M12_ExportToTime(var_exportToTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M14_ExportViewType(var_exportViewType)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_AttributeNameList(Dafny.ISequence> value) @@ -6320,8 +6320,8 @@ public static Amazon.DynamoDBv2.Model.S3BucketSource FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IS3BucketSource ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource(Amazon.DynamoDBv2.Model.S3BucketSource value) { - string var_s3BucketOwner = value.S3BucketOwner; - string var_s3KeyPrefix = value.S3KeyPrefix; + string var_s3BucketOwner = (string)value.S3BucketOwner; + string var_s3KeyPrefix = (string)value.S3KeyPrefix; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.S3BucketSource(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M13_S3BucketOwner(var_s3BucketOwner), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M8_S3Bucket(value.S3Bucket), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M11_S3KeyPrefix(var_s3KeyPrefix)); } public static Amazon.DynamoDBv2.InputFormat FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_InputFormat(software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormat value) @@ -6345,7 +6345,7 @@ public static Amazon.DynamoDBv2.Model.InputFormatOptions FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormatOptions ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_InputFormatOptions(Amazon.DynamoDBv2.Model.InputFormatOptions value) { - Amazon.DynamoDBv2.Model.CsvOptions var_csv = value.Csv; + Amazon.DynamoDBv2.Model.CsvOptions var_csv = (Amazon.DynamoDBv2.Model.CsvOptions)value.Csv; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormatOptions(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_InputFormatOptions__M3_Csv(var_csv)); } public static Amazon.DynamoDBv2.InputCompressionType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_InputCompressionType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputCompressionType value) @@ -6376,11 +6376,11 @@ public static Amazon.DynamoDBv2.Model.TableCreationParameters FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableCreationParameters ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters(Amazon.DynamoDBv2.Model.TableCreationParameters value) { - Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = value.SSESpecification; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecification; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableCreationParameters(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M20_AttributeDefinitions(value.AttributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M18_OnDemandThroughput(var_onDemandThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M16_SSESpecification(var_sSESpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_String(Dafny.ISequence value) @@ -6730,11 +6730,11 @@ public static Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate(Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate value) { - long? var_minimumUnits = value.MinimumUnits; - long? var_maximumUnits = value.MaximumUnits; - bool? var_autoScalingDisabled = value.AutoScalingDisabled; - string var_autoScalingRoleArn = value.AutoScalingRoleArn; - Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate var_scalingPolicyUpdate = value.ScalingPolicyUpdate; + long? var_minimumUnits = (long?)value.MinimumUnits; + long? var_maximumUnits = (long?)value.MaximumUnits; + bool? var_autoScalingDisabled = (bool?)value.AutoScalingDisabled; + string var_autoScalingRoleArn = (string)value.AutoScalingRoleArn; + Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate var_scalingPolicyUpdate = (Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate)value.ScalingPolicyUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M12_MinimumUnits(var_minimumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M12_MaximumUnits(var_maximumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M19_AutoScalingDisabled(var_autoScalingDisabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M18_AutoScalingRoleArn(var_autoScalingRoleArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M19_ScalingPolicyUpdate(var_scalingPolicyUpdate)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_GlobalTableGlobalSecondaryIndexSettingsUpdateList(Dafny.ISequence value) @@ -6778,7 +6778,7 @@ public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingConfiguration ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateKinesisStreamingConfiguration(Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration value) { - Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = value.ApproximateCreationDateTimePrecision; + Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = (Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision)value.ApproximateCreationDateTimePrecision; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingConfiguration(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateKinesisStreamingConfiguration__M36_ApproximateCreationDateTimePrecision(var_approximateCreationDateTimePrecision)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_GlobalSecondaryIndexUpdateList(Dafny.ISequence value) @@ -6830,7 +6830,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetA } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetAttributeValue__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue__M6_member(Dafny.ISequence value) { @@ -6838,7 +6838,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetA } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue__M6_member(Dafny.ISequence value) { @@ -6846,7 +6846,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue__M6_member(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue((System.IO.MemoryStream)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M3_key(Dafny.ISequence value) { @@ -6854,7 +6854,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttribu } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -6862,7 +6862,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -6870,7 +6870,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue__M6_member(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static Amazon.DynamoDBv2.Model.BatchStatementRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementRequest value) { @@ -6878,7 +6878,7 @@ public static Amazon.DynamoDBv2.Model.BatchStatementRequest FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest__M6_member(Amazon.DynamoDBv2.Model.BatchStatementRequest value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest((Amazon.DynamoDBv2.Model.BatchStatementRequest)value); } public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_PartiQLBatchResponse__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse value) { @@ -6886,7 +6886,7 @@ public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_PartiQLBatchResponse__M6_member(Amazon.DynamoDBv2.Model.BatchStatementResponse value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse((Amazon.DynamoDBv2.Model.BatchStatementResponse)value); } public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ConsumedCapacityMultiple__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IConsumedCapacity value) { @@ -6894,7 +6894,7 @@ public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amaz } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IConsumedCapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ConsumedCapacityMultiple__M6_member(Amazon.DynamoDBv2.Model.ConsumedCapacity value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity((Amazon.DynamoDBv2.Model.ConsumedCapacity)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M3_key(Dafny.ISequence value) { @@ -6902,7 +6902,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes value) { @@ -6910,7 +6910,7 @@ public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M5_value(Amazon.DynamoDBv2.Model.KeysAndAttributes value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes((Amazon.DynamoDBv2.Model.KeysAndAttributes)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M3_key(Dafny.ISequence value) { @@ -6918,7 +6918,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.List> FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M5_value(Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> value) { @@ -6926,7 +6926,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M5_value(System.Collections.Generic.List> value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList((System.Collections.Generic.List>)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M3_key(Dafny.ISequence value) { @@ -6934,7 +6934,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWrite } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M5_value(Dafny.ISequence value) { @@ -6942,7 +6942,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M5_value(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M3_key(Dafny.ISequence value) { @@ -6950,7 +6950,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M5_value(Dafny.ISequence value) { @@ -6958,7 +6958,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M5_value(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M3_key(Dafny.ISequence value) { @@ -6966,7 +6966,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeM } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -6974,7 +6974,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M9_BackupArn(Dafny.ISequence value) { @@ -6982,7 +6982,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDeta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupName(Dafny.ISequence value) { @@ -6990,7 +6990,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDeta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName((string)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M15_BackupSizeBytes(Wrappers_Compile._IOption value) { @@ -7006,7 +7006,7 @@ public static Amazon.DynamoDBv2.BackupStatus FromDafny_N3_com__N9_amazonaws__N8_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupStatus ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M12_BackupStatus(Amazon.DynamoDBv2.BackupStatus value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_BackupStatus(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_BackupStatus((Amazon.DynamoDBv2.BackupStatus)value); } public static Amazon.DynamoDBv2.BackupType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupType value) { @@ -7014,7 +7014,7 @@ public static Amazon.DynamoDBv2.BackupType FromDafny_N3_com__N9_amazonaws__N8_dy } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupType ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupType(Amazon.DynamoDBv2.BackupType value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupType(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupType((Amazon.DynamoDBv2.BackupType)value); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M22_BackupCreationDateTime(Dafny.ISequence value) { @@ -7022,7 +7022,7 @@ public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_B } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M22_BackupCreationDateTime(System.DateTime value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime((System.DateTime)value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M20_BackupExpiryDateTime(Wrappers_Compile._IOption> value) { @@ -7038,7 +7038,7 @@ public static Amazon.DynamoDBv2.Model.Replica FromDafny_N3_com__N9_amazonaws__N8 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplica ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_ReplicaList__M6_member(Amazon.DynamoDBv2.Model.Replica value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica((Amazon.DynamoDBv2.Model.Replica)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M16_ReplicationGroup(Wrappers_Compile._IOption> value) { @@ -7086,7 +7086,7 @@ public static Amazon.DynamoDBv2.Model.AttributeDefinition FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeDefinition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions__M6_member(Amazon.DynamoDBv2.Model.AttributeDefinition value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition((Amazon.DynamoDBv2.Model.AttributeDefinition)value); } public static Amazon.DynamoDBv2.Model.KeySchemaElement FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeySchemaElement value) { @@ -7094,7 +7094,7 @@ public static Amazon.DynamoDBv2.Model.KeySchemaElement FromDafny_N3_com__N9_amaz } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeySchemaElement ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema__M6_member(Amazon.DynamoDBv2.Model.KeySchemaElement value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement((Amazon.DynamoDBv2.Model.KeySchemaElement)value); } public static Amazon.DynamoDBv2.Model.LocalSecondaryIndex FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndex value) { @@ -7102,7 +7102,7 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndex FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexList__M6_member(Amazon.DynamoDBv2.Model.LocalSecondaryIndex value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex((Amazon.DynamoDBv2.Model.LocalSecondaryIndex)value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndex FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndex value) { @@ -7110,7 +7110,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndex FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndex value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex((Amazon.DynamoDBv2.Model.GlobalSecondaryIndex)value); } public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M17_ReadCapacityUnits(long value) { @@ -7118,7 +7118,7 @@ public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedT } public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M17_ReadCapacityUnits(long value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject((long)value); } public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M18_WriteCapacityUnits(long value) { @@ -7126,7 +7126,7 @@ public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedT } public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M18_WriteCapacityUnits(long value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject((long)value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M13_StreamEnabled(bool value) { @@ -7134,7 +7134,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecif } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M13_StreamEnabled(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_StreamEnabled(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_StreamEnabled((bool)value); } public static Amazon.DynamoDBv2.StreamViewType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M14_StreamViewType(Wrappers_Compile._IOption value) { @@ -7174,7 +7174,7 @@ public static Amazon.DynamoDBv2.Model.Tag FromDafny_N3_com__N9_amazonaws__N8_dyn } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITag ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList__M6_member(Amazon.DynamoDBv2.Model.Tag value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag((Amazon.DynamoDBv2.Model.Tag)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput__M19_MaxReadRequestUnits(Wrappers_Compile._IOption value) { @@ -7414,7 +7414,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M3_key } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -7422,7 +7422,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M3_key(Dafny.ISequence value) { @@ -7430,7 +7430,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAt } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue value) { @@ -7438,7 +7438,7 @@ public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M5_value(Amazon.DynamoDBv2.Model.ExpectedAttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue((Amazon.DynamoDBv2.Model.ExpectedAttributeValue)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M3_key(Dafny.ISequence value) { @@ -7446,7 +7446,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_Expression } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ExpressionAttributeNameVariable(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ExpressionAttributeNameVariable((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M5_value(Dafny.ISequence value) { @@ -7454,7 +7454,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_Expression } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M5_value(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M3_key(Dafny.ISequence value) { @@ -7462,7 +7462,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_Expression } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ExpressionAttributeValueVariable(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ExpressionAttributeValueVariable((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -7470,7 +7470,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M9_TableName(Wrappers_Compile._IOption> value) { @@ -7550,7 +7550,7 @@ public static Amazon.DynamoDBv2.ContinuousBackupsStatus FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContinuousBackupsStatus ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M23_ContinuousBackupsStatus(Amazon.DynamoDBv2.ContinuousBackupsStatus value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContinuousBackupsStatus(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContinuousBackupsStatus((Amazon.DynamoDBv2.ContinuousBackupsStatus)value); } public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M30_PointInTimeRecoveryDescription(Wrappers_Compile._IOption value) { @@ -7566,7 +7566,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_Contributo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ContributorInsightsRuleList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContributorInsightsRule(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContributorInsightsRule((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException__M13_ExceptionName(Wrappers_Compile._IOption> value) { @@ -7590,7 +7590,7 @@ public static Amazon.DynamoDBv2.Model.Endpoint FromDafny_N3_com__N9_amazonaws__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEndpoint ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints__M6_member(Amazon.DynamoDBv2.Model.Endpoint value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint((Amazon.DynamoDBv2.Model.Endpoint)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_ExportArn(Wrappers_Compile._IOption> value) { @@ -7766,7 +7766,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsDescription FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ReplicaSettingsDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaSettingsDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription((Amazon.DynamoDBv2.Model.ReplicaSettingsDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M9_ImportArn(Wrappers_Compile._IOption> value) { @@ -7926,7 +7926,7 @@ public static Amazon.DynamoDBv2.Model.KinesisDataStreamDestination FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKinesisDataStreamDestination ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_KinesisDataStreamDestinations__M6_member(Amazon.DynamoDBv2.Model.KinesisDataStreamDestination value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination((Amazon.DynamoDBv2.Model.KinesisDataStreamDestination)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M9_TableName(Wrappers_Compile._IOption> value) { @@ -7982,7 +7982,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_PreparedStatementParameters__M6_member(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList__M6_member(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -7990,7 +7990,7 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList__M6_member(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap((System.Collections.Generic.Dictionary)value); } public static Amazon.DynamoDBv2.Model.ParameterizedStatement FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IParameterizedStatement value) { @@ -7998,7 +7998,7 @@ public static Amazon.DynamoDBv2.Model.ParameterizedStatement FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IParameterizedStatement ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements__M6_member(Amazon.DynamoDBv2.Model.ParameterizedStatement value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement((Amazon.DynamoDBv2.Model.ParameterizedStatement)value); } public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ItemResponseList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse value) { @@ -8006,7 +8006,7 @@ public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaw } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ItemResponseList__M6_member(Amazon.DynamoDBv2.Model.ItemResponse value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse((Amazon.DynamoDBv2.Model.ItemResponse)value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M14_ExportFromTime(Wrappers_Compile._IOption> value) { @@ -8038,7 +8038,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_AttributeN } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_AttributeNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M13_S3BucketOwner(Wrappers_Compile._IOption> value) { @@ -8054,7 +8054,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M8_S3Bucket(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M11_S3KeyPrefix(Wrappers_Compile._IOption> value) { @@ -8078,7 +8078,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreat } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M20_AttributeDefinitions(Dafny.ISequence value) { @@ -8086,7 +8086,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M20_AttributeDefinitions(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions((System.Collections.Generic.List)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_KeySchema(Dafny.ISequence value) { @@ -8094,7 +8094,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M11_BillingMode(Wrappers_Compile._IOption value) { @@ -8142,7 +8142,7 @@ public static Amazon.DynamoDBv2.Model.BackupSummary FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_BackupSummaries__M6_member(Amazon.DynamoDBv2.Model.BackupSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary((Amazon.DynamoDBv2.Model.BackupSummary)value); } public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContributorInsightsSummaries__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary value) { @@ -8150,7 +8150,7 @@ public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContributorInsightsSummaries__M6_member(Amazon.DynamoDBv2.Model.ContributorInsightsSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary((Amazon.DynamoDBv2.Model.ContributorInsightsSummary)value); } public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportSummaries__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary value) { @@ -8158,7 +8158,7 @@ public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportSummaries__M6_member(Amazon.DynamoDBv2.Model.ExportSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary((Amazon.DynamoDBv2.Model.ExportSummary)value); } public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_GlobalTableList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable value) { @@ -8166,7 +8166,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_GlobalTableList__M6_member(Amazon.DynamoDBv2.Model.GlobalTable value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable((Amazon.DynamoDBv2.Model.GlobalTable)value); } public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportSummaryList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary value) { @@ -8174,7 +8174,7 @@ public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportSummaryList__M6_member(Amazon.DynamoDBv2.Model.ImportSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary((Amazon.DynamoDBv2.Model.ImportSummary)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_TableNameList__M6_member(Dafny.ISequence value) { @@ -8182,7 +8182,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_TableNameL } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_TableNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M3_key(Dafny.ISequence value) { @@ -8190,7 +8190,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInp } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -8198,7 +8198,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M3_key(Dafny.ISequence value) { @@ -8206,7 +8206,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditi } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition value) { @@ -8214,7 +8214,7 @@ public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M5_value(Amazon.DynamoDBv2.Model.Condition value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition((Amazon.DynamoDBv2.Model.Condition)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M3_key(Dafny.ISequence value) { @@ -8222,7 +8222,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterCond } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition value) { @@ -8230,7 +8230,7 @@ public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M5_value(Amazon.DynamoDBv2.Model.Condition value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition((Amazon.DynamoDBv2.Model.Condition)value); } public static Amazon.DynamoDBv2.Model.TransactGetItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItem value) { @@ -8238,7 +8238,7 @@ public static Amazon.DynamoDBv2.Model.TransactGetItem FromDafny_N3_com__N9_amazo } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItem ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList__M6_member(Amazon.DynamoDBv2.Model.TransactGetItem value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem((Amazon.DynamoDBv2.Model.TransactGetItem)value); } public static Amazon.DynamoDBv2.Model.CancellationReason FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CancellationReasonList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICancellationReason value) { @@ -8246,7 +8246,7 @@ public static Amazon.DynamoDBv2.Model.CancellationReason FromDafny_N3_com__N9_am } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICancellationReason ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CancellationReasonList__M6_member(Amazon.DynamoDBv2.Model.CancellationReason value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason((Amazon.DynamoDBv2.Model.CancellationReason)value); } public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem value) { @@ -8254,7 +8254,7 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList__M6_member(Amazon.DynamoDBv2.Model.TransactWriteItem value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem((Amazon.DynamoDBv2.Model.TransactWriteItem)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList__M6_member(Dafny.ISequence value) { @@ -8262,7 +8262,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString((string)value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification__M26_PointInTimeRecoveryEnabled(bool value) { @@ -8270,7 +8270,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeR } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification__M26_PointInTimeRecoveryEnabled(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BooleanObject(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BooleanObject((bool)value); } public static Amazon.DynamoDBv2.Model.ReplicaUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaUpdate value) { @@ -8278,7 +8278,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaUpdate FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate((Amazon.DynamoDBv2.Model.ReplicaUpdate)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M12_MinimumUnits(Wrappers_Compile._IOption value) { @@ -8326,7 +8326,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpd } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_GlobalTableGlobalSecondaryIndexSettingsUpdateList__M6_member(Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate((Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate)value); } public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ReplicaSettingsUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate value) { @@ -8334,7 +8334,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ReplicaSettingsUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate((Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M3_key(Dafny.ISequence value) { @@ -8342,7 +8342,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeU } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate value) { @@ -8350,7 +8350,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M5_value(Amazon.DynamoDBv2.Model.AttributeValueUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate((Amazon.DynamoDBv2.Model.AttributeValueUpdate)value); } public static Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateKinesisStreamingConfiguration__M36_ApproximateCreationDateTimePrecision(Wrappers_Compile._IOption value) { @@ -8366,7 +8366,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_GlobalSecondaryIndexUpdateList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate)value); } public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicationGroupUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate value) { @@ -8374,7 +8374,7 @@ public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicationGroupUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicationGroupUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate((Amazon.DynamoDBv2.Model.ReplicationGroupUpdate)value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_GlobalSecondaryIndexAutoScalingUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate value) { @@ -8382,7 +8382,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate From } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_GlobalSecondaryIndexAutoScalingUpdateList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate)value); } public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ReplicaAutoScalingUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate value) { @@ -8390,7 +8390,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ReplicaAutoScalingUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate((Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate)value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M7_Enabled(bool value) { @@ -8398,7 +8398,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSp } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M7_Enabled(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TimeToLiveEnabled(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TimeToLiveEnabled((bool)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M13_AttributeName(Dafny.ISequence value) { @@ -8406,7 +8406,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLive } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M13_AttributeName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveAttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveAttributeName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(Dafny.ISequence value) { @@ -8426,9 +8426,9 @@ public static Amazon.DynamoDBv2.Model.BatchStatementRequest FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest(Amazon.DynamoDBv2.Model.BatchStatementRequest value) { - System.Collections.Generic.List var_parameters = value.Parameters; - bool? var_consistentRead = value.ConsistentRead; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.List var_parameters = (System.Collections.Generic.List)value.Parameters; + bool? var_consistentRead = (bool?)value.ConsistentRead; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementRequest(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M9_Statement(value.Statement), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M10_Parameters(var_parameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse value) @@ -8440,9 +8440,9 @@ public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse(Amazon.DynamoDBv2.Model.BatchStatementResponse value) { - Amazon.DynamoDBv2.Model.BatchStatementError var_error = value.Error; - string var_tableName = value.TableName; - System.Collections.Generic.Dictionary var_item = value.Item; + Amazon.DynamoDBv2.Model.BatchStatementError var_error = (Amazon.DynamoDBv2.Model.BatchStatementError)value.Error; + string var_tableName = (string)value.TableName; + System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementResponse(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse__M5_Error(var_error), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse__M4_Item(var_item)); } public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes value) @@ -8456,10 +8456,10 @@ public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes(Amazon.DynamoDBv2.Model.KeysAndAttributes value) { - System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; - bool? var_consistentRead = value.ConsistentRead; - string var_projectionExpression = value.ProjectionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; + bool? var_consistentRead = (bool?)value.ConsistentRead; + string var_projectionExpression = (string)value.ProjectionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.KeysAndAttributes(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M4_Keys(value.Keys), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M24_ExpressionAttributeNames(var_expressionAttributeNames)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests(Dafny.ISequence value) @@ -8533,7 +8533,7 @@ public static Amazon.DynamoDBv2.Model.Replica FromDafny_N3_com__N9_amazonaws__N8 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplica ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica(Amazon.DynamoDBv2.Model.Replica value) { - string var_regionName = value.RegionName; + string var_regionName = (string)value.RegionName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Replica(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica__M10_RegionName(var_regionName)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicaDescriptionList(Dafny.ISequence value) @@ -8613,8 +8613,8 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndex FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex(Amazon.DynamoDBv2.Model.GlobalSecondaryIndex value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndex(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M10_Projection(value.Projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M18_OnDemandThroughput(var_onDemandThroughput)); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_StreamEnabled(bool value) @@ -8721,11 +8721,11 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughputDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription(Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription value) { - System.DateTime? var_lastIncreaseDateTime = value.LastIncreaseDateTime; - System.DateTime? var_lastDecreaseDateTime = value.LastDecreaseDateTime; - long? var_numberOfDecreasesToday = value.NumberOfDecreasesToday; - long? var_readCapacityUnits = value.ReadCapacityUnits; - long? var_writeCapacityUnits = value.WriteCapacityUnits; + System.DateTime? var_lastIncreaseDateTime = (System.DateTime?)value.LastIncreaseDateTime; + System.DateTime? var_lastDecreaseDateTime = (System.DateTime?)value.LastDecreaseDateTime; + long? var_numberOfDecreasesToday = (long?)value.NumberOfDecreasesToday; + long? var_readCapacityUnits = (long?)value.ReadCapacityUnits; + long? var_writeCapacityUnits = (long?)value.WriteCapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughputDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M20_LastIncreaseDateTime(var_lastIncreaseDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M20_LastDecreaseDateTime(var_lastDecreaseDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M22_NumberOfDecreasesToday(var_numberOfDecreasesToday), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M17_ReadCapacityUnits(var_readCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M18_WriteCapacityUnits(var_writeCapacityUnits)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TableId(Dafny.ISequence value) @@ -8744,8 +8744,8 @@ public static Amazon.DynamoDBv2.Model.BillingModeSummary FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBillingModeSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BillingModeSummary(Amazon.DynamoDBv2.Model.BillingModeSummary value) { - Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; - System.DateTime? var_lastUpdateToPayPerRequestDateTime = value.LastUpdateToPayPerRequestDateTime; + Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; + System.DateTime? var_lastUpdateToPayPerRequestDateTime = (System.DateTime?)value.LastUpdateToPayPerRequestDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BillingModeSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BillingModeSummary__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BillingModeSummary__M33_LastUpdateToPayPerRequestDateTime(var_lastUpdateToPayPerRequestDateTime)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_LocalSecondaryIndexDescriptionList(Dafny.ISequence value) @@ -8774,8 +8774,8 @@ public static Amazon.DynamoDBv2.Model.RestoreSummary FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary(Amazon.DynamoDBv2.Model.RestoreSummary value) { - string var_sourceBackupArn = value.SourceBackupArn; - string var_sourceTableArn = value.SourceTableArn; + string var_sourceBackupArn = (string)value.SourceBackupArn; + string var_sourceTableArn = (string)value.SourceTableArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_SourceBackupArn(var_sourceBackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M14_SourceTableArn(var_sourceTableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_RestoreDateTime(value.RestoreDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M17_RestoreInProgress(value.RestoreInProgress)); } public static Amazon.DynamoDBv2.Model.SSEDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSEDescription value) @@ -8788,10 +8788,10 @@ public static Amazon.DynamoDBv2.Model.SSEDescription FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSEDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription(Amazon.DynamoDBv2.Model.SSEDescription value) { - Amazon.DynamoDBv2.SSEStatus var_status = value.Status; - Amazon.DynamoDBv2.SSEType var_sSEType = value.SSEType; - string var_kMSMasterKeyArn = value.KMSMasterKeyArn; - System.DateTime? var_inaccessibleEncryptionDateTime = value.InaccessibleEncryptionDateTime; + Amazon.DynamoDBv2.SSEStatus var_status = (Amazon.DynamoDBv2.SSEStatus)value.Status; + Amazon.DynamoDBv2.SSEType var_sSEType = (Amazon.DynamoDBv2.SSEType)value.SSEType; + string var_kMSMasterKeyArn = (string)value.KMSMasterKeyArn; + System.DateTime? var_inaccessibleEncryptionDateTime = (System.DateTime?)value.InaccessibleEncryptionDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SSEDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M6_Status(var_status), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M7_SSEType(var_sSEType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M15_KMSMasterKeyArn(var_kMSMasterKeyArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M30_InaccessibleEncryptionDateTime(var_inaccessibleEncryptionDateTime)); } public static Amazon.DynamoDBv2.Model.ArchivalSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IArchivalSummary value) @@ -8803,9 +8803,9 @@ public static Amazon.DynamoDBv2.Model.ArchivalSummary FromDafny_N3_com__N9_amazo public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IArchivalSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary(Amazon.DynamoDBv2.Model.ArchivalSummary value) { - System.DateTime? var_archivalDateTime = value.ArchivalDateTime; - string var_archivalReason = value.ArchivalReason; - string var_archivalBackupArn = value.ArchivalBackupArn; + System.DateTime? var_archivalDateTime = (System.DateTime?)value.ArchivalDateTime; + string var_archivalReason = (string)value.ArchivalReason; + string var_archivalBackupArn = (string)value.ArchivalBackupArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary__M16_ArchivalDateTime(var_archivalDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary__M14_ArchivalReason(var_archivalReason), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary__M17_ArchivalBackupArn(var_archivalBackupArn)); } public static Amazon.DynamoDBv2.Model.TableClassSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableClassSummary value) @@ -8816,8 +8816,8 @@ public static Amazon.DynamoDBv2.Model.TableClassSummary FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableClassSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary(Amazon.DynamoDBv2.Model.TableClassSummary value) { - Amazon.DynamoDBv2.TableClass var_tableClass = value.TableClass; - System.DateTime? var_lastUpdateDateTime = value.LastUpdateDateTime; + Amazon.DynamoDBv2.TableClass var_tableClass = (Amazon.DynamoDBv2.TableClass)value.TableClass; + System.DateTime? var_lastUpdateDateTime = (System.DateTime?)value.LastUpdateDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableClassSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary__M10_TableClass(var_tableClass), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary__M18_LastUpdateDateTime(var_lastUpdateDateTime)); } public static Amazon.DynamoDBv2.Model.SourceTableDetails FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableDetails value) @@ -8836,11 +8836,11 @@ public static Amazon.DynamoDBv2.Model.SourceTableDetails FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableDetails ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails(Amazon.DynamoDBv2.Model.SourceTableDetails value) { - string var_tableArn = value.TableArn; - long? var_tableSizeBytes = value.TableSizeBytes; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; - long? var_itemCount = value.ItemCount; - Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; + string var_tableArn = (string)value.TableArn; + long? var_tableSizeBytes = (long?)value.TableSizeBytes; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + long? var_itemCount = (long?)value.ItemCount; + Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SourceTableDetails(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M7_TableId(value.TableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M14_TableSizeBytes(var_tableSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_TableCreationDateTime(value.TableCreationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_ProvisionedThroughput(value.ProvisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M18_OnDemandThroughput(var_onDemandThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M11_BillingMode(var_billingMode)); } public static Amazon.DynamoDBv2.Model.SourceTableFeatureDetails FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableFeatureDetails value) @@ -8854,11 +8854,11 @@ public static Amazon.DynamoDBv2.Model.SourceTableFeatureDetails FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableFeatureDetails ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails(Amazon.DynamoDBv2.Model.SourceTableFeatureDetails value) { - System.Collections.Generic.List var_localSecondaryIndexes = value.LocalSecondaryIndexes; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamDescription = value.StreamDescription; - Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = value.TimeToLiveDescription; - Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = value.SSEDescription; + System.Collections.Generic.List var_localSecondaryIndexes = (System.Collections.Generic.List)value.LocalSecondaryIndexes; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamDescription = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamDescription; + Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = (Amazon.DynamoDBv2.Model.TimeToLiveDescription)value.TimeToLiveDescription; + Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = (Amazon.DynamoDBv2.Model.SSEDescription)value.SSEDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SourceTableFeatureDetails(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M17_StreamDescription(var_streamDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M21_TimeToLiveDescription(var_timeToLiveDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M14_SSEDescription(var_sSEDescription)); } public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue value) @@ -8871,10 +8871,10 @@ public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue(Amazon.DynamoDBv2.Model.ExpectedAttributeValue value) { - Amazon.DynamoDBv2.Model.AttributeValue var_value = value.Value; - bool? var_exists = value.Exists; - Amazon.DynamoDBv2.ComparisonOperator var_comparisonOperator = value.ComparisonOperator; - System.Collections.Generic.List var_attributeValueList = value.AttributeValueList; + Amazon.DynamoDBv2.Model.AttributeValue var_value = (Amazon.DynamoDBv2.Model.AttributeValue)value.Value; + bool? var_exists = (bool?)value.Exists; + Amazon.DynamoDBv2.ComparisonOperator var_comparisonOperator = (Amazon.DynamoDBv2.ComparisonOperator)value.ComparisonOperator; + System.Collections.Generic.List var_attributeValueList = (System.Collections.Generic.List)value.AttributeValueList; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExpectedAttributeValue(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M5_Value(var_value), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M6_Exists(var_exists), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M18_ComparisonOperator(var_comparisonOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M18_AttributeValueList(var_attributeValueList)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ExpressionAttributeNameVariable(Dafny.ISequence value) @@ -8910,9 +8910,9 @@ public static Amazon.DynamoDBv2.Model.Capacity FromDafny_N3_com__N9_amazonaws__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity(Amazon.DynamoDBv2.Model.Capacity value) { - double? var_readCapacityUnits = value.ReadCapacityUnits; - double? var_writeCapacityUnits = value.WriteCapacityUnits; - double? var_capacityUnits = value.CapacityUnits; + double? var_readCapacityUnits = (double?)value.ReadCapacityUnits; + double? var_writeCapacityUnits = (double?)value.WriteCapacityUnits; + double? var_capacityUnits = (double?)value.CapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Capacity(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity__M17_ReadCapacityUnits(var_readCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity__M18_WriteCapacityUnits(var_writeCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity__M13_CapacityUnits(var_capacityUnits)); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity> value) @@ -8964,9 +8964,9 @@ public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPointInTimeRecoveryDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription(Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription value) { - Amazon.DynamoDBv2.PointInTimeRecoveryStatus var_pointInTimeRecoveryStatus = value.PointInTimeRecoveryStatus; - System.DateTime? var_earliestRestorableDateTime = value.EarliestRestorableDateTime; - System.DateTime? var_latestRestorableDateTime = value.LatestRestorableDateTime; + Amazon.DynamoDBv2.PointInTimeRecoveryStatus var_pointInTimeRecoveryStatus = (Amazon.DynamoDBv2.PointInTimeRecoveryStatus)value.PointInTimeRecoveryStatus; + System.DateTime? var_earliestRestorableDateTime = (System.DateTime?)value.EarliestRestorableDateTime; + System.DateTime? var_latestRestorableDateTime = (System.DateTime?)value.LatestRestorableDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoveryDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M25_PointInTimeRecoveryStatus(var_pointInTimeRecoveryStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M26_EarliestRestorableDateTime(var_earliestRestorableDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M24_LatestRestorableDateTime(var_latestRestorableDateTime)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContributorInsightsRule(Dafny.ISequence value) @@ -9097,14 +9097,14 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsDescription FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription(Amazon.DynamoDBv2.Model.ReplicaSettingsDescription value) { - Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = value.ReplicaStatus; - Amazon.DynamoDBv2.Model.BillingModeSummary var_replicaBillingModeSummary = value.ReplicaBillingModeSummary; - long? var_replicaProvisionedReadCapacityUnits = value.ReplicaProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = value.ReplicaProvisionedReadCapacityAutoScalingSettings; - long? var_replicaProvisionedWriteCapacityUnits = value.ReplicaProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = value.ReplicaProvisionedWriteCapacityAutoScalingSettings; - System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettings = value.ReplicaGlobalSecondaryIndexSettings; - Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = value.ReplicaTableClassSummary; + Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = (Amazon.DynamoDBv2.ReplicaStatus)value.ReplicaStatus; + Amazon.DynamoDBv2.Model.BillingModeSummary var_replicaBillingModeSummary = (Amazon.DynamoDBv2.Model.BillingModeSummary)value.ReplicaBillingModeSummary; + long? var_replicaProvisionedReadCapacityUnits = (long?)value.ReplicaProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedReadCapacityAutoScalingSettings; + long? var_replicaProvisionedWriteCapacityUnits = (long?)value.ReplicaProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedWriteCapacityAutoScalingSettings; + System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettings = (System.Collections.Generic.List)value.ReplicaGlobalSecondaryIndexSettings; + Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = (Amazon.DynamoDBv2.Model.TableClassSummary)value.ReplicaTableClassSummary; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaSettingsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M13_ReplicaStatus(var_replicaStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M25_ReplicaBillingModeSummary(var_replicaBillingModeSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M35_ReplicaProvisionedReadCapacityUnits(var_replicaProvisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M49_ReplicaProvisionedReadCapacityAutoScalingSettings(var_replicaProvisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M36_ReplicaProvisionedWriteCapacityUnits(var_replicaProvisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M50_ReplicaProvisionedWriteCapacityAutoScalingSettings(var_replicaProvisionedWriteCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M35_ReplicaGlobalSecondaryIndexSettings(var_replicaGlobalSecondaryIndexSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M24_ReplicaTableClassSummary(var_replicaTableClassSummary)); } public static Amazon.DynamoDBv2.ImportStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ImportStatus(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportStatus value) @@ -9191,10 +9191,10 @@ public static Amazon.DynamoDBv2.Model.KinesisDataStreamDestination FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKinesisDataStreamDestination ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination(Amazon.DynamoDBv2.Model.KinesisDataStreamDestination value) { - string var_streamArn = value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; - string var_destinationStatusDescription = value.DestinationStatusDescription; - Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = value.ApproximateCreationDateTimePrecision; + string var_streamArn = (string)value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; + string var_destinationStatusDescription = (string)value.DestinationStatusDescription; + Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = (Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision)value.ApproximateCreationDateTimePrecision; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.KinesisDataStreamDestination(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M28_DestinationStatusDescription(var_destinationStatusDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M36_ApproximateCreationDateTimePrecision(var_approximateCreationDateTimePrecision)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_ReplicaAutoScalingDescriptionList(Dafny.ISequence value) @@ -9250,8 +9250,8 @@ public static Amazon.DynamoDBv2.Model.ParameterizedStatement FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IParameterizedStatement ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement(Amazon.DynamoDBv2.Model.ParameterizedStatement value) { - System.Collections.Generic.List var_parameters = value.Parameters; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.List var_parameters = (System.Collections.Generic.List)value.Parameters; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ParameterizedStatement(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M9_Statement(value.Statement), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M10_Parameters(var_parameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse value) @@ -9261,7 +9261,7 @@ public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse(Amazon.DynamoDBv2.Model.ItemResponse value) { - System.Collections.Generic.Dictionary var_item = value.Item; + System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ItemResponse(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse__M4_Item(var_item)); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ExportFromTime(Dafny.ISequence value) @@ -9308,8 +9308,8 @@ public static Amazon.DynamoDBv2.Model.CsvOptions FromDafny_N3_com__N9_amazonaws_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICsvOptions ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_CsvOptions(Amazon.DynamoDBv2.Model.CsvOptions value) { - string var_delimiter = value.Delimiter; - System.Collections.Generic.List var_headerList = value.HeaderList; + string var_delimiter = (string)value.Delimiter; + System.Collections.Generic.List var_headerList = (System.Collections.Generic.List)value.HeaderList; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CsvOptions(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_CsvOptions__M9_Delimiter(var_delimiter), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_CsvOptions__M10_HeaderList(var_headerList)); } public static Amazon.DynamoDBv2.Model.BackupSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupSummary value) @@ -9328,16 +9328,16 @@ public static Amazon.DynamoDBv2.Model.BackupSummary FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary(Amazon.DynamoDBv2.Model.BackupSummary value) { - string var_tableName = value.TableName; - string var_tableId = value.TableId; - string var_tableArn = value.TableArn; - string var_backupArn = value.BackupArn; - string var_backupName = value.BackupName; - System.DateTime? var_backupCreationDateTime = value.BackupCreationDateTime; - System.DateTime? var_backupExpiryDateTime = value.BackupExpiryDateTime; - Amazon.DynamoDBv2.BackupStatus var_backupStatus = value.BackupStatus; - Amazon.DynamoDBv2.BackupType var_backupType = value.BackupType; - long? var_backupSizeBytes = value.BackupSizeBytes; + string var_tableName = (string)value.TableName; + string var_tableId = (string)value.TableId; + string var_tableArn = (string)value.TableArn; + string var_backupArn = (string)value.BackupArn; + string var_backupName = (string)value.BackupName; + System.DateTime? var_backupCreationDateTime = (System.DateTime?)value.BackupCreationDateTime; + System.DateTime? var_backupExpiryDateTime = (System.DateTime?)value.BackupExpiryDateTime; + Amazon.DynamoDBv2.BackupStatus var_backupStatus = (Amazon.DynamoDBv2.BackupStatus)value.BackupStatus; + Amazon.DynamoDBv2.BackupType var_backupType = (Amazon.DynamoDBv2.BackupType)value.BackupType; + long? var_backupSizeBytes = (long?)value.BackupSizeBytes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M9_BackupArn(var_backupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M10_BackupName(var_backupName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M22_BackupCreationDateTime(var_backupCreationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M20_BackupExpiryDateTime(var_backupExpiryDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M12_BackupStatus(var_backupStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M10_BackupType(var_backupType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M15_BackupSizeBytes(var_backupSizeBytes)); } public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary value) @@ -9349,9 +9349,9 @@ public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary(Amazon.DynamoDBv2.Model.ContributorInsightsSummary value) { - string var_tableName = value.TableName; - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = value.ContributorInsightsStatus; + string var_tableName = (string)value.TableName; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = (Amazon.DynamoDBv2.ContributorInsightsStatus)value.ContributorInsightsStatus; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary__M25_ContributorInsightsStatus(var_contributorInsightsStatus)); } public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary value) @@ -9363,9 +9363,9 @@ public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary(Amazon.DynamoDBv2.Model.ExportSummary value) { - string var_exportArn = value.ExportArn; - Amazon.DynamoDBv2.ExportStatus var_exportStatus = value.ExportStatus; - Amazon.DynamoDBv2.ExportType var_exportType = value.ExportType; + string var_exportArn = (string)value.ExportArn; + Amazon.DynamoDBv2.ExportStatus var_exportStatus = (Amazon.DynamoDBv2.ExportStatus)value.ExportStatus; + Amazon.DynamoDBv2.ExportType var_exportType = (Amazon.DynamoDBv2.ExportType)value.ExportType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary__M9_ExportArn(var_exportArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary__M12_ExportStatus(var_exportStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary__M10_ExportType(var_exportType)); } public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable value) @@ -9376,8 +9376,8 @@ public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable(Amazon.DynamoDBv2.Model.GlobalTable value) { - string var_globalTableName = value.GlobalTableName; - System.Collections.Generic.List var_replicationGroup = value.ReplicationGroup; + string var_globalTableName = (string)value.GlobalTableName; + System.Collections.Generic.List var_replicationGroup = (System.Collections.Generic.List)value.ReplicationGroup; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTable(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable__M15_GlobalTableName(var_globalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable__M16_ReplicationGroup(var_replicationGroup)); } public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary value) @@ -9394,14 +9394,14 @@ public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary(Amazon.DynamoDBv2.Model.ImportSummary value) { - string var_importArn = value.ImportArn; - Amazon.DynamoDBv2.ImportStatus var_importStatus = value.ImportStatus; - string var_tableArn = value.TableArn; - Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = value.S3BucketSource; - string var_cloudWatchLogGroupArn = value.CloudWatchLogGroupArn; - Amazon.DynamoDBv2.InputFormat var_inputFormat = value.InputFormat; - System.DateTime? var_startTime = value.StartTime; - System.DateTime? var_endTime = value.EndTime; + string var_importArn = (string)value.ImportArn; + Amazon.DynamoDBv2.ImportStatus var_importStatus = (Amazon.DynamoDBv2.ImportStatus)value.ImportStatus; + string var_tableArn = (string)value.TableArn; + Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = (Amazon.DynamoDBv2.Model.S3BucketSource)value.S3BucketSource; + string var_cloudWatchLogGroupArn = (string)value.CloudWatchLogGroupArn; + Amazon.DynamoDBv2.InputFormat var_inputFormat = (Amazon.DynamoDBv2.InputFormat)value.InputFormat; + System.DateTime? var_startTime = (System.DateTime?)value.StartTime; + System.DateTime? var_endTime = (System.DateTime?)value.EndTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M9_ImportArn(var_importArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M12_ImportStatus(var_importStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M14_S3BucketSource(var_s3BucketSource), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M21_CloudWatchLogGroupArn(var_cloudWatchLogGroupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M11_InputFormat(var_inputFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M9_StartTime(var_startTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M7_EndTime(var_endTime)); } public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition value) @@ -9412,7 +9412,7 @@ public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(Amazon.DynamoDBv2.Model.Condition value) { - System.Collections.Generic.List var_attributeValueList = value.AttributeValueList; + System.Collections.Generic.List var_attributeValueList = (System.Collections.Generic.List)value.AttributeValueList; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Condition(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition__M18_AttributeValueList(var_attributeValueList), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition__M18_ComparisonOperator(value.ComparisonOperator)); } public static Amazon.DynamoDBv2.Model.TransactGetItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItem value) @@ -9434,9 +9434,9 @@ public static Amazon.DynamoDBv2.Model.CancellationReason FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICancellationReason ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason(Amazon.DynamoDBv2.Model.CancellationReason value) { - System.Collections.Generic.Dictionary var_item = value.Item; - string var_code = value.Code; - string var_message = value.Message; + System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; + string var_code = (string)value.Code; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CancellationReason(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M4_Item(var_item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M4_Code(var_code), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M7_Message(var_message)); } public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem value) @@ -9449,10 +9449,10 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem(Amazon.DynamoDBv2.Model.TransactWriteItem value) { - Amazon.DynamoDBv2.Model.ConditionCheck var_conditionCheck = value.ConditionCheck; - Amazon.DynamoDBv2.Model.Put var_put = value.Put; - Amazon.DynamoDBv2.Model.Delete var_delete = value.Delete; - Amazon.DynamoDBv2.Model.Update var_update = value.Update; + Amazon.DynamoDBv2.Model.ConditionCheck var_conditionCheck = (Amazon.DynamoDBv2.Model.ConditionCheck)value.ConditionCheck; + Amazon.DynamoDBv2.Model.Put var_put = (Amazon.DynamoDBv2.Model.Put)value.Put; + Amazon.DynamoDBv2.Model.Delete var_delete = (Amazon.DynamoDBv2.Model.Delete)value.Delete; + Amazon.DynamoDBv2.Model.Update var_update = (Amazon.DynamoDBv2.Model.Update)value.Update; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactWriteItem(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M14_ConditionCheck(var_conditionCheck), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M3_Put(var_put), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M6_Delete(var_delete), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M6_Update(var_update)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString(Dafny.ISequence value) @@ -9471,8 +9471,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaUpdate FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate(Amazon.DynamoDBv2.Model.ReplicaUpdate value) { - Amazon.DynamoDBv2.Model.CreateReplicaAction var_create = value.Create; - Amazon.DynamoDBv2.Model.DeleteReplicaAction var_delete = value.Delete; + Amazon.DynamoDBv2.Model.CreateReplicaAction var_create = (Amazon.DynamoDBv2.Model.CreateReplicaAction)value.Create; + Amazon.DynamoDBv2.Model.DeleteReplicaAction var_delete = (Amazon.DynamoDBv2.Model.DeleteReplicaAction)value.Delete; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate__M6_Create(var_create), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate__M6_Delete(var_delete)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_AutoScalingRoleArn(Dafny.ISequence value) @@ -9491,7 +9491,7 @@ public static Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingPolicyUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate(Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate value) { - string var_policyName = value.PolicyName; + string var_policyName = (string)value.PolicyName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingPolicyUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate__M10_PolicyName(var_policyName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate__M40_TargetTrackingScalingPolicyConfiguration(value.TargetTrackingScalingPolicyConfiguration)); } public static Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableGlobalSecondaryIndexSettingsUpdate value) @@ -9503,8 +9503,8 @@ public static Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpd public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate(Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate value) { - long? var_provisionedWriteCapacityUnits = value.ProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingSettingsUpdate = value.ProvisionedWriteCapacityAutoScalingSettingsUpdate; + long? var_provisionedWriteCapacityUnits = (long?)value.ProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedWriteCapacityAutoScalingSettingsUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableGlobalSecondaryIndexSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M29_ProvisionedWriteCapacityUnits(var_provisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M49_ProvisionedWriteCapacityAutoScalingSettingsUpdate(var_provisionedWriteCapacityAutoScalingSettingsUpdate)); } public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate value) @@ -9518,10 +9518,10 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate(Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate value) { - long? var_replicaProvisionedReadCapacityUnits = value.ReplicaProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingSettingsUpdate = value.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate; - System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettingsUpdate = value.ReplicaGlobalSecondaryIndexSettingsUpdate; - Amazon.DynamoDBv2.TableClass var_replicaTableClass = value.ReplicaTableClass; + long? var_replicaProvisionedReadCapacityUnits = (long?)value.ReplicaProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate; + System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettingsUpdate = (System.Collections.Generic.List)value.ReplicaGlobalSecondaryIndexSettingsUpdate; + Amazon.DynamoDBv2.TableClass var_replicaTableClass = (Amazon.DynamoDBv2.TableClass)value.ReplicaTableClass; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M35_ReplicaProvisionedReadCapacityUnits(var_replicaProvisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M55_ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(var_replicaProvisionedReadCapacityAutoScalingSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M41_ReplicaGlobalSecondaryIndexSettingsUpdate(var_replicaGlobalSecondaryIndexSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M17_ReplicaTableClass(var_replicaTableClass)); } public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate value) @@ -9532,8 +9532,8 @@ public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate(Amazon.DynamoDBv2.Model.AttributeValueUpdate value) { - Amazon.DynamoDBv2.Model.AttributeValue var_value = value.Value; - Amazon.DynamoDBv2.AttributeAction var_action = value.Action; + Amazon.DynamoDBv2.Model.AttributeValue var_value = (Amazon.DynamoDBv2.Model.AttributeValue)value.Value; + Amazon.DynamoDBv2.AttributeAction var_action = (Amazon.DynamoDBv2.AttributeAction)value.Action; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValueUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate__M5_Value(var_value), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate__M6_Action(var_action)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexUpdate value) @@ -9545,9 +9545,9 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate value) { - Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction var_update = value.Update; - Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction var_create = value.Create; - Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction var_delete = value.Delete; + Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction var_update = (Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction)value.Update; + Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction var_create = (Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction)value.Create; + Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction var_delete = (Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction)value.Delete; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate__M6_Update(var_update), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate__M6_Create(var_create), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate__M6_Delete(var_delete)); } public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate value) @@ -9559,9 +9559,9 @@ public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate(Amazon.DynamoDBv2.Model.ReplicationGroupUpdate value) { - Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction var_create = value.Create; - Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction var_update = value.Update; - Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction var_delete = value.Delete; + Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction var_create = (Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction)value.Create; + Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction var_update = (Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction)value.Update; + Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction var_delete = (Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction)value.Delete; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicationGroupUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate__M6_Create(var_create), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate__M6_Update(var_update), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate__M6_Delete(var_delete)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate value) @@ -9572,8 +9572,8 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate From public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate value) { - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = value.ProvisionedWriteCapacityAutoScalingUpdate; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedWriteCapacityAutoScalingUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexAutoScalingUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate__M41_ProvisionedWriteCapacityAutoScalingUpdate(var_provisionedWriteCapacityAutoScalingUpdate)); } public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate value) @@ -9585,8 +9585,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate(Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate value) { - System.Collections.Generic.List var_replicaGlobalSecondaryIndexUpdates = value.ReplicaGlobalSecondaryIndexUpdates; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingUpdate = value.ReplicaProvisionedReadCapacityAutoScalingUpdate; + System.Collections.Generic.List var_replicaGlobalSecondaryIndexUpdates = (System.Collections.Generic.List)value.ReplicaGlobalSecondaryIndexUpdates; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ReplicaProvisionedReadCapacityAutoScalingUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaAutoScalingUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M34_ReplicaGlobalSecondaryIndexUpdates(var_replicaGlobalSecondaryIndexUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M47_ReplicaProvisionedReadCapacityAutoScalingUpdate(var_replicaProvisionedReadCapacityAutoScalingUpdate)); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TimeToLiveEnabled(bool value) @@ -9603,7 +9603,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchState } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M9_Statement(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M10_Parameters(Wrappers_Compile._IOption> value) { @@ -9659,7 +9659,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchState } public static Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M4_Keys(System.Collections.Generic.List> value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList((System.Collections.Generic.List>)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M15_AttributesToGet(Wrappers_Compile._IOption>> value) { @@ -9699,7 +9699,7 @@ public static Amazon.DynamoDBv2.Model.WriteRequest FromDafny_N3_com__N9_amazonaw } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IWriteRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests__M6_member(Amazon.DynamoDBv2.Model.WriteRequest value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest((Amazon.DynamoDBv2.Model.WriteRequest)value); } public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics value) { @@ -9707,7 +9707,7 @@ public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple__M6_member(Amazon.DynamoDBv2.Model.ItemCollectionMetrics value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics((Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica__M10_RegionName(Wrappers_Compile._IOption> value) { @@ -9723,7 +9723,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaDescription FromDafny_N3_com__N9_am } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicaDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription((Amazon.DynamoDBv2.Model.ReplicaDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeName(Dafny.ISequence value) { @@ -9731,7 +9731,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeD } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName((string)value); } public static Amazon.DynamoDBv2.ScalarAttributeType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IScalarAttributeType value) { @@ -9739,7 +9739,7 @@ public static Amazon.DynamoDBv2.ScalarAttributeType FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IScalarAttributeType ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeType(Amazon.DynamoDBv2.ScalarAttributeType value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ScalarAttributeType(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ScalarAttributeType((Amazon.DynamoDBv2.ScalarAttributeType)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M13_AttributeName(Dafny.ISequence value) { @@ -9747,7 +9747,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaE } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M13_AttributeName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName((string)value); } public static Amazon.DynamoDBv2.KeyType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M7_KeyType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeyType value) { @@ -9755,7 +9755,7 @@ public static Amazon.DynamoDBv2.KeyType FromDafny_N3_com__N9_amazonaws__N8_dynam } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeyType ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M7_KeyType(Amazon.DynamoDBv2.KeyType value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyType(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyType((Amazon.DynamoDBv2.KeyType)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_IndexName(Dafny.ISequence value) { @@ -9763,7 +9763,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecon } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_KeySchema(Dafny.ISequence value) { @@ -9771,7 +9771,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M10_Projection(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection value) { @@ -9779,7 +9779,7 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection((Amazon.DynamoDBv2.Model.Projection)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_IndexName(Dafny.ISequence value) { @@ -9787,7 +9787,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSeco } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_KeySchema(Dafny.ISequence value) { @@ -9795,7 +9795,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M10_Projection(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection value) { @@ -9803,7 +9803,7 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection((Amazon.DynamoDBv2.Model.Projection)value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M21_ProvisionedThroughput(Wrappers_Compile._IOption value) { @@ -9827,7 +9827,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M3_Key } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M3_Key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M5_Value(Dafny.ISequence value) { @@ -9835,7 +9835,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M5_Val } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M5_Value(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_TagValueString(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_TagValueString((string)value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M20_LastIncreaseDateTime(Wrappers_Compile._IOption> value) { @@ -9899,7 +9899,7 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription FromDafny_N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_LocalSecondaryIndexDescriptionList__M6_member(Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription((Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription)value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_GlobalSecondaryIndexDescriptionList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription value) { @@ -9907,7 +9907,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_GlobalSecondaryIndexDescriptionList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_SourceBackupArn(Wrappers_Compile._IOption> value) { @@ -9931,7 +9931,7 @@ public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_R } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_RestoreDateTime(System.DateTime value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date((System.DateTime)value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M17_RestoreInProgress(bool value) { @@ -9939,7 +9939,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSumma } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M17_RestoreInProgress(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_RestoreInProgress(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_RestoreInProgress((bool)value); } public static Amazon.DynamoDBv2.SSEStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M6_Status(Wrappers_Compile._IOption value) { @@ -10019,7 +10019,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M7_TableId(Dafny.ISequence value) { @@ -10027,7 +10027,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M7_TableId(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TableId(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TableId((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M8_TableArn(Wrappers_Compile._IOption> value) { @@ -10051,7 +10051,7 @@ public static Wrappers_Compile._IOption ToDafny_N3_com__N9_amazonaws__N8_d } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_TableCreationDateTime(Dafny.ISequence value) { @@ -10059,7 +10059,7 @@ public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_TableCreationDateTime(System.DateTime value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime((System.DateTime)value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_ProvisionedThroughput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughput value) { @@ -10067,7 +10067,7 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_ProvisionedThroughput(Amazon.DynamoDBv2.Model.ProvisionedThroughput value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput((Amazon.DynamoDBv2.Model.ProvisionedThroughput)value); } public static Amazon.DynamoDBv2.Model.OnDemandThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M18_OnDemandThroughput(Wrappers_Compile._IOption value) { @@ -10195,7 +10195,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryI } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static Amazon.DynamoDBv2.Model.Capacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity value) { @@ -10203,7 +10203,7 @@ public static Amazon.DynamoDBv2.Model.Capacity FromDafny_N3_com__N9_amazonaws__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap__M5_value(Amazon.DynamoDBv2.Model.Capacity value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity((Amazon.DynamoDBv2.Model.Capacity)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M3_key(Dafny.ISequence value) { @@ -10211,7 +10211,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -10219,7 +10219,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateRange__M6_member(Dafny.ISequence value) { @@ -10227,7 +10227,7 @@ public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateRange__M6_member(double value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateBound(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateBound((double)value); } public static Amazon.DynamoDBv2.PointInTimeRecoveryStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M25_PointInTimeRecoveryStatus(Wrappers_Compile._IOption value) { @@ -10259,7 +10259,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M7_Address(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_String(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_String((string)value); } public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M20_CachePeriodInMinutes(long value) { @@ -10267,7 +10267,7 @@ public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M20 } public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M20_CachePeriodInMinutes(long value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Long(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Long((long)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M10_RegionName(Dafny.ISequence value) { @@ -10275,7 +10275,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSet } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static Amazon.DynamoDBv2.ReplicaStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M13_ReplicaStatus(Wrappers_Compile._IOption value) { @@ -10379,7 +10379,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription FromDafny_N3 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_ReplicaAutoScalingDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription((Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M9_Statement(Dafny.ISequence value) { @@ -10387,7 +10387,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_Parameteri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M9_Statement(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M10_Parameters(Wrappers_Compile._IOption> value) { @@ -10651,7 +10651,7 @@ public static Amazon.DynamoDBv2.ComparisonOperator FromDafny_N3_com__N9_amazonaw } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IComparisonOperator ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition__M18_ComparisonOperator(Amazon.DynamoDBv2.ComparisonOperator value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ComparisonOperator(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ComparisonOperator((Amazon.DynamoDBv2.ComparisonOperator)value); } public static Amazon.DynamoDBv2.Model.Get FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem__M3_Get(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGet value) { @@ -10659,7 +10659,7 @@ public static Amazon.DynamoDBv2.Model.Get FromDafny_N3_com__N9_amazonaws__N8_dyn } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGet ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem__M3_Get(Amazon.DynamoDBv2.Model.Get value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get((Amazon.DynamoDBv2.Model.Get)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M4_Item(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> value) { @@ -10747,7 +10747,7 @@ public static Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConf } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingTargetTrackingScalingPolicyConfigurationUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate__M40_TargetTrackingScalingPolicyConfiguration(Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate((Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M9_IndexName(Dafny.ISequence value) { @@ -10755,7 +10755,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M29_ProvisionedWriteCapacityUnits(Wrappers_Compile._IOption value) { @@ -10779,7 +10779,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSet } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M35_ReplicaProvisionedReadCapacityUnits(Wrappers_Compile._IOption value) { @@ -10899,7 +10899,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAut } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M34_ReplicaGlobalSecondaryIndexUpdates(Wrappers_Compile._IOption> value) { @@ -10926,9 +10926,9 @@ public static Amazon.DynamoDBv2.Model.BatchStatementError FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementError ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError(Amazon.DynamoDBv2.Model.BatchStatementError value) { - Amazon.DynamoDBv2.BatchStatementErrorCodeEnum var_code = value.Code; - string var_message = value.Message; - System.Collections.Generic.Dictionary var_item = value.Item; + Amazon.DynamoDBv2.BatchStatementErrorCodeEnum var_code = (Amazon.DynamoDBv2.BatchStatementErrorCodeEnum)value.Code; + string var_message = (string)value.Message; + System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementError(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError__M4_Code(var_code), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError__M7_Message(var_message), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError__M4_Item(var_item)); } public static System.Collections.Generic.List> FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList(Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> value) @@ -10947,8 +10947,8 @@ public static Amazon.DynamoDBv2.Model.WriteRequest FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IWriteRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest(Amazon.DynamoDBv2.Model.WriteRequest value) { - Amazon.DynamoDBv2.Model.PutRequest var_putRequest = value.PutRequest; - Amazon.DynamoDBv2.Model.DeleteRequest var_deleteRequest = value.DeleteRequest; + Amazon.DynamoDBv2.Model.PutRequest var_putRequest = (Amazon.DynamoDBv2.Model.PutRequest)value.PutRequest; + Amazon.DynamoDBv2.Model.DeleteRequest var_deleteRequest = (Amazon.DynamoDBv2.Model.DeleteRequest)value.DeleteRequest; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.WriteRequest(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest__M10_PutRequest(var_putRequest), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest__M13_DeleteRequest(var_deleteRequest)); } public static Amazon.DynamoDBv2.Model.ReplicaDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaDescription value) @@ -10967,16 +10967,16 @@ public static Amazon.DynamoDBv2.Model.ReplicaDescription FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription(Amazon.DynamoDBv2.Model.ReplicaDescription value) { - string var_regionName = value.RegionName; - Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = value.ReplicaStatus; - string var_replicaStatusDescription = value.ReplicaStatusDescription; - string var_replicaStatusPercentProgress = value.ReplicaStatusPercentProgress; - string var_kMSMasterKeyId = value.KMSMasterKeyId; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - System.DateTime? var_replicaInaccessibleDateTime = value.ReplicaInaccessibleDateTime; - Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = value.ReplicaTableClassSummary; + string var_regionName = (string)value.RegionName; + Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = (Amazon.DynamoDBv2.ReplicaStatus)value.ReplicaStatus; + string var_replicaStatusDescription = (string)value.ReplicaStatusDescription; + string var_replicaStatusPercentProgress = (string)value.ReplicaStatusPercentProgress; + string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + System.DateTime? var_replicaInaccessibleDateTime = (System.DateTime?)value.ReplicaInaccessibleDateTime; + Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = (Amazon.DynamoDBv2.Model.TableClassSummary)value.ReplicaTableClassSummary; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M10_RegionName(var_regionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M13_ReplicaStatus(var_replicaStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M24_ReplicaStatusDescription(var_replicaStatusDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M28_ReplicaStatusPercentProgress(var_replicaStatusPercentProgress), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M14_KMSMasterKeyId(var_kMSMasterKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M27_ReplicaInaccessibleDateTime(var_replicaInaccessibleDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M24_ReplicaTableClassSummary(var_replicaTableClassSummary)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName(Dafny.ISequence value) @@ -11021,8 +11021,8 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - Amazon.DynamoDBv2.ProjectionType var_projectionType = value.ProjectionType; - System.Collections.Generic.List var_nonKeyAttributes = value.NonKeyAttributes; + Amazon.DynamoDBv2.ProjectionType var_projectionType = (Amazon.DynamoDBv2.ProjectionType)value.ProjectionType; + System.Collections.Generic.List var_nonKeyAttributes = (System.Collections.Generic.List)value.NonKeyAttributes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Projection(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection__M14_ProjectionType(var_projectionType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection__M16_NonKeyAttributes(var_nonKeyAttributes)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_TagValueString(Dafny.ISequence value) @@ -11053,12 +11053,12 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription(Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription value) { - string var_indexName = value.IndexName; - System.Collections.Generic.List var_keySchema = value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; - long? var_indexSizeBytes = value.IndexSizeBytes; - long? var_itemCount = value.ItemCount; - string var_indexArn = value.IndexArn; + string var_indexName = (string)value.IndexName; + System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; + long? var_indexSizeBytes = (long?)value.IndexSizeBytes; + long? var_itemCount = (long?)value.ItemCount; + string var_indexArn = (string)value.IndexArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M10_Projection(var_projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M14_IndexSizeBytes(var_indexSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M8_IndexArn(var_indexArn)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription value) @@ -11077,16 +11077,16 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription value) { - string var_indexName = value.IndexName; - System.Collections.Generic.List var_keySchema = value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; - Amazon.DynamoDBv2.IndexStatus var_indexStatus = value.IndexStatus; - bool? var_backfilling = value.Backfilling; - Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = value.ProvisionedThroughput; - long? var_indexSizeBytes = value.IndexSizeBytes; - long? var_itemCount = value.ItemCount; - string var_indexArn = value.IndexArn; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + string var_indexName = (string)value.IndexName; + System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; + Amazon.DynamoDBv2.IndexStatus var_indexStatus = (Amazon.DynamoDBv2.IndexStatus)value.IndexStatus; + bool? var_backfilling = (bool?)value.Backfilling; + Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription)value.ProvisionedThroughput; + long? var_indexSizeBytes = (long?)value.IndexSizeBytes; + long? var_itemCount = (long?)value.ItemCount; + string var_indexArn = (string)value.IndexArn; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M10_Projection(var_projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M11_IndexStatus(var_indexStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M11_Backfilling(var_backfilling), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M14_IndexSizeBytes(var_indexSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M8_IndexArn(var_indexArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M18_OnDemandThroughput(var_onDemandThroughput)); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_RestoreInProgress(bool value) @@ -11262,11 +11262,11 @@ public static Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription(Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription value) { - long? var_minimumUnits = value.MinimumUnits; - long? var_maximumUnits = value.MaximumUnits; - bool? var_autoScalingDisabled = value.AutoScalingDisabled; - string var_autoScalingRoleArn = value.AutoScalingRoleArn; - System.Collections.Generic.List var_scalingPolicies = value.ScalingPolicies; + long? var_minimumUnits = (long?)value.MinimumUnits; + long? var_maximumUnits = (long?)value.MaximumUnits; + bool? var_autoScalingDisabled = (bool?)value.AutoScalingDisabled; + string var_autoScalingRoleArn = (string)value.AutoScalingRoleArn; + System.Collections.Generic.List var_scalingPolicies = (System.Collections.Generic.List)value.ScalingPolicies; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingSettingsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M12_MinimumUnits(var_minimumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M12_MaximumUnits(var_maximumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M19_AutoScalingDisabled(var_autoScalingDisabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M18_AutoScalingRoleArn(var_autoScalingRoleArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M15_ScalingPolicies(var_scalingPolicies)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S50_ReplicaGlobalSecondaryIndexSettingsDescriptionList(Dafny.ISequence value) @@ -11288,11 +11288,11 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription(Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription value) { - string var_regionName = value.RegionName; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = value.ReplicaProvisionedReadCapacityAutoScalingSettings; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = value.ReplicaProvisionedWriteCapacityAutoScalingSettings; - Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = value.ReplicaStatus; + string var_regionName = (string)value.RegionName; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedReadCapacityAutoScalingSettings; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedWriteCapacityAutoScalingSettings; + Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = (Amazon.DynamoDBv2.ReplicaStatus)value.ReplicaStatus; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaAutoScalingDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M10_RegionName(var_regionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M49_ReplicaProvisionedReadCapacityAutoScalingSettings(var_replicaProvisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M50_ReplicaProvisionedWriteCapacityAutoScalingSettings(var_replicaProvisionedWriteCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M13_ReplicaStatus(var_replicaStatus)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_CsvDelimiter(Dafny.ISequence value) @@ -11321,8 +11321,8 @@ public static Amazon.DynamoDBv2.Model.Get FromDafny_N3_com__N9_amazonaws__N8_dyn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGet ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get(Amazon.DynamoDBv2.Model.Get value) { - string var_projectionExpression = value.ProjectionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + string var_projectionExpression = (string)value.ProjectionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Get(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M24_ExpressionAttributeNames(var_expressionAttributeNames)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Code(Dafny.ISequence value) @@ -11345,9 +11345,9 @@ public static Amazon.DynamoDBv2.Model.ConditionCheck FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IConditionCheck ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck(Amazon.DynamoDBv2.Model.ConditionCheck value) { - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionCheck(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M19_ConditionExpression(value.ConditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.Put FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPut value) @@ -11362,10 +11362,10 @@ public static Amazon.DynamoDBv2.Model.Put FromDafny_N3_com__N9_amazonaws__N8_dyn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPut ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put(Amazon.DynamoDBv2.Model.Put value) { - string var_conditionExpression = value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + string var_conditionExpression = (string)value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Put(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M4_Item(value.Item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.Delete FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDelete value) @@ -11380,10 +11380,10 @@ public static Amazon.DynamoDBv2.Model.Delete FromDafny_N3_com__N9_amazonaws__N8_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDelete ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete(Amazon.DynamoDBv2.Model.Delete value) { - string var_conditionExpression = value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + string var_conditionExpression = (string)value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Delete(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.Update FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdate value) @@ -11399,10 +11399,10 @@ public static Amazon.DynamoDBv2.Model.Update FromDafny_N3_com__N9_amazonaws__N8_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update(Amazon.DynamoDBv2.Model.Update value) { - string var_conditionExpression = value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; + string var_conditionExpression = (string)value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Update(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16_UpdateExpression(value.UpdateExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.CreateReplicaAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_CreateReplicaAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateReplicaAction value) @@ -11443,9 +11443,9 @@ public static Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingTargetTrackingScalingPolicyConfigurationUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate value) { - bool? var_disableScaleIn = value.DisableScaleIn; - int? var_scaleInCooldown = value.ScaleInCooldown; - int? var_scaleOutCooldown = value.ScaleOutCooldown; + bool? var_disableScaleIn = (bool?)value.DisableScaleIn; + int? var_scaleInCooldown = (int?)value.ScaleInCooldown; + int? var_scaleOutCooldown = (int?)value.ScaleOutCooldown; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M14_DisableScaleIn(var_disableScaleIn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M15_ScaleInCooldown(var_scaleInCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M16_ScaleOutCooldown(var_scaleOutCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M11_TargetValue((int)value.TargetValue)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_ReplicaGlobalSecondaryIndexSettingsUpdateList(Dafny.ISequence value) @@ -11479,8 +11479,8 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalSecondaryIndexAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction(Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalSecondaryIndexAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalSecondaryIndexAction value) @@ -11494,8 +11494,8 @@ public static Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalSecondaryIndexAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction(Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalSecondaryIndexAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M10_Projection(value.Projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DeleteGlobalSecondaryIndexAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteGlobalSecondaryIndexAction value) @@ -11520,11 +11520,11 @@ public static Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction FromDaf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateReplicationGroupMemberAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction(Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction value) { - string var_kMSMasterKeyId = value.KMSMasterKeyId; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.TableClass var_tableClassOverride = value.TableClassOverride; + string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.TableClass var_tableClassOverride = (Amazon.DynamoDBv2.TableClass)value.TableClassOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateReplicationGroupMemberAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M14_KMSMasterKeyId(var_kMSMasterKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M18_TableClassOverride(var_tableClassOverride)); } public static Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateReplicationGroupMemberAction value) @@ -11539,11 +11539,11 @@ public static Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction FromDaf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateReplicationGroupMemberAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction(Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction value) { - string var_kMSMasterKeyId = value.KMSMasterKeyId; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; - System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.TableClass var_tableClassOverride = value.TableClassOverride; + string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; + System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.TableClass var_tableClassOverride = (Amazon.DynamoDBv2.TableClass)value.TableClassOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateReplicationGroupMemberAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M14_KMSMasterKeyId(var_kMSMasterKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M18_TableClassOverride(var_tableClassOverride)); } public static Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_DeleteReplicationGroupMemberAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteReplicationGroupMemberAction value) @@ -11594,7 +11594,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchState } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList__M6_member(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static Amazon.DynamoDBv2.Model.PutRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest__M10_PutRequest(Wrappers_Compile._IOption value) { @@ -11848,7 +11848,7 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_LocalSecondaryIndexes__M6_member(Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo((Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo)value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalSecondaryIndexes__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo value) { @@ -11856,7 +11856,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalSecondaryIndexes__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo)value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_AttributeValueList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -11864,7 +11864,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_AttributeValueList__M6_member(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M12_MinimumUnits(Wrappers_Compile._IOption value) { @@ -11912,7 +11912,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescrip } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S50_ReplicaGlobalSecondaryIndexSettingsDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M10_RegionName(Wrappers_Compile._IOption> value) { @@ -11960,7 +11960,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_CsvHeaderL } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_CsvHeaderList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_CsvHeader(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_CsvHeader((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -11968,7 +11968,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_TableName(Dafny.ISequence value) { @@ -11976,7 +11976,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_Tab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M20_ProjectionExpression(Wrappers_Compile._IOption> value) { @@ -12000,7 +12000,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M9_TableName(Dafny.ISequence value) { @@ -12008,7 +12008,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionC } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M19_ConditionExpression(Dafny.ISequence value) { @@ -12016,7 +12016,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionC } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M19_ConditionExpression(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ConditionExpression(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ConditionExpression((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M24_ExpressionAttributeNames(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -12048,7 +12048,7 @@ public static Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M4_Item(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap((System.Collections.Generic.Dictionary)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_TableName(Dafny.ISequence value) { @@ -12056,7 +12056,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_Tab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M19_ConditionExpression(Wrappers_Compile._IOption> value) { @@ -12096,7 +12096,7 @@ public static Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_TableName(Dafny.ISequence value) { @@ -12104,7 +12104,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M19_ConditionExpression(Wrappers_Compile._IOption> value) { @@ -12144,7 +12144,7 @@ public static Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16_UpdateExpression(Dafny.ISequence value) { @@ -12152,7 +12152,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16_UpdateExpression(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateExpression(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateExpression((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_TableName(Dafny.ISequence value) { @@ -12160,7 +12160,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M19_ConditionExpression(Wrappers_Compile._IOption> value) { @@ -12200,7 +12200,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_CreateRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_CreateReplicaAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DeleteReplicaAction__M10_RegionName(Dafny.ISequence value) { @@ -12208,7 +12208,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DeleteRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DeleteReplicaAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static bool? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M14_DisableScaleIn(Wrappers_Compile._IOption value) { @@ -12240,7 +12240,7 @@ public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M11_TargetValue(double value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject((double)value); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_ReplicaGlobalSecondaryIndexSettingsUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsUpdate value) { @@ -12248,7 +12248,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_ReplicaGlobalSecondaryIndexSettingsUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M9_IndexName(Dafny.ISequence value) { @@ -12256,7 +12256,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(Wrappers_Compile._IOption value) { @@ -12280,7 +12280,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_KeySchema(Dafny.ISequence value) { @@ -12288,7 +12288,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); } public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M10_Projection(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection value) { @@ -12296,7 +12296,7 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection((Amazon.DynamoDBv2.Model.Projection)value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(Wrappers_Compile._IOption value) { @@ -12320,7 +12320,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DeleteGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DeleteGlobalSecondaryIndexAction__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M10_RegionName(Dafny.ISequence value) { @@ -12328,7 +12328,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M14_KMSMasterKeyId(Wrappers_Compile._IOption> value) { @@ -12376,7 +12376,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M14_KMSMasterKeyId(Wrappers_Compile._IOption> value) { @@ -12424,7 +12424,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_DeleteRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_DeleteReplicationGroupMemberAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S48_ReplicaGlobalSecondaryIndexAutoScalingUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingUpdate value) { @@ -12432,7 +12432,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpda } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S48_ReplicaGlobalSecondaryIndexAutoScalingUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate)value); } public static Amazon.DynamoDBv2.BatchStatementErrorCodeEnum FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchStatementErrorCodeEnum(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementErrorCodeEnum value) { @@ -12507,7 +12507,7 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughputOverride ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ProvisionedThroughputOverride(Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride value) { - long? var_readCapacityUnits = value.ReadCapacityUnits; + long? var_readCapacityUnits = (long?)value.ReadCapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughputOverride(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ProvisionedThroughputOverride__M17_ReadCapacityUnits(var_readCapacityUnits)); } public static Amazon.DynamoDBv2.Model.OnDemandThroughputOverride FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_OnDemandThroughputOverride(software.amazon.cryptography.services.dynamodb.internaldafny.types._IOnDemandThroughputOverride value) @@ -12517,7 +12517,7 @@ public static Amazon.DynamoDBv2.Model.OnDemandThroughputOverride FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IOnDemandThroughputOverride ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_OnDemandThroughputOverride(Amazon.DynamoDBv2.Model.OnDemandThroughputOverride value) { - long? var_maxReadRequestUnits = value.MaxReadRequestUnits; + long? var_maxReadRequestUnits = (long?)value.MaxReadRequestUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughputOverride(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_OnDemandThroughputOverride__M19_MaxReadRequestUnits(var_maxReadRequestUnits)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S42_ReplicaGlobalSecondaryIndexDescriptionList(Dafny.ISequence value) @@ -12583,9 +12583,9 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo(Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo value) { - string var_indexName = value.IndexName; - System.Collections.Generic.List var_keySchema = value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; + string var_indexName = (string)value.IndexName; + System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexInfo(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M10_Projection(var_projection)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo value) @@ -12599,11 +12599,11 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo value) { - string var_indexName = value.IndexName; - System.Collections.Generic.List var_keySchema = value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + string var_indexName = (string)value.IndexName; + System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexInfo(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M10_Projection(var_projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M18_OnDemandThroughput(var_onDemandThroughput)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_AutoScalingPolicyDescriptionList(Dafny.ISequence value) @@ -12626,11 +12626,11 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescrip public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescription value) { - Amazon.DynamoDBv2.IndexStatus var_indexStatus = value.IndexStatus; - long? var_provisionedReadCapacityUnits = value.ProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = value.ProvisionedReadCapacityAutoScalingSettings; - long? var_provisionedWriteCapacityUnits = value.ProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = value.ProvisionedWriteCapacityAutoScalingSettings; + Amazon.DynamoDBv2.IndexStatus var_indexStatus = (Amazon.DynamoDBv2.IndexStatus)value.IndexStatus; + long? var_provisionedReadCapacityUnits = (long?)value.ProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedReadCapacityAutoScalingSettings; + long? var_provisionedWriteCapacityUnits = (long?)value.ProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedWriteCapacityAutoScalingSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexSettingsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M11_IndexStatus(var_indexStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M28_ProvisionedReadCapacityUnits(var_provisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M42_ProvisionedReadCapacityAutoScalingSettings(var_provisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M29_ProvisionedWriteCapacityUnits(var_provisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M43_ProvisionedWriteCapacityAutoScalingSettings(var_provisionedWriteCapacityAutoScalingSettings)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S53_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList(Dafny.ISequence value) @@ -12674,8 +12674,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate value) { - long? var_provisionedReadCapacityUnits = value.ProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingSettingsUpdate = value.ProvisionedReadCapacityAutoScalingSettingsUpdate; + long? var_provisionedReadCapacityUnits = (long?)value.ProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedReadCapacityAutoScalingSettingsUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M28_ProvisionedReadCapacityUnits(var_provisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M48_ProvisionedReadCapacityAutoScalingSettingsUpdate(var_provisionedReadCapacityAutoScalingSettingsUpdate)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ReplicaGlobalSecondaryIndexList(Dafny.ISequence value) @@ -12694,8 +12694,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpda public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate value) { - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingUpdate = value.ProvisionedReadCapacityAutoScalingUpdate; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedReadCapacityAutoScalingUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexAutoScalingUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate__M40_ProvisionedReadCapacityAutoScalingUpdate(var_provisionedReadCapacityAutoScalingUpdate)); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_PutRequest__M4_Item(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) @@ -12704,7 +12704,7 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_PutRequest__M4_Item(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap((System.Collections.Generic.Dictionary)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_DeleteRequest__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -12712,7 +12712,7 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_DeleteRequest__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ProvisionedThroughputOverride__M17_ReadCapacityUnits(Wrappers_Compile._IOption value) { @@ -12736,7 +12736,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription Fro } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S42_ReplicaGlobalSecondaryIndexDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttributeNameList__M6_member(Dafny.ISequence value) { @@ -12744,7 +12744,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttr } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttributeNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_NonKeyAttributeName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_NonKeyAttributeName((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -12816,7 +12816,7 @@ public static Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingPolicyDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_AutoScalingPolicyDescriptionList__M6_member(Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription((Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M9_IndexName(Dafny.ISequence value) { @@ -12824,7 +12824,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static Amazon.DynamoDBv2.IndexStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M11_IndexStatus(Wrappers_Compile._IOption value) { @@ -12872,7 +12872,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDesc } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S53_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M9_IndexName(Dafny.ISequence value) { @@ -12880,7 +12880,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M28_ProvisionedReadCapacityUnits(Wrappers_Compile._IOption value) { @@ -12904,7 +12904,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex FromDafny_N3_c } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ReplicaGlobalSecondaryIndexList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex)value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -12931,9 +12931,9 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription Fro public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription value) { - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_NonKeyAttributeName(Dafny.ISequence value) @@ -12952,8 +12952,8 @@ public static Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingPolicyDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription(Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription value) { - string var_policyName = value.PolicyName; - Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription var_targetTrackingScalingPolicyConfiguration = value.TargetTrackingScalingPolicyConfiguration; + string var_policyName = (string)value.PolicyName; + Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription var_targetTrackingScalingPolicyConfiguration = (Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription)value.TargetTrackingScalingPolicyConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingPolicyDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription__M10_PolicyName(var_policyName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription__M40_TargetTrackingScalingPolicyConfiguration(var_targetTrackingScalingPolicyConfiguration)); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingDescription value) @@ -12966,10 +12966,10 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDesc public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription value) { - string var_indexName = value.IndexName; - Amazon.DynamoDBv2.IndexStatus var_indexStatus = value.IndexStatus; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = value.ProvisionedReadCapacityAutoScalingSettings; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = value.ProvisionedWriteCapacityAutoScalingSettings; + string var_indexName = (string)value.IndexName; + Amazon.DynamoDBv2.IndexStatus var_indexStatus = (Amazon.DynamoDBv2.IndexStatus)value.IndexStatus; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedReadCapacityAutoScalingSettings; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedWriteCapacityAutoScalingSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexAutoScalingDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M11_IndexStatus(var_indexStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M42_ProvisionedReadCapacityAutoScalingSettings(var_provisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M43_ProvisionedWriteCapacityAutoScalingSettings(var_provisionedWriteCapacityAutoScalingSettings)); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndex value) @@ -12981,8 +12981,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndex(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M9_IndexName(Wrappers_Compile._IOption> value) @@ -13063,7 +13063,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M29_ProvisionedThroughputOverride(Wrappers_Compile._IOption value) { @@ -13091,9 +13091,9 @@ public static Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingTargetTrackingScalingPolicyConfigurationDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription value) { - bool? var_disableScaleIn = value.DisableScaleIn; - int? var_scaleInCooldown = value.ScaleInCooldown; - int? var_scaleOutCooldown = value.ScaleOutCooldown; + bool? var_disableScaleIn = (bool?)value.DisableScaleIn; + int? var_scaleInCooldown = (int?)value.ScaleInCooldown; + int? var_scaleOutCooldown = (int?)value.ScaleOutCooldown; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingTargetTrackingScalingPolicyConfigurationDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M14_DisableScaleIn(var_disableScaleIn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M15_ScaleInCooldown(var_scaleInCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M16_ScaleOutCooldown(var_scaleOutCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M11_TargetValue((int)value.TargetValue)); } public static bool? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M14_DisableScaleIn(Wrappers_Compile._IOption value) @@ -13126,7 +13126,7 @@ public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M11_TargetValue(double value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject(value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject((double)value); } public static string FromDafny_N6_smithy__N3_api__S6_String(Dafny.ISequence value) { diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py index 47c22cc785..68dcd32ceb 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/aws_sdk_format_converter.py @@ -1653,9 +1653,13 @@ def com_amazonaws_dynamodb_DeleteItemInput( ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -3831,9 +3835,13 @@ def com_amazonaws_dynamodb_PutItemInput( ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -3989,14 +3997,27 @@ def com_amazonaws_dynamodb_QueryInput(this_structure, item_handler, condition_ha ) transformed_output["FilterExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "KeyConditionExpression" in this_structure: - transformed_output["KeyConditionExpression"] = this_structure[ - "KeyConditionExpression" - ] + condition_expression, attribute_names, attribute_values = condition_handler( + "KeyConditionExpression", this_structure + ) + transformed_output["KeyConditionExpression"] = condition_expression + if len(attribute_names) > 0: + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) + if len(attribute_values) > 0: + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -4291,9 +4312,13 @@ def com_amazonaws_dynamodb_ScanInput(this_structure, item_handler, condition_han ) transformed_output["FilterExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -4517,9 +4542,13 @@ def com_amazonaws_dynamodb_ConditionCheck( ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -4557,9 +4586,13 @@ def com_amazonaws_dynamodb_Put(this_structure, item_handler, condition_handler): ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -4597,9 +4630,13 @@ def com_amazonaws_dynamodb_Delete(this_structure, item_handler, condition_handle ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -4638,9 +4675,13 @@ def com_amazonaws_dynamodb_Update(this_structure, item_handler, condition_handle ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { @@ -5135,9 +5176,13 @@ def com_amazonaws_dynamodb_UpdateItemInput( ) transformed_output["ConditionExpression"] = condition_expression if len(attribute_names) > 0: - transformed_output["ExpressionAttributeNames"] = attribute_names + this_structure.setdefault("ExpressionAttributeNames", {}).update( + attribute_names + ) if len(attribute_values) > 0: - transformed_output["ExpressionAttributeValues"] = attribute_values + this_structure.setdefault("ExpressionAttributeValues", {}).update( + attribute_values + ) if "ExpressionAttributeNames" in this_structure: transformed_output["ExpressionAttributeNames"] = { diff --git a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs index 0752a1dbbc..9369407305 100644 --- a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs +++ b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs @@ -39,7 +39,7 @@ public static Amazon.KeyManagementService.Model.AlreadyExistsException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_AlreadyExistsException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_AlreadyExistsException(Amazon.KeyManagementService.Model.AlreadyExistsException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_AlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_AlreadyExistsException__M7_message(var_message) ); @@ -61,7 +61,7 @@ public static Amazon.KeyManagementService.Model.CancelKeyDeletionResponse FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._ICancelKeyDeletionResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S25_CancelKeyDeletionResponse(Amazon.KeyManagementService.Model.CancelKeyDeletionResponse value) { - string var_keyId = value.KeyId; + string var_keyId = (string)value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.CancelKeyDeletionResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_CancelKeyDeletionResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.Model.CloudHsmClusterInUseException FromDafny_N3_com__N9_amazonaws__N3_kms__S29_CloudHsmClusterInUseException(software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInUseException value) @@ -72,7 +72,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterInUseException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_CloudHsmClusterInUseException(Amazon.KeyManagementService.Model.CloudHsmClusterInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_CloudHsmClusterInUseException__M7_message(var_message) ); @@ -85,7 +85,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterInvalidConfigurat } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S44_CloudHsmClusterInvalidConfigurationException(Amazon.KeyManagementService.Model.CloudHsmClusterInvalidConfigurationException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S44_CloudHsmClusterInvalidConfigurationException__M7_message(var_message) ); @@ -98,7 +98,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterNotActiveExceptio } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotActiveException ToDafny_N3_com__N9_amazonaws__N3_kms__S33_CloudHsmClusterNotActiveException(Amazon.KeyManagementService.Model.CloudHsmClusterNotActiveException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotActiveException( ToDafny_N3_com__N9_amazonaws__N3_kms__S33_CloudHsmClusterNotActiveException__M7_message(var_message) ); @@ -111,7 +111,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterNotFoundException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CloudHsmClusterNotFoundException(Amazon.KeyManagementService.Model.CloudHsmClusterNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CloudHsmClusterNotFoundException__M7_message(var_message) ); @@ -124,7 +124,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterNotRelatedExcepti } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotRelatedException ToDafny_N3_com__N9_amazonaws__N3_kms__S34_CloudHsmClusterNotRelatedException(Amazon.KeyManagementService.Model.CloudHsmClusterNotRelatedException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotRelatedException( ToDafny_N3_com__N9_amazonaws__N3_kms__S34_CloudHsmClusterNotRelatedException__M7_message(var_message) ); @@ -137,7 +137,7 @@ public static Amazon.KeyManagementService.Model.ConflictException FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_ConflictException ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ConflictException(Amazon.KeyManagementService.Model.ConflictException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_ConflictException( ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ConflictException__M7_message(var_message) ); @@ -251,15 +251,15 @@ public static Amazon.KeyManagementService.Model.CreateCustomKeyStoreRequest From public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateCustomKeyStoreRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest(Amazon.KeyManagementService.Model.CreateCustomKeyStoreRequest value) { - string var_cloudHsmClusterId = value.CloudHsmClusterId; - string var_trustAnchorCertificate = value.TrustAnchorCertificate; - string var_keyStorePassword = value.KeyStorePassword; - Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = value.CustomKeyStoreType; - string var_xksProxyUriEndpoint = value.XksProxyUriEndpoint; - string var_xksProxyUriPath = value.XksProxyUriPath; - string var_xksProxyVpcEndpointServiceName = value.XksProxyVpcEndpointServiceName; - Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = value.XksProxyAuthenticationCredential; - Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = value.XksProxyConnectivity; + string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; + string var_trustAnchorCertificate = (string)value.TrustAnchorCertificate; + string var_keyStorePassword = (string)value.KeyStorePassword; + Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = (Amazon.KeyManagementService.CustomKeyStoreType)value.CustomKeyStoreType; + string var_xksProxyUriEndpoint = (string)value.XksProxyUriEndpoint; + string var_xksProxyUriPath = (string)value.XksProxyUriPath; + string var_xksProxyVpcEndpointServiceName = (string)value.XksProxyVpcEndpointServiceName; + Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = (Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType)value.XksProxyAuthenticationCredential; + Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = (Amazon.KeyManagementService.XksProxyConnectivityType)value.XksProxyConnectivity; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateCustomKeyStoreRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreName(value.CustomKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M22_TrustAnchorCertificate(var_trustAnchorCertificate), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M16_KeyStorePassword(var_keyStorePassword), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreType(var_customKeyStoreType), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M19_XksProxyUriEndpoint(var_xksProxyUriEndpoint), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M15_XksProxyUriPath(var_xksProxyUriPath), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M30_XksProxyVpcEndpointServiceName(var_xksProxyVpcEndpointServiceName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M32_XksProxyAuthenticationCredential(var_xksProxyAuthenticationCredential), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M20_XksProxyConnectivity(var_xksProxyConnectivity)); } public static Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S28_CreateCustomKeyStoreResponse(software.amazon.cryptography.services.kms.internaldafny.types._ICreateCustomKeyStoreResponse value) @@ -269,7 +269,7 @@ public static Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse Fro public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateCustomKeyStoreResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S28_CreateCustomKeyStoreResponse(Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse value) { - string var_customKeyStoreId = value.CustomKeyStoreId; + string var_customKeyStoreId = (string)value.CustomKeyStoreId; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateCustomKeyStoreResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S28_CreateCustomKeyStoreResponse__M16_CustomKeyStoreId(var_customKeyStoreId)); } public static Amazon.KeyManagementService.Model.CreateGrantRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest(software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantRequest value) @@ -286,11 +286,11 @@ public static Amazon.KeyManagementService.Model.CreateGrantRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest(Amazon.KeyManagementService.Model.CreateGrantRequest value) { - string var_retiringPrincipal = value.RetiringPrincipal; - Amazon.KeyManagementService.Model.GrantConstraints var_constraints = value.Constraints; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - string var_name = value.Name; - bool? var_dryRun = value.DryRun; + string var_retiringPrincipal = (string)value.RetiringPrincipal; + Amazon.KeyManagementService.Model.GrantConstraints var_constraints = (Amazon.KeyManagementService.Model.GrantConstraints)value.Constraints; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + string var_name = (string)value.Name; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateGrantRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M16_GranteePrincipal(value.GranteePrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M17_RetiringPrincipal(var_retiringPrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M10_Operations(value.Operations), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M11_Constraints(var_constraints), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M4_Name(var_name), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.CreateGrantResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse(software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantResponse value) @@ -301,8 +301,8 @@ public static Amazon.KeyManagementService.Model.CreateGrantResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse(Amazon.KeyManagementService.Model.CreateGrantResponse value) { - string var_grantToken = value.GrantToken; - string var_grantId = value.GrantId; + string var_grantToken = (string)value.GrantToken; + string var_grantId = (string)value.GrantId; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateGrantResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse__M10_GrantToken(var_grantToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse__M7_GrantId(var_grantId)); } public static Amazon.KeyManagementService.Model.CreateKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyRequest value) @@ -322,17 +322,17 @@ public static Amazon.KeyManagementService.Model.CreateKeyRequest FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest(Amazon.KeyManagementService.Model.CreateKeyRequest value) { - string var_policy = value.Policy; - string var_description = value.Description; - Amazon.KeyManagementService.KeyUsageType var_keyUsage = value.KeyUsage; - Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = value.CustomerMasterKeySpec; - Amazon.KeyManagementService.KeySpec var_keySpec = value.KeySpec; - Amazon.KeyManagementService.OriginType var_origin = value.Origin; - string var_customKeyStoreId = value.CustomKeyStoreId; - bool? var_bypassPolicyLockoutSafetyCheck = value.BypassPolicyLockoutSafetyCheck; - System.Collections.Generic.List var_tags = value.Tags; - bool? var_multiRegion = value.MultiRegion; - string var_xksKeyId = value.XksKeyId; + string var_policy = (string)value.Policy; + string var_description = (string)value.Description; + Amazon.KeyManagementService.KeyUsageType var_keyUsage = (Amazon.KeyManagementService.KeyUsageType)value.KeyUsage; + Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = (Amazon.KeyManagementService.CustomerMasterKeySpec)value.CustomerMasterKeySpec; + Amazon.KeyManagementService.KeySpec var_keySpec = (Amazon.KeyManagementService.KeySpec)value.KeySpec; + Amazon.KeyManagementService.OriginType var_origin = (Amazon.KeyManagementService.OriginType)value.Origin; + string var_customKeyStoreId = (string)value.CustomKeyStoreId; + bool? var_bypassPolicyLockoutSafetyCheck = (bool?)value.BypassPolicyLockoutSafetyCheck; + System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; + bool? var_multiRegion = (bool?)value.MultiRegion; + string var_xksKeyId = (string)value.XksKeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M11_Description(var_description), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M8_KeyUsage(var_keyUsage), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M21_CustomerMasterKeySpec(var_customerMasterKeySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M6_Origin(var_origin), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M30_BypassPolicyLockoutSafetyCheck(var_bypassPolicyLockoutSafetyCheck), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M11_MultiRegion(var_multiRegion), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M8_XksKeyId(var_xksKeyId)); } public static Amazon.KeyManagementService.Model.CreateKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S17_CreateKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyResponse value) @@ -342,7 +342,7 @@ public static Amazon.KeyManagementService.Model.CreateKeyResponse FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S17_CreateKeyResponse(Amazon.KeyManagementService.Model.CreateKeyResponse value) { - Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = value.KeyMetadata; + Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = (Amazon.KeyManagementService.Model.KeyMetadata)value.KeyMetadata; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_CreateKeyResponse__M11_KeyMetadata(var_keyMetadata)); } public static Amazon.KeyManagementService.CustomerMasterKeySpec FromDafny_N3_com__N9_amazonaws__N3_kms__S21_CustomerMasterKeySpec(software.amazon.cryptography.services.kms.internaldafny.types._ICustomerMasterKeySpec value) @@ -387,7 +387,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreHasCMKsException F } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreHasCMKsException ToDafny_N3_com__N9_amazonaws__N3_kms__S30_CustomKeyStoreHasCMKsException(Amazon.KeyManagementService.Model.CustomKeyStoreHasCMKsException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreHasCMKsException( ToDafny_N3_com__N9_amazonaws__N3_kms__S30_CustomKeyStoreHasCMKsException__M7_message(var_message) ); @@ -400,7 +400,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreInvalidStateExcept } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreInvalidStateException ToDafny_N3_com__N9_amazonaws__N3_kms__S35_CustomKeyStoreInvalidStateException(Amazon.KeyManagementService.Model.CustomKeyStoreInvalidStateException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreInvalidStateException( ToDafny_N3_com__N9_amazonaws__N3_kms__S35_CustomKeyStoreInvalidStateException__M7_message(var_message) ); @@ -413,7 +413,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreNameInUseException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNameInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CustomKeyStoreNameInUseException(Amazon.KeyManagementService.Model.CustomKeyStoreNameInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNameInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CustomKeyStoreNameInUseException__M7_message(var_message) ); @@ -426,7 +426,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreNotFoundException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S31_CustomKeyStoreNotFoundException(Amazon.KeyManagementService.Model.CustomKeyStoreNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S31_CustomKeyStoreNotFoundException__M7_message(var_message) ); @@ -492,12 +492,12 @@ public static Amazon.KeyManagementService.Model.DecryptRequest FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IDecryptRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest(Amazon.KeyManagementService.Model.DecryptRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - string var_keyId = value.KeyId; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + string var_keyId = (string)value.KeyId; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.DecryptRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M14_CiphertextBlob(value.CiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M19_EncryptionAlgorithm(var_encryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M9_Recipient(var_recipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.DecryptResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDecryptResponse value) @@ -510,10 +510,10 @@ public static Amazon.KeyManagementService.Model.DecryptResponse FromDafny_N3_com public static software.amazon.cryptography.services.kms.internaldafny.types._IDecryptResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse(Amazon.KeyManagementService.Model.DecryptResponse value) { - string var_keyId = value.KeyId; - System.IO.MemoryStream var_plaintext = value.Plaintext; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; - System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; + string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_plaintext = (System.IO.MemoryStream)value.Plaintext; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; + System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.DecryptResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M9_Plaintext(var_plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M19_EncryptionAlgorithm(var_encryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.DeleteAliasRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DeleteAliasRequest(software.amazon.cryptography.services.kms.internaldafny.types._IDeleteAliasRequest value) @@ -564,7 +564,7 @@ public static Amazon.KeyManagementService.Model.DependencyTimeoutException FromD } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_DependencyTimeoutException ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DependencyTimeoutException(Amazon.KeyManagementService.Model.DependencyTimeoutException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_DependencyTimeoutException( ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DependencyTimeoutException__M7_message(var_message) ); @@ -581,9 +581,9 @@ public static Amazon.KeyManagementService.Model.DeriveSharedSecretRequest FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._IDeriveSharedSecretRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest(Amazon.KeyManagementService.Model.DeriveSharedSecretRequest value) { - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; return new software.amazon.cryptography.services.kms.internaldafny.types.DeriveSharedSecretRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M21_KeyAgreementAlgorithm(value.KeyAgreementAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_PublicKey(value.PublicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M6_DryRun(var_dryRun), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_Recipient(var_recipient)); } public static Amazon.KeyManagementService.Model.DeriveSharedSecretResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDeriveSharedSecretResponse value) @@ -597,11 +597,11 @@ public static Amazon.KeyManagementService.Model.DeriveSharedSecretResponse FromD public static software.amazon.cryptography.services.kms.internaldafny.types._IDeriveSharedSecretResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse(Amazon.KeyManagementService.Model.DeriveSharedSecretResponse value) { - string var_keyId = value.KeyId; - System.IO.MemoryStream var_sharedSecret = value.SharedSecret; - System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; - Amazon.KeyManagementService.KeyAgreementAlgorithmSpec var_keyAgreementAlgorithm = value.KeyAgreementAlgorithm; - Amazon.KeyManagementService.OriginType var_keyOrigin = value.KeyOrigin; + string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_sharedSecret = (System.IO.MemoryStream)value.SharedSecret; + System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; + Amazon.KeyManagementService.KeyAgreementAlgorithmSpec var_keyAgreementAlgorithm = (Amazon.KeyManagementService.KeyAgreementAlgorithmSpec)value.KeyAgreementAlgorithm; + Amazon.KeyManagementService.OriginType var_keyOrigin = (Amazon.KeyManagementService.OriginType)value.KeyOrigin; return new software.amazon.cryptography.services.kms.internaldafny.types.DeriveSharedSecretResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M12_SharedSecret(var_sharedSecret), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M21_KeyAgreementAlgorithm(var_keyAgreementAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M9_KeyOrigin(var_keyOrigin)); } public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresRequest value) @@ -614,10 +614,10 @@ public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresRequest F public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest(Amazon.KeyManagementService.Model.DescribeCustomKeyStoresRequest value) { - string var_customKeyStoreId = value.CustomKeyStoreId; - string var_customKeyStoreName = value.CustomKeyStoreName; - int? var_limit = value.Limit; - string var_marker = value.Marker; + string var_customKeyStoreId = (string)value.CustomKeyStoreId; + string var_customKeyStoreName = (string)value.CustomKeyStoreName; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeCustomKeyStoresRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M18_CustomKeyStoreName(var_customKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresResponse value) @@ -629,9 +629,9 @@ public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresResponse public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse(Amazon.KeyManagementService.Model.DescribeCustomKeyStoresResponse value) { - System.Collections.Generic.List var_customKeyStores = value.CustomKeyStores; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_customKeyStores = (System.Collections.Generic.List)value.CustomKeyStores; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeCustomKeyStoresResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse__M15_CustomKeyStores(var_customKeyStores), ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.DescribeKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyRequest value) @@ -642,7 +642,7 @@ public static Amazon.KeyManagementService.Model.DescribeKeyRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest(Amazon.KeyManagementService.Model.DescribeKeyRequest value) { - System.Collections.Generic.List var_grantTokens = value.GrantTokens; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M11_GrantTokens(var_grantTokens)); } public static Amazon.KeyManagementService.Model.DescribeKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_DescribeKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyResponse value) @@ -652,7 +652,7 @@ public static Amazon.KeyManagementService.Model.DescribeKeyResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_DescribeKeyResponse(Amazon.KeyManagementService.Model.DescribeKeyResponse value) { - Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = value.KeyMetadata; + Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = (Amazon.KeyManagementService.Model.KeyMetadata)value.KeyMetadata; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_DescribeKeyResponse__M11_KeyMetadata(var_keyMetadata)); } public static Amazon.KeyManagementService.Model.DisabledException FromDafny_N3_com__N9_amazonaws__N3_kms__S17_DisabledException(software.amazon.cryptography.services.kms.internaldafny.types.Error_DisabledException value) @@ -663,7 +663,7 @@ public static Amazon.KeyManagementService.Model.DisabledException FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_DisabledException ToDafny_N3_com__N9_amazonaws__N3_kms__S17_DisabledException(Amazon.KeyManagementService.Model.DisabledException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_DisabledException( ToDafny_N3_com__N9_amazonaws__N3_kms__S17_DisabledException__M7_message(var_message) ); @@ -716,7 +716,7 @@ public static Amazon.KeyManagementService.Model.DryRunOperationException FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_DryRunOperationException ToDafny_N3_com__N9_amazonaws__N3_kms__S24_DryRunOperationException(Amazon.KeyManagementService.Model.DryRunOperationException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_DryRunOperationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S24_DryRunOperationException__M7_message(var_message) ); @@ -739,7 +739,7 @@ public static Amazon.KeyManagementService.Model.EnableKeyRotationRequest FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IEnableKeyRotationRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest(Amazon.KeyManagementService.Model.EnableKeyRotationRequest value) { - int? var_rotationPeriodInDays = value.RotationPeriodInDays; + int? var_rotationPeriodInDays = (int?)value.RotationPeriodInDays; return new software.amazon.cryptography.services.kms.internaldafny.types.EnableKeyRotationRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M20_RotationPeriodInDays(var_rotationPeriodInDays)); } public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec value) @@ -768,10 +768,10 @@ public static Amazon.KeyManagementService.Model.EncryptRequest FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest(Amazon.KeyManagementService.Model.EncryptRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.EncryptRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M9_Plaintext(value.Plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M19_EncryptionAlgorithm(var_encryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.EncryptResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptResponse value) @@ -783,9 +783,9 @@ public static Amazon.KeyManagementService.Model.EncryptResponse FromDafny_N3_com public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse(Amazon.KeyManagementService.Model.EncryptResponse value) { - System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; - string var_keyId = value.KeyId; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; + System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; + string var_keyId = (string)value.KeyId; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.EncryptResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse__M19_EncryptionAlgorithm(var_encryptionAlgorithm)); } public static Amazon.KeyManagementService.ExpirationModelType FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ExpirationModelType(software.amazon.cryptography.services.kms.internaldafny.types._IExpirationModelType value) @@ -808,7 +808,7 @@ public static Amazon.KeyManagementService.Model.ExpiredImportTokenException From } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_ExpiredImportTokenException ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ExpiredImportTokenException(Amazon.KeyManagementService.Model.ExpiredImportTokenException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_ExpiredImportTokenException( ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ExpiredImportTokenException__M7_message(var_message) ); @@ -825,10 +825,10 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairRequest FromD public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest(Amazon.KeyManagementService.Model.GenerateDataKeyPairRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_KeyPairSpec(value.KeyPairSpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M9_Recipient(var_recipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyPairResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairResponse value) @@ -843,12 +843,12 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairResponse From public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse(Amazon.KeyManagementService.Model.GenerateDataKeyPairResponse value) { - System.IO.MemoryStream var_privateKeyCiphertextBlob = value.PrivateKeyCiphertextBlob; - System.IO.MemoryStream var_privateKeyPlaintext = value.PrivateKeyPlaintext; - System.IO.MemoryStream var_publicKey = value.PublicKey; - string var_keyId = value.KeyId; - Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = value.KeyPairSpec; - System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; + System.IO.MemoryStream var_privateKeyCiphertextBlob = (System.IO.MemoryStream)value.PrivateKeyCiphertextBlob; + System.IO.MemoryStream var_privateKeyPlaintext = (System.IO.MemoryStream)value.PrivateKeyPlaintext; + System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; + string var_keyId = (string)value.KeyId; + Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = (Amazon.KeyManagementService.DataKeyPairSpec)value.KeyPairSpec; + System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M24_PrivateKeyCiphertextBlob(var_privateKeyCiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M19_PrivateKeyPlaintext(var_privateKeyPlaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M11_KeyPairSpec(var_keyPairSpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextRequest value) @@ -862,9 +862,9 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaint public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest(Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairWithoutPlaintextRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_KeyPairSpec(value.KeyPairSpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextResponse value) @@ -877,10 +877,10 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaint public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse(Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextResponse value) { - System.IO.MemoryStream var_privateKeyCiphertextBlob = value.PrivateKeyCiphertextBlob; - System.IO.MemoryStream var_publicKey = value.PublicKey; - string var_keyId = value.KeyId; - Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = value.KeyPairSpec; + System.IO.MemoryStream var_privateKeyCiphertextBlob = (System.IO.MemoryStream)value.PrivateKeyCiphertextBlob; + System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; + string var_keyId = (string)value.KeyId; + Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = (Amazon.KeyManagementService.DataKeyPairSpec)value.KeyPairSpec; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairWithoutPlaintextResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M24_PrivateKeyCiphertextBlob(var_privateKeyCiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M11_KeyPairSpec(var_keyPairSpec)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyRequest value) @@ -896,12 +896,12 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyRequest FromDafny public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest(Amazon.KeyManagementService.Model.GenerateDataKeyRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; - int? var_numberOfBytes = value.NumberOfBytes; - Amazon.KeyManagementService.DataKeySpec var_keySpec = value.KeySpec; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; + int? var_numberOfBytes = (int?)value.NumberOfBytes; + Amazon.KeyManagementService.DataKeySpec var_keySpec = (Amazon.KeyManagementService.DataKeySpec)value.KeySpec; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M13_NumberOfBytes(var_numberOfBytes), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M9_Recipient(var_recipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyResponse value) @@ -914,10 +914,10 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyResponse FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse(Amazon.KeyManagementService.Model.GenerateDataKeyResponse value) { - System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; - System.IO.MemoryStream var_plaintext = value.Plaintext; - string var_keyId = value.KeyId; - System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; + System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; + System.IO.MemoryStream var_plaintext = (System.IO.MemoryStream)value.Plaintext; + string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M9_Plaintext(var_plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextRequest value) @@ -932,11 +932,11 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextR public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest(Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; - Amazon.KeyManagementService.DataKeySpec var_keySpec = value.KeySpec; - int? var_numberOfBytes = value.NumberOfBytes; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; + Amazon.KeyManagementService.DataKeySpec var_keySpec = (Amazon.KeyManagementService.DataKeySpec)value.KeySpec; + int? var_numberOfBytes = (int?)value.NumberOfBytes; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyWithoutPlaintextRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M13_NumberOfBytes(var_numberOfBytes), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextResponse value) @@ -947,8 +947,8 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextR public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse(Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextResponse value) { - System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; - string var_keyId = value.KeyId; + System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; + string var_keyId = (string)value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyWithoutPlaintextResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.Model.GenerateMacRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacRequest value) @@ -962,8 +962,8 @@ public static Amazon.KeyManagementService.Model.GenerateMacRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest(Amazon.KeyManagementService.Model.GenerateMacRequest value) { - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateMacRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M12_MacAlgorithm(value.MacAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateMacResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacResponse value) @@ -975,9 +975,9 @@ public static Amazon.KeyManagementService.Model.GenerateMacResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse(Amazon.KeyManagementService.Model.GenerateMacResponse value) { - System.IO.MemoryStream var_mac = value.Mac; - Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = value.MacAlgorithm; - string var_keyId = value.KeyId; + System.IO.MemoryStream var_mac = (System.IO.MemoryStream)value.Mac; + Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = (Amazon.KeyManagementService.MacAlgorithmSpec)value.MacAlgorithm; + string var_keyId = (string)value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateMacResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse__M3_Mac(var_mac), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse__M12_MacAlgorithm(var_macAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.Model.GenerateRandomRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomRequest value) @@ -989,9 +989,9 @@ public static Amazon.KeyManagementService.Model.GenerateRandomRequest FromDafny_ public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest(Amazon.KeyManagementService.Model.GenerateRandomRequest value) { - int? var_numberOfBytes = value.NumberOfBytes; - string var_customKeyStoreId = value.CustomKeyStoreId; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; + int? var_numberOfBytes = (int?)value.NumberOfBytes; + string var_customKeyStoreId = (string)value.CustomKeyStoreId; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateRandomRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest__M13_NumberOfBytes(var_numberOfBytes), ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest__M9_Recipient(var_recipient)); } public static Amazon.KeyManagementService.Model.GenerateRandomResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomResponse value) @@ -1002,8 +1002,8 @@ public static Amazon.KeyManagementService.Model.GenerateRandomResponse FromDafny public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse(Amazon.KeyManagementService.Model.GenerateRandomResponse value) { - System.IO.MemoryStream var_plaintext = value.Plaintext; - System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; + System.IO.MemoryStream var_plaintext = (System.IO.MemoryStream)value.Plaintext; + System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateRandomResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse__M9_Plaintext(var_plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.GetKeyPolicyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyRequest value) @@ -1014,7 +1014,7 @@ public static Amazon.KeyManagementService.Model.GetKeyPolicyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest(Amazon.KeyManagementService.Model.GetKeyPolicyRequest value) { - string var_policyName = value.PolicyName; + string var_policyName = (string)value.PolicyName; return new software.amazon.cryptography.services.kms.internaldafny.types.GetKeyPolicyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M10_PolicyName(var_policyName)); } public static Amazon.KeyManagementService.Model.GetKeyPolicyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyResponse value) @@ -1025,8 +1025,8 @@ public static Amazon.KeyManagementService.Model.GetKeyPolicyResponse FromDafny_N public static software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse(Amazon.KeyManagementService.Model.GetKeyPolicyResponse value) { - string var_policy = value.Policy; - string var_policyName = value.PolicyName; + string var_policy = (string)value.Policy; + string var_policyName = (string)value.PolicyName; return new software.amazon.cryptography.services.kms.internaldafny.types.GetKeyPolicyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse__M10_PolicyName(var_policyName)); } public static Amazon.KeyManagementService.Model.GetKeyRotationStatusRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S27_GetKeyRotationStatusRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyRotationStatusRequest value) @@ -1050,11 +1050,11 @@ public static Amazon.KeyManagementService.Model.GetKeyRotationStatusResponse Fro public static software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyRotationStatusResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse(Amazon.KeyManagementService.Model.GetKeyRotationStatusResponse value) { - bool? var_keyRotationEnabled = value.KeyRotationEnabled; - string var_keyId = value.KeyId; - int? var_rotationPeriodInDays = value.RotationPeriodInDays; - System.DateTime? var_nextRotationDate = value.NextRotationDate; - System.DateTime? var_onDemandRotationStartDate = value.OnDemandRotationStartDate; + bool? var_keyRotationEnabled = (bool?)value.KeyRotationEnabled; + string var_keyId = (string)value.KeyId; + int? var_rotationPeriodInDays = (int?)value.RotationPeriodInDays; + System.DateTime? var_nextRotationDate = (System.DateTime?)value.NextRotationDate; + System.DateTime? var_onDemandRotationStartDate = (System.DateTime?)value.OnDemandRotationStartDate; return new software.amazon.cryptography.services.kms.internaldafny.types.GetKeyRotationStatusResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M18_KeyRotationEnabled(var_keyRotationEnabled), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M20_RotationPeriodInDays(var_rotationPeriodInDays), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M16_NextRotationDate(var_nextRotationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M25_OnDemandRotationStartDate(var_onDemandRotationStartDate)); } public static Amazon.KeyManagementService.Model.GetParametersForImportRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetParametersForImportRequest value) @@ -1079,10 +1079,10 @@ public static Amazon.KeyManagementService.Model.GetParametersForImportResponse F public static software.amazon.cryptography.services.kms.internaldafny.types._IGetParametersForImportResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse(Amazon.KeyManagementService.Model.GetParametersForImportResponse value) { - string var_keyId = value.KeyId; - System.IO.MemoryStream var_importToken = value.ImportToken; - System.IO.MemoryStream var_publicKey = value.PublicKey; - System.DateTime? var_parametersValidTo = value.ParametersValidTo; + string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_importToken = (System.IO.MemoryStream)value.ImportToken; + System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; + System.DateTime? var_parametersValidTo = (System.DateTime?)value.ParametersValidTo; return new software.amazon.cryptography.services.kms.internaldafny.types.GetParametersForImportResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M11_ImportToken(var_importToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M17_ParametersValidTo(var_parametersValidTo)); } public static Amazon.KeyManagementService.Model.GetPublicKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyRequest value) @@ -1093,7 +1093,7 @@ public static Amazon.KeyManagementService.Model.GetPublicKeyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest(Amazon.KeyManagementService.Model.GetPublicKeyRequest value) { - System.Collections.Generic.List var_grantTokens = value.GrantTokens; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; return new software.amazon.cryptography.services.kms.internaldafny.types.GetPublicKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M11_GrantTokens(var_grantTokens)); } public static Amazon.KeyManagementService.Model.GetPublicKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyResponse value) @@ -1110,14 +1110,14 @@ public static Amazon.KeyManagementService.Model.GetPublicKeyResponse FromDafny_N public static software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse(Amazon.KeyManagementService.Model.GetPublicKeyResponse value) { - string var_keyId = value.KeyId; - System.IO.MemoryStream var_publicKey = value.PublicKey; - Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = value.CustomerMasterKeySpec; - Amazon.KeyManagementService.KeySpec var_keySpec = value.KeySpec; - Amazon.KeyManagementService.KeyUsageType var_keyUsage = value.KeyUsage; - System.Collections.Generic.List var_encryptionAlgorithms = value.EncryptionAlgorithms; - System.Collections.Generic.List var_signingAlgorithms = value.SigningAlgorithms; - System.Collections.Generic.List var_keyAgreementAlgorithms = value.KeyAgreementAlgorithms; + string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; + Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = (Amazon.KeyManagementService.CustomerMasterKeySpec)value.CustomerMasterKeySpec; + Amazon.KeyManagementService.KeySpec var_keySpec = (Amazon.KeyManagementService.KeySpec)value.KeySpec; + Amazon.KeyManagementService.KeyUsageType var_keyUsage = (Amazon.KeyManagementService.KeyUsageType)value.KeyUsage; + System.Collections.Generic.List var_encryptionAlgorithms = (System.Collections.Generic.List)value.EncryptionAlgorithms; + System.Collections.Generic.List var_signingAlgorithms = (System.Collections.Generic.List)value.SigningAlgorithms; + System.Collections.Generic.List var_keyAgreementAlgorithms = (System.Collections.Generic.List)value.KeyAgreementAlgorithms; return new software.amazon.cryptography.services.kms.internaldafny.types.GetPublicKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M21_CustomerMasterKeySpec(var_customerMasterKeySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M8_KeyUsage(var_keyUsage), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M20_EncryptionAlgorithms(var_encryptionAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M17_SigningAlgorithms(var_signingAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M22_KeyAgreementAlgorithms(var_keyAgreementAlgorithms)); } public static Amazon.KeyManagementService.GrantOperation FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantOperation(software.amazon.cryptography.services.kms.internaldafny.types._IGrantOperation value) @@ -1173,8 +1173,8 @@ public static Amazon.KeyManagementService.Model.ImportKeyMaterialRequest FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IImportKeyMaterialRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest(Amazon.KeyManagementService.Model.ImportKeyMaterialRequest value) { - System.DateTime? var_validTo = value.ValidTo; - Amazon.KeyManagementService.ExpirationModelType var_expirationModel = value.ExpirationModel; + System.DateTime? var_validTo = (System.DateTime?)value.ValidTo; + Amazon.KeyManagementService.ExpirationModelType var_expirationModel = (Amazon.KeyManagementService.ExpirationModelType)value.ExpirationModel; return new software.amazon.cryptography.services.kms.internaldafny.types.ImportKeyMaterialRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M11_ImportToken(value.ImportToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M20_EncryptedKeyMaterial(value.EncryptedKeyMaterial), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M7_ValidTo(var_validTo), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M15_ExpirationModel(var_expirationModel)); } public static Amazon.KeyManagementService.Model.ImportKeyMaterialResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S25_ImportKeyMaterialResponse(software.amazon.cryptography.services.kms.internaldafny.types._IImportKeyMaterialResponse value) @@ -1195,7 +1195,7 @@ public static Amazon.KeyManagementService.Model.IncorrectKeyException FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyException ToDafny_N3_com__N9_amazonaws__N3_kms__S21_IncorrectKeyException(Amazon.KeyManagementService.Model.IncorrectKeyException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyException( ToDafny_N3_com__N9_amazonaws__N3_kms__S21_IncorrectKeyException__M7_message(var_message) ); @@ -1208,7 +1208,7 @@ public static Amazon.KeyManagementService.Model.IncorrectKeyMaterialException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyMaterialException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectKeyMaterialException(Amazon.KeyManagementService.Model.IncorrectKeyMaterialException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyMaterialException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectKeyMaterialException__M7_message(var_message) ); @@ -1221,7 +1221,7 @@ public static Amazon.KeyManagementService.Model.IncorrectTrustAnchorException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectTrustAnchorException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectTrustAnchorException(Amazon.KeyManagementService.Model.IncorrectTrustAnchorException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectTrustAnchorException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectTrustAnchorException__M7_message(var_message) ); @@ -1234,7 +1234,7 @@ public static Amazon.KeyManagementService.Model.InvalidAliasNameException FromDa } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidAliasNameException ToDafny_N3_com__N9_amazonaws__N3_kms__S25_InvalidAliasNameException(Amazon.KeyManagementService.Model.InvalidAliasNameException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidAliasNameException( ToDafny_N3_com__N9_amazonaws__N3_kms__S25_InvalidAliasNameException__M7_message(var_message) ); @@ -1247,7 +1247,7 @@ public static Amazon.KeyManagementService.Model.InvalidArnException FromDafny_N3 } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidArnException ToDafny_N3_com__N9_amazonaws__N3_kms__S19_InvalidArnException(Amazon.KeyManagementService.Model.InvalidArnException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidArnException( ToDafny_N3_com__N9_amazonaws__N3_kms__S19_InvalidArnException__M7_message(var_message) ); @@ -1260,7 +1260,7 @@ public static Amazon.KeyManagementService.Model.InvalidCiphertextException FromD } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidCiphertextException ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidCiphertextException(Amazon.KeyManagementService.Model.InvalidCiphertextException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidCiphertextException( ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidCiphertextException__M7_message(var_message) ); @@ -1273,7 +1273,7 @@ public static Amazon.KeyManagementService.Model.InvalidGrantIdException FromDafn } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantIdException ToDafny_N3_com__N9_amazonaws__N3_kms__S23_InvalidGrantIdException(Amazon.KeyManagementService.Model.InvalidGrantIdException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantIdException( ToDafny_N3_com__N9_amazonaws__N3_kms__S23_InvalidGrantIdException__M7_message(var_message) ); @@ -1286,7 +1286,7 @@ public static Amazon.KeyManagementService.Model.InvalidGrantTokenException FromD } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantTokenException ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidGrantTokenException(Amazon.KeyManagementService.Model.InvalidGrantTokenException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantTokenException( ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidGrantTokenException__M7_message(var_message) ); @@ -1299,7 +1299,7 @@ public static Amazon.KeyManagementService.Model.InvalidImportTokenException From } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidImportTokenException ToDafny_N3_com__N9_amazonaws__N3_kms__S27_InvalidImportTokenException(Amazon.KeyManagementService.Model.InvalidImportTokenException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidImportTokenException( ToDafny_N3_com__N9_amazonaws__N3_kms__S27_InvalidImportTokenException__M7_message(var_message) ); @@ -1312,7 +1312,7 @@ public static Amazon.KeyManagementService.Model.InvalidKeyUsageException FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidKeyUsageException ToDafny_N3_com__N9_amazonaws__N3_kms__S24_InvalidKeyUsageException(Amazon.KeyManagementService.Model.InvalidKeyUsageException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidKeyUsageException( ToDafny_N3_com__N9_amazonaws__N3_kms__S24_InvalidKeyUsageException__M7_message(var_message) ); @@ -1325,7 +1325,7 @@ public static Amazon.KeyManagementService.Model.InvalidMarkerException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidMarkerException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_InvalidMarkerException(Amazon.KeyManagementService.Model.InvalidMarkerException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidMarkerException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_InvalidMarkerException__M7_message(var_message) ); @@ -1428,7 +1428,7 @@ public static Amazon.KeyManagementService.Model.KeyUnavailableException FromDafn } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUnavailableException ToDafny_N3_com__N9_amazonaws__N3_kms__S23_KeyUnavailableException(Amazon.KeyManagementService.Model.KeyUnavailableException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUnavailableException( ToDafny_N3_com__N9_amazonaws__N3_kms__S23_KeyUnavailableException__M7_message(var_message) ); @@ -1457,7 +1457,7 @@ public static Amazon.KeyManagementService.Model.KMSInternalException FromDafny_N } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInternalException ToDafny_N3_com__N9_amazonaws__N3_kms__S20_KMSInternalException(Amazon.KeyManagementService.Model.KMSInternalException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInternalException( ToDafny_N3_com__N9_amazonaws__N3_kms__S20_KMSInternalException__M7_message(var_message) ); @@ -1470,7 +1470,7 @@ public static Amazon.KeyManagementService.Model.KMSInvalidMacException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidMacException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_KMSInvalidMacException(Amazon.KeyManagementService.Model.KMSInvalidMacException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidMacException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_KMSInvalidMacException__M7_message(var_message) ); @@ -1483,7 +1483,7 @@ public static Amazon.KeyManagementService.Model.KMSInvalidSignatureException Fro } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidSignatureException ToDafny_N3_com__N9_amazonaws__N3_kms__S28_KMSInvalidSignatureException(Amazon.KeyManagementService.Model.KMSInvalidSignatureException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidSignatureException( ToDafny_N3_com__N9_amazonaws__N3_kms__S28_KMSInvalidSignatureException__M7_message(var_message) ); @@ -1496,7 +1496,7 @@ public static Amazon.KeyManagementService.Model.KMSInvalidStateException FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidStateException ToDafny_N3_com__N9_amazonaws__N3_kms__S24_KMSInvalidStateException(Amazon.KeyManagementService.Model.KMSInvalidStateException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidStateException( ToDafny_N3_com__N9_amazonaws__N3_kms__S24_KMSInvalidStateException__M7_message(var_message) ); @@ -1509,7 +1509,7 @@ public static Amazon.KeyManagementService.Model.LimitExceededException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_LimitExceededException(Amazon.KeyManagementService.Model.LimitExceededException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_LimitExceededException__M7_message(var_message) ); @@ -1523,9 +1523,9 @@ public static Amazon.KeyManagementService.Model.ListAliasesRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IListAliasesRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest(Amazon.KeyManagementService.Model.ListAliasesRequest value) { - string var_keyId = value.KeyId; - int? var_limit = value.Limit; - string var_marker = value.Marker; + string var_keyId = (string)value.KeyId; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListAliasesRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListAliasesResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListAliasesResponse value) @@ -1537,9 +1537,9 @@ public static Amazon.KeyManagementService.Model.ListAliasesResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IListAliasesResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse(Amazon.KeyManagementService.Model.ListAliasesResponse value) { - System.Collections.Generic.List var_aliases = value.Aliases; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_aliases = (System.Collections.Generic.List)value.Aliases; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListAliasesResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse__M7_Aliases(var_aliases), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListGrantsRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsRequest value) @@ -1553,10 +1553,10 @@ public static Amazon.KeyManagementService.Model.ListGrantsRequest FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest(Amazon.KeyManagementService.Model.ListGrantsRequest value) { - int? var_limit = value.Limit; - string var_marker = value.Marker; - string var_grantId = value.GrantId; - string var_granteePrincipal = value.GranteePrincipal; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; + string var_grantId = (string)value.GrantId; + string var_granteePrincipal = (string)value.GranteePrincipal; return new software.amazon.cryptography.services.kms.internaldafny.types.ListGrantsRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M6_Marker(var_marker), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M7_GrantId(var_grantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M16_GranteePrincipal(var_granteePrincipal)); } public static Amazon.KeyManagementService.Model.ListGrantsResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsResponse value) @@ -1568,9 +1568,9 @@ public static Amazon.KeyManagementService.Model.ListGrantsResponse FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse(Amazon.KeyManagementService.Model.ListGrantsResponse value) { - System.Collections.Generic.List var_grants = value.Grants; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_grants = (System.Collections.Generic.List)value.Grants; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListGrantsResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse__M6_Grants(var_grants), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListKeyPoliciesRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesRequest value) @@ -1582,8 +1582,8 @@ public static Amazon.KeyManagementService.Model.ListKeyPoliciesRequest FromDafny public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest(Amazon.KeyManagementService.Model.ListKeyPoliciesRequest value) { - int? var_limit = value.Limit; - string var_marker = value.Marker; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyPoliciesRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListKeyPoliciesResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesResponse value) @@ -1595,9 +1595,9 @@ public static Amazon.KeyManagementService.Model.ListKeyPoliciesResponse FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse(Amazon.KeyManagementService.Model.ListKeyPoliciesResponse value) { - System.Collections.Generic.List var_policyNames = value.PolicyNames; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_policyNames = (System.Collections.Generic.List)value.PolicyNames; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyPoliciesResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse__M11_PolicyNames(var_policyNames), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListKeyRotationsRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsRequest value) @@ -1609,8 +1609,8 @@ public static Amazon.KeyManagementService.Model.ListKeyRotationsRequest FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest(Amazon.KeyManagementService.Model.ListKeyRotationsRequest value) { - int? var_limit = value.Limit; - string var_marker = value.Marker; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyRotationsRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListKeyRotationsResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsResponse value) @@ -1622,9 +1622,9 @@ public static Amazon.KeyManagementService.Model.ListKeyRotationsResponse FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse(Amazon.KeyManagementService.Model.ListKeyRotationsResponse value) { - System.Collections.Generic.List var_rotations = value.Rotations; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_rotations = (System.Collections.Generic.List)value.Rotations; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyRotationsResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse__M9_Rotations(var_rotations), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListKeysRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListKeysRequest value) @@ -1635,8 +1635,8 @@ public static Amazon.KeyManagementService.Model.ListKeysRequest FromDafny_N3_com public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeysRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest(Amazon.KeyManagementService.Model.ListKeysRequest value) { - int? var_limit = value.Limit; - string var_marker = value.Marker; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeysRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListKeysResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListKeysResponse value) @@ -1648,9 +1648,9 @@ public static Amazon.KeyManagementService.Model.ListKeysResponse FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeysResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse(Amazon.KeyManagementService.Model.ListKeysResponse value) { - System.Collections.Generic.List var_keys = value.Keys; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_keys = (System.Collections.Generic.List)value.Keys; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeysResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse__M4_Keys(var_keys), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListResourceTagsRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsRequest value) @@ -1662,8 +1662,8 @@ public static Amazon.KeyManagementService.Model.ListResourceTagsRequest FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest(Amazon.KeyManagementService.Model.ListResourceTagsRequest value) { - int? var_limit = value.Limit; - string var_marker = value.Marker; + int? var_limit = (int?)value.Limit; + string var_marker = (string)value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListResourceTagsRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListResourceTagsResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsResponse value) @@ -1675,9 +1675,9 @@ public static Amazon.KeyManagementService.Model.ListResourceTagsResponse FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse(Amazon.KeyManagementService.Model.ListResourceTagsResponse value) { - System.Collections.Generic.List var_tags = value.Tags; - string var_nextMarker = value.NextMarker; - bool? var_truncated = value.Truncated; + System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; + string var_nextMarker = (string)value.NextMarker; + bool? var_truncated = (bool?)value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListResourceTagsResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec value) @@ -1704,7 +1704,7 @@ public static Amazon.KeyManagementService.Model.MalformedPolicyDocumentException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_MalformedPolicyDocumentException(Amazon.KeyManagementService.Model.MalformedPolicyDocumentException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_MalformedPolicyDocumentException__M7_message(var_message) ); @@ -1741,7 +1741,7 @@ public static Amazon.KeyManagementService.Model.NotFoundException FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S17_NotFoundException(Amazon.KeyManagementService.Model.NotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S17_NotFoundException__M7_message(var_message) ); @@ -1772,8 +1772,8 @@ public static Amazon.KeyManagementService.Model.PutKeyPolicyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IPutKeyPolicyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest(Amazon.KeyManagementService.Model.PutKeyPolicyRequest value) { - string var_policyName = value.PolicyName; - bool? var_bypassPolicyLockoutSafetyCheck = value.BypassPolicyLockoutSafetyCheck; + string var_policyName = (string)value.PolicyName; + bool? var_bypassPolicyLockoutSafetyCheck = (bool?)value.BypassPolicyLockoutSafetyCheck; return new software.amazon.cryptography.services.kms.internaldafny.types.PutKeyPolicyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M10_PolicyName(var_policyName), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M6_Policy(value.Policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M30_BypassPolicyLockoutSafetyCheck(var_bypassPolicyLockoutSafetyCheck)); } public static Amazon.KeyManagementService.Model.ReEncryptRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest(software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptRequest value) @@ -1791,13 +1791,13 @@ public static Amazon.KeyManagementService.Model.ReEncryptRequest FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest(Amazon.KeyManagementService.Model.ReEncryptRequest value) { - System.Collections.Generic.Dictionary var_sourceEncryptionContext = value.SourceEncryptionContext; - string var_sourceKeyId = value.SourceKeyId; - System.Collections.Generic.Dictionary var_destinationEncryptionContext = value.DestinationEncryptionContext; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = value.SourceEncryptionAlgorithm; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = value.DestinationEncryptionAlgorithm; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.Dictionary var_sourceEncryptionContext = (System.Collections.Generic.Dictionary)value.SourceEncryptionContext; + string var_sourceKeyId = (string)value.SourceKeyId; + System.Collections.Generic.Dictionary var_destinationEncryptionContext = (System.Collections.Generic.Dictionary)value.DestinationEncryptionContext; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.SourceEncryptionAlgorithm; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.DestinationEncryptionAlgorithm; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.ReEncryptRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M14_CiphertextBlob(value.CiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M23_SourceEncryptionContext(var_sourceEncryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M11_SourceKeyId(var_sourceKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M16_DestinationKeyId(value.DestinationKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M28_DestinationEncryptionContext(var_destinationEncryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M25_SourceEncryptionAlgorithm(var_sourceEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M30_DestinationEncryptionAlgorithm(var_destinationEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.ReEncryptResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse(software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptResponse value) @@ -1811,11 +1811,11 @@ public static Amazon.KeyManagementService.Model.ReEncryptResponse FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse(Amazon.KeyManagementService.Model.ReEncryptResponse value) { - System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; - string var_sourceKeyId = value.SourceKeyId; - string var_keyId = value.KeyId; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = value.SourceEncryptionAlgorithm; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = value.DestinationEncryptionAlgorithm; + System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; + string var_sourceKeyId = (string)value.SourceKeyId; + string var_keyId = (string)value.KeyId; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.SourceEncryptionAlgorithm; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.DestinationEncryptionAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.ReEncryptResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M11_SourceKeyId(var_sourceKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M25_SourceEncryptionAlgorithm(var_sourceEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M30_DestinationEncryptionAlgorithm(var_destinationEncryptionAlgorithm)); } public static Amazon.KeyManagementService.Model.ReplicateKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyRequest value) @@ -1830,10 +1830,10 @@ public static Amazon.KeyManagementService.Model.ReplicateKeyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest(Amazon.KeyManagementService.Model.ReplicateKeyRequest value) { - string var_policy = value.Policy; - bool? var_bypassPolicyLockoutSafetyCheck = value.BypassPolicyLockoutSafetyCheck; - string var_description = value.Description; - System.Collections.Generic.List var_tags = value.Tags; + string var_policy = (string)value.Policy; + bool? var_bypassPolicyLockoutSafetyCheck = (bool?)value.BypassPolicyLockoutSafetyCheck; + string var_description = (string)value.Description; + System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; return new software.amazon.cryptography.services.kms.internaldafny.types.ReplicateKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M13_ReplicaRegion(value.ReplicaRegion), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M30_BypassPolicyLockoutSafetyCheck(var_bypassPolicyLockoutSafetyCheck), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M11_Description(var_description), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M4_Tags(var_tags)); } public static Amazon.KeyManagementService.Model.ReplicateKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyResponse value) @@ -1845,9 +1845,9 @@ public static Amazon.KeyManagementService.Model.ReplicateKeyResponse FromDafny_N public static software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse(Amazon.KeyManagementService.Model.ReplicateKeyResponse value) { - Amazon.KeyManagementService.Model.KeyMetadata var_replicaKeyMetadata = value.ReplicaKeyMetadata; - string var_replicaPolicy = value.ReplicaPolicy; - System.Collections.Generic.List var_replicaTags = value.ReplicaTags; + Amazon.KeyManagementService.Model.KeyMetadata var_replicaKeyMetadata = (Amazon.KeyManagementService.Model.KeyMetadata)value.ReplicaKeyMetadata; + string var_replicaPolicy = (string)value.ReplicaPolicy; + System.Collections.Generic.List var_replicaTags = (System.Collections.Generic.List)value.ReplicaTags; return new software.amazon.cryptography.services.kms.internaldafny.types.ReplicateKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse__M18_ReplicaKeyMetadata(var_replicaKeyMetadata), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse__M13_ReplicaPolicy(var_replicaPolicy), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse__M11_ReplicaTags(var_replicaTags)); } public static Amazon.KeyManagementService.Model.RetireGrantRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest(software.amazon.cryptography.services.kms.internaldafny.types._IRetireGrantRequest value) @@ -1860,10 +1860,10 @@ public static Amazon.KeyManagementService.Model.RetireGrantRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IRetireGrantRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest(Amazon.KeyManagementService.Model.RetireGrantRequest value) { - string var_grantToken = value.GrantToken; - string var_keyId = value.KeyId; - string var_grantId = value.GrantId; - bool? var_dryRun = value.DryRun; + string var_grantToken = (string)value.GrantToken; + string var_keyId = (string)value.KeyId; + string var_grantId = (string)value.GrantId; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.RetireGrantRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M10_GrantToken(var_grantToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M7_GrantId(var_grantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.RevokeGrantRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest(software.amazon.cryptography.services.kms.internaldafny.types._IRevokeGrantRequest value) @@ -1875,7 +1875,7 @@ public static Amazon.KeyManagementService.Model.RevokeGrantRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IRevokeGrantRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest(Amazon.KeyManagementService.Model.RevokeGrantRequest value) { - bool? var_dryRun = value.DryRun; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.RevokeGrantRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M7_GrantId(value.GrantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.RotateKeyOnDemandRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S24_RotateKeyOnDemandRequest(software.amazon.cryptography.services.kms.internaldafny.types._IRotateKeyOnDemandRequest value) @@ -1895,7 +1895,7 @@ public static Amazon.KeyManagementService.Model.RotateKeyOnDemandResponse FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._IRotateKeyOnDemandResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S25_RotateKeyOnDemandResponse(Amazon.KeyManagementService.Model.RotateKeyOnDemandResponse value) { - string var_keyId = value.KeyId; + string var_keyId = (string)value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.RotateKeyOnDemandResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_RotateKeyOnDemandResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.RotationType FromDafny_N3_com__N9_amazonaws__N3_kms__S12_RotationType(software.amazon.cryptography.services.kms.internaldafny.types._IRotationType value) @@ -1918,7 +1918,7 @@ public static Amazon.KeyManagementService.Model.ScheduleKeyDeletionRequest FromD public static software.amazon.cryptography.services.kms.internaldafny.types._IScheduleKeyDeletionRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest(Amazon.KeyManagementService.Model.ScheduleKeyDeletionRequest value) { - int? var_pendingWindowInDays = value.PendingWindowInDays; + int? var_pendingWindowInDays = (int?)value.PendingWindowInDays; return new software.amazon.cryptography.services.kms.internaldafny.types.ScheduleKeyDeletionRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M19_PendingWindowInDays(var_pendingWindowInDays)); } public static Amazon.KeyManagementService.Model.ScheduleKeyDeletionResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse(software.amazon.cryptography.services.kms.internaldafny.types._IScheduleKeyDeletionResponse value) @@ -1931,10 +1931,10 @@ public static Amazon.KeyManagementService.Model.ScheduleKeyDeletionResponse From public static software.amazon.cryptography.services.kms.internaldafny.types._IScheduleKeyDeletionResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse(Amazon.KeyManagementService.Model.ScheduleKeyDeletionResponse value) { - string var_keyId = value.KeyId; - System.DateTime? var_deletionDate = value.DeletionDate; - Amazon.KeyManagementService.KeyState var_keyState = value.KeyState; - int? var_pendingWindowInDays = value.PendingWindowInDays; + string var_keyId = (string)value.KeyId; + System.DateTime? var_deletionDate = (System.DateTime?)value.DeletionDate; + Amazon.KeyManagementService.KeyState var_keyState = (Amazon.KeyManagementService.KeyState)value.KeyState; + int? var_pendingWindowInDays = (int?)value.PendingWindowInDays; return new software.amazon.cryptography.services.kms.internaldafny.types.ScheduleKeyDeletionResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M12_DeletionDate(var_deletionDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M8_KeyState(var_keyState), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M19_PendingWindowInDays(var_pendingWindowInDays)); } public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec value) @@ -1977,9 +1977,9 @@ public static Amazon.KeyManagementService.Model.SignRequest FromDafny_N3_com__N9 public static software.amazon.cryptography.services.kms.internaldafny.types._ISignRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest(Amazon.KeyManagementService.Model.SignRequest value) { - Amazon.KeyManagementService.MessageType var_messageType = value.MessageType; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + Amazon.KeyManagementService.MessageType var_messageType = (Amazon.KeyManagementService.MessageType)value.MessageType; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.SignRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M11_MessageType(var_messageType), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M16_SigningAlgorithm(value.SigningAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.SignResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse(software.amazon.cryptography.services.kms.internaldafny.types._ISignResponse value) @@ -1991,9 +1991,9 @@ public static Amazon.KeyManagementService.Model.SignResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.kms.internaldafny.types._ISignResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse(Amazon.KeyManagementService.Model.SignResponse value) { - string var_keyId = value.KeyId; - System.IO.MemoryStream var_signature = value.Signature; - Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = value.SigningAlgorithm; + string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_signature = (System.IO.MemoryStream)value.Signature; + Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = (Amazon.KeyManagementService.SigningAlgorithmSpec)value.SigningAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.SignResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse__M9_Signature(var_signature), ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse__M16_SigningAlgorithm(var_signingAlgorithm)); } public static Amazon.KeyManagementService.Model.TagException FromDafny_N3_com__N9_amazonaws__N3_kms__S12_TagException(software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException value) @@ -2004,7 +2004,7 @@ public static Amazon.KeyManagementService.Model.TagException FromDafny_N3_com__N } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagException(Amazon.KeyManagementService.Model.TagException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException( ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagException__M7_message(var_message) ); @@ -2028,7 +2028,7 @@ public static Amazon.KeyManagementService.Model.UnsupportedOperationException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_UnsupportedOperationException(Amazon.KeyManagementService.Model.UnsupportedOperationException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_UnsupportedOperationException__M7_message(var_message) ); @@ -2070,14 +2070,14 @@ public static Amazon.KeyManagementService.Model.UpdateCustomKeyStoreRequest From public static software.amazon.cryptography.services.kms.internaldafny.types._IUpdateCustomKeyStoreRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest(Amazon.KeyManagementService.Model.UpdateCustomKeyStoreRequest value) { - string var_newCustomKeyStoreName = value.NewCustomKeyStoreName; - string var_keyStorePassword = value.KeyStorePassword; - string var_cloudHsmClusterId = value.CloudHsmClusterId; - string var_xksProxyUriEndpoint = value.XksProxyUriEndpoint; - string var_xksProxyUriPath = value.XksProxyUriPath; - string var_xksProxyVpcEndpointServiceName = value.XksProxyVpcEndpointServiceName; - Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = value.XksProxyAuthenticationCredential; - Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = value.XksProxyConnectivity; + string var_newCustomKeyStoreName = (string)value.NewCustomKeyStoreName; + string var_keyStorePassword = (string)value.KeyStorePassword; + string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; + string var_xksProxyUriEndpoint = (string)value.XksProxyUriEndpoint; + string var_xksProxyUriPath = (string)value.XksProxyUriPath; + string var_xksProxyVpcEndpointServiceName = (string)value.XksProxyVpcEndpointServiceName; + Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = (Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType)value.XksProxyAuthenticationCredential; + Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = (Amazon.KeyManagementService.XksProxyConnectivityType)value.XksProxyConnectivity; return new software.amazon.cryptography.services.kms.internaldafny.types.UpdateCustomKeyStoreRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_CustomKeyStoreId(value.CustomKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M21_NewCustomKeyStoreName(var_newCustomKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_KeyStorePassword(var_keyStorePassword), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M19_XksProxyUriEndpoint(var_xksProxyUriEndpoint), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M15_XksProxyUriPath(var_xksProxyUriPath), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M30_XksProxyVpcEndpointServiceName(var_xksProxyVpcEndpointServiceName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M32_XksProxyAuthenticationCredential(var_xksProxyAuthenticationCredential), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M20_XksProxyConnectivity(var_xksProxyConnectivity)); } public static Amazon.KeyManagementService.Model.UpdateCustomKeyStoreResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S28_UpdateCustomKeyStoreResponse(software.amazon.cryptography.services.kms.internaldafny.types._IUpdateCustomKeyStoreResponse value) @@ -2124,8 +2124,8 @@ public static Amazon.KeyManagementService.Model.VerifyMacRequest FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyMacRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest(Amazon.KeyManagementService.Model.VerifyMacRequest value) { - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyMacRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M12_MacAlgorithm(value.MacAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M3_Mac(value.Mac), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.VerifyMacResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse(software.amazon.cryptography.services.kms.internaldafny.types._IVerifyMacResponse value) @@ -2137,9 +2137,9 @@ public static Amazon.KeyManagementService.Model.VerifyMacResponse FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyMacResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse(Amazon.KeyManagementService.Model.VerifyMacResponse value) { - string var_keyId = value.KeyId; - bool? var_macValid = value.MacValid; - Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = value.MacAlgorithm; + string var_keyId = (string)value.KeyId; + bool? var_macValid = (bool?)value.MacValid; + Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = (Amazon.KeyManagementService.MacAlgorithmSpec)value.MacAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyMacResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse__M8_MacValid(var_macValid), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse__M12_MacAlgorithm(var_macAlgorithm)); } public static Amazon.KeyManagementService.Model.VerifyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IVerifyRequest value) @@ -2155,9 +2155,9 @@ public static Amazon.KeyManagementService.Model.VerifyRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest(Amazon.KeyManagementService.Model.VerifyRequest value) { - Amazon.KeyManagementService.MessageType var_messageType = value.MessageType; - System.Collections.Generic.List var_grantTokens = value.GrantTokens; - bool? var_dryRun = value.DryRun; + Amazon.KeyManagementService.MessageType var_messageType = (Amazon.KeyManagementService.MessageType)value.MessageType; + System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + bool? var_dryRun = (bool?)value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_MessageType(var_messageType), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M9_Signature(value.Signature), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M16_SigningAlgorithm(value.SigningAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.VerifyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IVerifyResponse value) @@ -2169,9 +2169,9 @@ public static Amazon.KeyManagementService.Model.VerifyResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse(Amazon.KeyManagementService.Model.VerifyResponse value) { - string var_keyId = value.KeyId; - bool? var_signatureValid = value.SignatureValid; - Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = value.SigningAlgorithm; + string var_keyId = (string)value.KeyId; + bool? var_signatureValid = (bool?)value.SignatureValid; + Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = (Amazon.KeyManagementService.SigningAlgorithmSpec)value.SigningAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse__M14_SignatureValid(var_signatureValid), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse__M16_SigningAlgorithm(var_signingAlgorithm)); } public static Amazon.KeyManagementService.WrappingKeySpec FromDafny_N3_com__N9_amazonaws__N3_kms__S15_WrappingKeySpec(software.amazon.cryptography.services.kms.internaldafny.types._IWrappingKeySpec value) @@ -2198,7 +2198,7 @@ public static Amazon.KeyManagementService.Model.XksKeyAlreadyInUseException From } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S27_XksKeyAlreadyInUseException(Amazon.KeyManagementService.Model.XksKeyAlreadyInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S27_XksKeyAlreadyInUseException__M7_message(var_message) ); @@ -2211,7 +2211,7 @@ public static Amazon.KeyManagementService.Model.XksKeyInvalidConfigurationExcept } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S35_XksKeyInvalidConfigurationException(Amazon.KeyManagementService.Model.XksKeyInvalidConfigurationException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S35_XksKeyInvalidConfigurationException__M7_message(var_message) ); @@ -2224,7 +2224,7 @@ public static Amazon.KeyManagementService.Model.XksKeyNotFoundException FromDafn } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyNotFoundException(Amazon.KeyManagementService.Model.XksKeyNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyNotFoundException__M7_message(var_message) ); @@ -2249,7 +2249,7 @@ public static Amazon.KeyManagementService.Model.XksProxyIncorrectAuthenticationC } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyIncorrectAuthenticationCredentialException ToDafny_N3_com__N9_amazonaws__N3_kms__S50_XksProxyIncorrectAuthenticationCredentialException(Amazon.KeyManagementService.Model.XksProxyIncorrectAuthenticationCredentialException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyIncorrectAuthenticationCredentialException( ToDafny_N3_com__N9_amazonaws__N3_kms__S50_XksProxyIncorrectAuthenticationCredentialException__M7_message(var_message) ); @@ -2262,7 +2262,7 @@ public static Amazon.KeyManagementService.Model.XksProxyInvalidConfigurationExce } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyInvalidConfigurationException(Amazon.KeyManagementService.Model.XksProxyInvalidConfigurationException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyInvalidConfigurationException__M7_message(var_message) ); @@ -2275,7 +2275,7 @@ public static Amazon.KeyManagementService.Model.XksProxyInvalidResponseException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidResponseException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_XksProxyInvalidResponseException(Amazon.KeyManagementService.Model.XksProxyInvalidResponseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidResponseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_XksProxyInvalidResponseException__M7_message(var_message) ); @@ -2288,7 +2288,7 @@ public static Amazon.KeyManagementService.Model.XksProxyUriEndpointInUseExceptio } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriEndpointInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S33_XksProxyUriEndpointInUseException(Amazon.KeyManagementService.Model.XksProxyUriEndpointInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriEndpointInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S33_XksProxyUriEndpointInUseException__M7_message(var_message) ); @@ -2301,7 +2301,7 @@ public static Amazon.KeyManagementService.Model.XksProxyUriInUseException FromDa } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyUriInUseException(Amazon.KeyManagementService.Model.XksProxyUriInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyUriInUseException__M7_message(var_message) ); @@ -2314,7 +2314,7 @@ public static Amazon.KeyManagementService.Model.XksProxyUriUnreachableException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriUnreachableException ToDafny_N3_com__N9_amazonaws__N3_kms__S31_XksProxyUriUnreachableException(Amazon.KeyManagementService.Model.XksProxyUriUnreachableException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriUnreachableException( ToDafny_N3_com__N9_amazonaws__N3_kms__S31_XksProxyUriUnreachableException__M7_message(var_message) ); @@ -2327,7 +2327,7 @@ public static Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInUseE } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S40_XksProxyVpcEndpointServiceInUseException(Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInUseException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S40_XksProxyVpcEndpointServiceInUseException__M7_message(var_message) ); @@ -2340,7 +2340,7 @@ public static Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInvali } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S55_XksProxyVpcEndpointServiceInvalidConfigurationException(Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInvalidConfigurationException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S55_XksProxyVpcEndpointServiceInvalidConfigurationException__M7_message(var_message) ); @@ -2353,7 +2353,7 @@ public static Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceNotFou } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S43_XksProxyVpcEndpointServiceNotFoundException(Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceNotFoundException value) { - string var_message = value.Message; + string var_message = (string)value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S43_XksProxyVpcEndpointServiceNotFoundException__M7_message(var_message) ); @@ -2372,7 +2372,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_CancelKeyDeleti } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CancelKeyDeletionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_CancelKeyDeletionResponse__M5_KeyId(Wrappers_Compile._IOption> value) { @@ -2436,7 +2436,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S28_ConnectCustomKe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S28_ConnectCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M9_AliasName(Dafny.ISequence value) { @@ -2444,7 +2444,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M9_AliasName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M11_TargetKeyId(Dafny.ISequence value) { @@ -2452,7 +2452,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M11_TargetKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreName(Dafny.ISequence value) { @@ -2460,7 +2460,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_CustomKeyStoreNameType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_CustomKeyStoreNameType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M17_CloudHsmClusterId(Wrappers_Compile._IOption> value) { @@ -2548,7 +2548,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M16_GranteePrincipal(Dafny.ISequence value) { @@ -2556,7 +2556,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M16_GranteePrincipal(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_PrincipalIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_PrincipalIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M17_RetiringPrincipal(Wrappers_Compile._IOption> value) { @@ -2572,7 +2572,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M10_Operations(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList((System.Collections.Generic.List)value); } public static Amazon.KeyManagementService.Model.GrantConstraints FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M11_Constraints(Wrappers_Compile._IOption value) { @@ -2756,7 +2756,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M14_CiphertextBlob(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -2844,7 +2844,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DeleteAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DeleteAliasRequest__M9_AliasName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_DeleteCustomKeyStoreRequest__M16_CustomKeyStoreId(Dafny.ISequence value) { @@ -2852,7 +2852,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_DeleteCustomKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_DeleteCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S32_DeleteImportedKeyMaterialRequest__M5_KeyId(Dafny.ISequence value) { @@ -2860,7 +2860,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S32_DeleteImportedK } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S32_DeleteImportedKeyMaterialRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_DependencyTimeoutException__M7_message(Wrappers_Compile._IOption> value) { @@ -2876,7 +2876,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M21_KeyAgreementAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec value) { @@ -2884,7 +2884,7 @@ public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3 } public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M21_KeyAgreementAlgorithm(Amazon.KeyManagementService.KeyAgreementAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec((Amazon.KeyManagementService.KeyAgreementAlgorithmSpec)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_PublicKey(Dafny.ISequence value) { @@ -2892,7 +2892,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S25 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_PublicKey(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PublicKeyType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PublicKeyType((System.IO.MemoryStream)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3020,7 +3020,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3052,7 +3052,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S17_DisableKeyReque } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S17_DisableKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DisableKeyRotationRequest__M5_KeyId(Dafny.ISequence value) { @@ -3060,7 +3060,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DisableKeyRotat } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DisableKeyRotationRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S31_DisconnectCustomKeyStoreRequest__M16_CustomKeyStoreId(Dafny.ISequence value) { @@ -3068,7 +3068,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S31_DisconnectCusto } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DisconnectCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_DryRunOperationException__M7_message(Wrappers_Compile._IOption> value) { @@ -3084,7 +3084,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_EnableKeyReques } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_EnableKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M5_KeyId(Dafny.ISequence value) { @@ -3092,7 +3092,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotati } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M20_RotationPeriodInDays(Wrappers_Compile._IOption value) { @@ -3108,7 +3108,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M9_Plaintext(Dafny.ISequence value) { @@ -3116,7 +3116,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M9_Plaintext(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -3196,7 +3196,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_KeyPairSpec(software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec value) { @@ -3204,7 +3204,7 @@ public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_KeyPairSpec(Amazon.KeyManagementService.DataKeyPairSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec((Amazon.KeyManagementService.DataKeyPairSpec)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3292,7 +3292,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_KeyPairSpec(software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec value) { @@ -3300,7 +3300,7 @@ public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_KeyPairSpec(Amazon.KeyManagementService.DataKeyPairSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec((Amazon.KeyManagementService.DataKeyPairSpec)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3356,7 +3356,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -3444,7 +3444,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -3508,7 +3508,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S18 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M5_KeyId(Dafny.ISequence value) { @@ -3516,7 +3516,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M12_MacAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec value) { @@ -3524,7 +3524,7 @@ public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M12_MacAlgorithm(Amazon.KeyManagementService.MacAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec((Amazon.KeyManagementService.MacAlgorithmSpec)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3612,7 +3612,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M10_PolicyName(Wrappers_Compile._IOption> value) { @@ -3644,7 +3644,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_GetKeyRotationS } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GetKeyRotationStatusRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M18_KeyRotationEnabled(Wrappers_Compile._IOption value) { @@ -3692,7 +3692,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersFo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static Amazon.KeyManagementService.AlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M17_WrappingAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IAlgorithmSpec value) { @@ -3700,7 +3700,7 @@ public static Amazon.KeyManagementService.AlgorithmSpec FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.kms.internaldafny.types._IAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M17_WrappingAlgorithm(Amazon.KeyManagementService.AlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AlgorithmSpec((Amazon.KeyManagementService.AlgorithmSpec)value); } public static Amazon.KeyManagementService.WrappingKeySpec FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M15_WrappingKeySpec(software.amazon.cryptography.services.kms.internaldafny.types._IWrappingKeySpec value) { @@ -3708,7 +3708,7 @@ public static Amazon.KeyManagementService.WrappingKeySpec FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IWrappingKeySpec ToDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M15_WrappingKeySpec(Amazon.KeyManagementService.WrappingKeySpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_WrappingKeySpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_WrappingKeySpec((Amazon.KeyManagementService.WrappingKeySpec)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M5_KeyId(Wrappers_Compile._IOption> value) { @@ -3748,7 +3748,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3828,7 +3828,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMateri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M11_ImportToken(Dafny.ISequence value) { @@ -3836,7 +3836,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M11_ImportToken(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M20_EncryptedKeyMaterial(Dafny.ISequence value) { @@ -3844,7 +3844,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M20_EncryptedKeyMaterial(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M7_ValidTo(Wrappers_Compile._IOption> value) { @@ -4068,7 +4068,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsReque } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M7_GrantId(Wrappers_Compile._IOption> value) { @@ -4116,7 +4116,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPolicies } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_Limit(Wrappers_Compile._IOption value) { @@ -4164,7 +4164,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotation } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_Limit(Wrappers_Compile._IOption value) { @@ -4252,7 +4252,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTag } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_Limit(Wrappers_Compile._IOption value) { @@ -4316,7 +4316,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M10_PolicyName(Wrappers_Compile._IOption> value) { @@ -4332,7 +4332,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M6_Policy(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_PolicyType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_PolicyType((string)value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M30_BypassPolicyLockoutSafetyCheck(Wrappers_Compile._IOption value) { @@ -4348,7 +4348,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M14_CiphertextBlob(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M23_SourceEncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -4372,7 +4372,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptReques } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M16_DestinationKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M28_DestinationEncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -4460,7 +4460,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M13_ReplicaRegion(Dafny.ISequence value) { @@ -4468,7 +4468,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M13_ReplicaRegion(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M6_Policy(Wrappers_Compile._IOption> value) { @@ -4564,7 +4564,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M7_GrantId(Dafny.ISequence value) { @@ -4572,7 +4572,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M7_GrantId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S11_GrantIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S11_GrantIdType((string)value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M6_DryRun(Wrappers_Compile._IOption value) { @@ -4588,7 +4588,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_RotateKeyOnDema } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_RotateKeyOnDemandRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_RotateKeyOnDemandResponse__M5_KeyId(Wrappers_Compile._IOption> value) { @@ -4604,7 +4604,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDele } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M19_PendingWindowInDays(Wrappers_Compile._IOption value) { @@ -4652,7 +4652,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M5 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M7_Message(Dafny.ISequence value) { @@ -4660,7 +4660,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S11 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); } public static Amazon.KeyManagementService.MessageType FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M11_MessageType(Wrappers_Compile._IOption value) { @@ -4684,7 +4684,7 @@ public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M16_SigningAlgorithm(Amazon.KeyManagementService.SigningAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec((Amazon.KeyManagementService.SigningAlgorithmSpec)value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M6_DryRun(Wrappers_Compile._IOption value) { @@ -4732,7 +4732,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequest__M4_Tags(Dafny.ISequence value) { @@ -4740,7 +4740,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_Ta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequest__M4_Tags(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S29_UnsupportedOperationException__M7_message(Wrappers_Compile._IOption> value) { @@ -4756,7 +4756,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRequest__M7_TagKeys(Dafny.ISequence> value) { @@ -4764,7 +4764,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRequest__M7_TagKeys(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList((System.Collections.Generic.List)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M9_AliasName(Dafny.ISequence value) { @@ -4772,7 +4772,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M9_AliasName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M11_TargetKeyId(Dafny.ISequence value) { @@ -4780,7 +4780,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M11_TargetKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_CustomKeyStoreId(Dafny.ISequence value) { @@ -4788,7 +4788,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M21_NewCustomKeyStoreName(Wrappers_Compile._IOption> value) { @@ -4860,7 +4860,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescriptionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescriptionRequest__M11_Description(Dafny.ISequence value) { @@ -4868,7 +4868,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescriptionRequest__M11_Description(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DescriptionType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DescriptionType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M5_KeyId(Dafny.ISequence value) { @@ -4876,7 +4876,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M13_PrimaryRegion(Dafny.ISequence value) { @@ -4884,7 +4884,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M13_PrimaryRegion(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M7_Message(Dafny.ISequence value) { @@ -4892,7 +4892,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M5_KeyId(Dafny.ISequence value) { @@ -4900,7 +4900,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacReques } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M12_MacAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec value) { @@ -4908,7 +4908,7 @@ public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M12_MacAlgorithm(Amazon.KeyManagementService.MacAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec((Amazon.KeyManagementService.MacAlgorithmSpec)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M3_Mac(Dafny.ISequence value) { @@ -4916,7 +4916,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M3_Mac(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -4964,7 +4964,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M7_Message(Dafny.ISequence value) { @@ -4972,7 +4972,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); } public static Amazon.KeyManagementService.MessageType FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_MessageType(Wrappers_Compile._IOption value) { @@ -4988,7 +4988,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M9_Signature(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); } public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M16_SigningAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec value) { @@ -4996,7 +4996,7 @@ public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M16_SigningAlgorithm(Amazon.KeyManagementService.SigningAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec((Amazon.KeyManagementService.SigningAlgorithmSpec)value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -5257,8 +5257,8 @@ public static Amazon.KeyManagementService.Model.GrantConstraints FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantConstraints ToDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints(Amazon.KeyManagementService.Model.GrantConstraints value) { - System.Collections.Generic.Dictionary var_encryptionContextSubset = value.EncryptionContextSubset; - System.Collections.Generic.Dictionary var_encryptionContextEquals = value.EncryptionContextEquals; + System.Collections.Generic.Dictionary var_encryptionContextSubset = (System.Collections.Generic.Dictionary)value.EncryptionContextSubset; + System.Collections.Generic.Dictionary var_encryptionContextEquals = (System.Collections.Generic.Dictionary)value.EncryptionContextEquals; return new software.amazon.cryptography.services.kms.internaldafny.types.GrantConstraints(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints__M23_EncryptionContextSubset(var_encryptionContextSubset), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints__M23_EncryptionContextEquals(var_encryptionContextEquals)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenList(Dafny.ISequence> value) @@ -5372,30 +5372,30 @@ public static Amazon.KeyManagementService.Model.KeyMetadata FromDafny_N3_com__N9 public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyMetadata ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata(Amazon.KeyManagementService.Model.KeyMetadata value) { - string var_aWSAccountId = value.AWSAccountId; - string var_arn = value.Arn; - System.DateTime? var_creationDate = value.CreationDate; - bool? var_enabled = value.Enabled; - string var_description = value.Description; - Amazon.KeyManagementService.KeyUsageType var_keyUsage = value.KeyUsage; - Amazon.KeyManagementService.KeyState var_keyState = value.KeyState; - System.DateTime? var_deletionDate = value.DeletionDate; - System.DateTime? var_validTo = value.ValidTo; - Amazon.KeyManagementService.OriginType var_origin = value.Origin; - string var_customKeyStoreId = value.CustomKeyStoreId; - string var_cloudHsmClusterId = value.CloudHsmClusterId; - Amazon.KeyManagementService.ExpirationModelType var_expirationModel = value.ExpirationModel; - Amazon.KeyManagementService.KeyManagerType var_keyManager = value.KeyManager; - Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = value.CustomerMasterKeySpec; - Amazon.KeyManagementService.KeySpec var_keySpec = value.KeySpec; - System.Collections.Generic.List var_encryptionAlgorithms = value.EncryptionAlgorithms; - System.Collections.Generic.List var_signingAlgorithms = value.SigningAlgorithms; - System.Collections.Generic.List var_keyAgreementAlgorithms = value.KeyAgreementAlgorithms; - bool? var_multiRegion = value.MultiRegion; - Amazon.KeyManagementService.Model.MultiRegionConfiguration var_multiRegionConfiguration = value.MultiRegionConfiguration; - int? var_pendingDeletionWindowInDays = value.PendingDeletionWindowInDays; - System.Collections.Generic.List var_macAlgorithms = value.MacAlgorithms; - Amazon.KeyManagementService.Model.XksKeyConfigurationType var_xksKeyConfiguration = value.XksKeyConfiguration; + string var_aWSAccountId = (string)value.AWSAccountId; + string var_arn = (string)value.Arn; + System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; + bool? var_enabled = (bool?)value.Enabled; + string var_description = (string)value.Description; + Amazon.KeyManagementService.KeyUsageType var_keyUsage = (Amazon.KeyManagementService.KeyUsageType)value.KeyUsage; + Amazon.KeyManagementService.KeyState var_keyState = (Amazon.KeyManagementService.KeyState)value.KeyState; + System.DateTime? var_deletionDate = (System.DateTime?)value.DeletionDate; + System.DateTime? var_validTo = (System.DateTime?)value.ValidTo; + Amazon.KeyManagementService.OriginType var_origin = (Amazon.KeyManagementService.OriginType)value.Origin; + string var_customKeyStoreId = (string)value.CustomKeyStoreId; + string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; + Amazon.KeyManagementService.ExpirationModelType var_expirationModel = (Amazon.KeyManagementService.ExpirationModelType)value.ExpirationModel; + Amazon.KeyManagementService.KeyManagerType var_keyManager = (Amazon.KeyManagementService.KeyManagerType)value.KeyManager; + Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = (Amazon.KeyManagementService.CustomerMasterKeySpec)value.CustomerMasterKeySpec; + Amazon.KeyManagementService.KeySpec var_keySpec = (Amazon.KeyManagementService.KeySpec)value.KeySpec; + System.Collections.Generic.List var_encryptionAlgorithms = (System.Collections.Generic.List)value.EncryptionAlgorithms; + System.Collections.Generic.List var_signingAlgorithms = (System.Collections.Generic.List)value.SigningAlgorithms; + System.Collections.Generic.List var_keyAgreementAlgorithms = (System.Collections.Generic.List)value.KeyAgreementAlgorithms; + bool? var_multiRegion = (bool?)value.MultiRegion; + Amazon.KeyManagementService.Model.MultiRegionConfiguration var_multiRegionConfiguration = (Amazon.KeyManagementService.Model.MultiRegionConfiguration)value.MultiRegionConfiguration; + int? var_pendingDeletionWindowInDays = (int?)value.PendingDeletionWindowInDays; + System.Collections.Generic.List var_macAlgorithms = (System.Collections.Generic.List)value.MacAlgorithms; + Amazon.KeyManagementService.Model.XksKeyConfigurationType var_xksKeyConfiguration = (Amazon.KeyManagementService.Model.XksKeyConfigurationType)value.XksKeyConfiguration; return new software.amazon.cryptography.services.kms.internaldafny.types.KeyMetadata(ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_AWSAccountId(var_aWSAccountId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M3_Arn(var_arn), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M7_Enabled(var_enabled), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M11_Description(var_description), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M8_KeyUsage(var_keyUsage), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M8_KeyState(var_keyState), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_DeletionDate(var_deletionDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M7_ValidTo(var_validTo), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M6_Origin(var_origin), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M15_ExpirationModel(var_expirationModel), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M10_KeyManager(var_keyManager), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M21_CustomerMasterKeySpec(var_customerMasterKeySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M20_EncryptionAlgorithms(var_encryptionAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M17_SigningAlgorithms(var_signingAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M22_KeyAgreementAlgorithms(var_keyAgreementAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M11_MultiRegion(var_multiRegion), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M24_MultiRegionConfiguration(var_multiRegionConfiguration), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M27_PendingDeletionWindowInDays(var_pendingDeletionWindowInDays), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M13_MacAlgorithms(var_macAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M19_XksKeyConfiguration(var_xksKeyConfiguration)); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(Dafny.ISequence value) @@ -5429,8 +5429,8 @@ public static Amazon.KeyManagementService.Model.RecipientInfo FromDafny_N3_com__ public static software.amazon.cryptography.services.kms.internaldafny.types._IRecipientInfo ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo(Amazon.KeyManagementService.Model.RecipientInfo value) { - Amazon.KeyManagementService.KeyEncryptionMechanism var_keyEncryptionAlgorithm = value.KeyEncryptionAlgorithm; - System.IO.MemoryStream var_attestationDocument = value.AttestationDocument; + Amazon.KeyManagementService.KeyEncryptionMechanism var_keyEncryptionAlgorithm = (Amazon.KeyManagementService.KeyEncryptionMechanism)value.KeyEncryptionAlgorithm; + System.IO.MemoryStream var_attestationDocument = (System.IO.MemoryStream)value.AttestationDocument; return new software.amazon.cryptography.services.kms.internaldafny.types.RecipientInfo(ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo__M22_KeyEncryptionAlgorithm(var_keyEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo__M19_AttestationDocument(var_attestationDocument)); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(Dafny.ISequence value) @@ -5613,7 +5613,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthent } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthenticationCredentialType__M11_AccessKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyAuthenticationAccessKeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyAuthenticationAccessKeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthenticationCredentialType__M18_RawSecretAccessKey(Dafny.ISequence value) { @@ -5621,7 +5621,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthent } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthenticationCredentialType__M18_RawSecretAccessKey(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S44_XksProxyAuthenticationRawSecretAccessKeyType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S44_XksProxyAuthenticationRawSecretAccessKeyType((string)value); } public static Amazon.KeyManagementService.GrantOperation FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IGrantOperation value) { @@ -5629,7 +5629,7 @@ public static Amazon.KeyManagementService.GrantOperation FromDafny_N3_com__N9_am } public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantOperation ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList__M6_member(Amazon.KeyManagementService.GrantOperation value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantOperation(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantOperation((Amazon.KeyManagementService.GrantOperation)value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints__M23_EncryptionContextSubset(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -5653,7 +5653,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenList_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenType((string)value); } public static Amazon.KeyManagementService.Model.Tag FromDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._ITag value) { @@ -5661,7 +5661,7 @@ public static Amazon.KeyManagementService.Model.Tag FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.kms.internaldafny.types._ITag ToDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList__M6_member(Amazon.KeyManagementService.Model.Tag value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag((Amazon.KeyManagementService.Model.Tag)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_AWSAccountId(Wrappers_Compile._IOption> value) { @@ -5677,7 +5677,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M5 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M3_Arn(Wrappers_Compile._IOption> value) { @@ -5869,7 +5869,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionConte } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionContextType__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_EncryptionContextKey(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_EncryptionContextKey((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionContextType__M5_value(Dafny.ISequence value) { @@ -5877,7 +5877,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionConte } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionContextType__M5_value(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_EncryptionContextValue(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_EncryptionContextValue((string)value); } public static Amazon.KeyManagementService.KeyEncryptionMechanism FromDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo__M22_KeyEncryptionAlgorithm(Wrappers_Compile._IOption value) { @@ -5901,7 +5901,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoresListEntry FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types._ICustomKeyStoresListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CustomKeyStoresList__M6_member(Amazon.KeyManagementService.Model.CustomKeyStoresListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry((Amazon.KeyManagementService.Model.CustomKeyStoresListEntry)value); } public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S27_EncryptionAlgorithmSpecList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec value) { @@ -5909,7 +5909,7 @@ public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S27_EncryptionAlgorithmSpecList__M6_member(Amazon.KeyManagementService.EncryptionAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec((Amazon.KeyManagementService.EncryptionAlgorithmSpec)value); } public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S24_SigningAlgorithmSpecList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec value) { @@ -5917,7 +5917,7 @@ public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S24_SigningAlgorithmSpecList__M6_member(Amazon.KeyManagementService.SigningAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec((Amazon.KeyManagementService.SigningAlgorithmSpec)value); } public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S29_KeyAgreementAlgorithmSpecList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec value) { @@ -5925,7 +5925,7 @@ public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3 } public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S29_KeyAgreementAlgorithmSpecList__M6_member(Amazon.KeyManagementService.KeyAgreementAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec((Amazon.KeyManagementService.KeyAgreementAlgorithmSpec)value); } public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S9_AliasList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry value) { @@ -5933,7 +5933,7 @@ public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S9_AliasList__M6_member(Amazon.KeyManagementService.Model.AliasListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry((Amazon.KeyManagementService.Model.AliasListEntry)value); } public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S9_GrantList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry value) { @@ -5941,7 +5941,7 @@ public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S9_GrantList__M6_member(Amazon.KeyManagementService.Model.GrantListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry((Amazon.KeyManagementService.Model.GrantListEntry)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameList__M6_member(Dafny.ISequence value) { @@ -5949,7 +5949,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameList_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameType((string)value); } public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S13_RotationsList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry value) { @@ -5957,7 +5957,7 @@ public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RotationsList__M6_member(Amazon.KeyManagementService.Model.RotationsListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry((Amazon.KeyManagementService.Model.RotationsListEntry)value); } public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S7_KeyList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry value) { @@ -5965,7 +5965,7 @@ public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N } public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S7_KeyList__M6_member(Amazon.KeyManagementService.Model.KeyListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry((Amazon.KeyManagementService.Model.KeyListEntry)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList__M6_member(Dafny.ISequence value) { @@ -5973,7 +5973,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList__M6_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyAuthenticationAccessKeyIdType(Dafny.ISequence value) { @@ -6027,9 +6027,9 @@ public static Amazon.KeyManagementService.Model.MultiRegionConfiguration FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IMultiRegionConfiguration ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration(Amazon.KeyManagementService.Model.MultiRegionConfiguration value) { - Amazon.KeyManagementService.MultiRegionKeyType var_multiRegionKeyType = value.MultiRegionKeyType; - Amazon.KeyManagementService.Model.MultiRegionKey var_primaryKey = value.PrimaryKey; - System.Collections.Generic.List var_replicaKeys = value.ReplicaKeys; + Amazon.KeyManagementService.MultiRegionKeyType var_multiRegionKeyType = (Amazon.KeyManagementService.MultiRegionKeyType)value.MultiRegionKeyType; + Amazon.KeyManagementService.Model.MultiRegionKey var_primaryKey = (Amazon.KeyManagementService.Model.MultiRegionKey)value.PrimaryKey; + System.Collections.Generic.List var_replicaKeys = (System.Collections.Generic.List)value.ReplicaKeys; return new software.amazon.cryptography.services.kms.internaldafny.types.MultiRegionConfiguration(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M18_MultiRegionKeyType(var_multiRegionKeyType), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M10_PrimaryKey(var_primaryKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M11_ReplicaKeys(var_replicaKeys)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S20_MacAlgorithmSpecList(Dafny.ISequence value) @@ -6047,7 +6047,7 @@ public static Amazon.KeyManagementService.Model.XksKeyConfigurationType FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IXksKeyConfigurationType ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyConfigurationType(Amazon.KeyManagementService.Model.XksKeyConfigurationType value) { - string var_id = value.Id; + string var_id = (string)value.Id; return new software.amazon.cryptography.services.kms.internaldafny.types.XksKeyConfigurationType(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyConfigurationType__M2_Id(var_id)); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S20_EncryptionContextKey(Dafny.ISequence value) @@ -6094,15 +6094,15 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoresListEntry FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._ICustomKeyStoresListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry(Amazon.KeyManagementService.Model.CustomKeyStoresListEntry value) { - string var_customKeyStoreId = value.CustomKeyStoreId; - string var_customKeyStoreName = value.CustomKeyStoreName; - string var_cloudHsmClusterId = value.CloudHsmClusterId; - string var_trustAnchorCertificate = value.TrustAnchorCertificate; - Amazon.KeyManagementService.ConnectionStateType var_connectionState = value.ConnectionState; - Amazon.KeyManagementService.ConnectionErrorCodeType var_connectionErrorCode = value.ConnectionErrorCode; - System.DateTime? var_creationDate = value.CreationDate; - Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = value.CustomKeyStoreType; - Amazon.KeyManagementService.Model.XksProxyConfigurationType var_xksProxyConfiguration = value.XksProxyConfiguration; + string var_customKeyStoreId = (string)value.CustomKeyStoreId; + string var_customKeyStoreName = (string)value.CustomKeyStoreName; + string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; + string var_trustAnchorCertificate = (string)value.TrustAnchorCertificate; + Amazon.KeyManagementService.ConnectionStateType var_connectionState = (Amazon.KeyManagementService.ConnectionStateType)value.ConnectionState; + Amazon.KeyManagementService.ConnectionErrorCodeType var_connectionErrorCode = (Amazon.KeyManagementService.ConnectionErrorCodeType)value.ConnectionErrorCode; + System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; + Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = (Amazon.KeyManagementService.CustomKeyStoreType)value.CustomKeyStoreType; + Amazon.KeyManagementService.Model.XksProxyConfigurationType var_xksProxyConfiguration = (Amazon.KeyManagementService.Model.XksProxyConfigurationType)value.XksProxyConfiguration; return new software.amazon.cryptography.services.kms.internaldafny.types.CustomKeyStoresListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M18_CustomKeyStoreName(var_customKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M22_TrustAnchorCertificate(var_trustAnchorCertificate), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M15_ConnectionState(var_connectionState), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M19_ConnectionErrorCode(var_connectionErrorCode), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M18_CustomKeyStoreType(var_customKeyStoreType), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M21_XksProxyConfiguration(var_xksProxyConfiguration)); } public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry value) @@ -6116,11 +6116,11 @@ public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry(Amazon.KeyManagementService.Model.AliasListEntry value) { - string var_aliasName = value.AliasName; - string var_aliasArn = value.AliasArn; - string var_targetKeyId = value.TargetKeyId; - System.DateTime? var_creationDate = value.CreationDate; - System.DateTime? var_lastUpdatedDate = value.LastUpdatedDate; + string var_aliasName = (string)value.AliasName; + string var_aliasArn = (string)value.AliasArn; + string var_targetKeyId = (string)value.TargetKeyId; + System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; + System.DateTime? var_lastUpdatedDate = (System.DateTime?)value.LastUpdatedDate; return new software.amazon.cryptography.services.kms.internaldafny.types.AliasListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M9_AliasName(var_aliasName), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M8_AliasArn(var_aliasArn), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M11_TargetKeyId(var_targetKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M15_LastUpdatedDate(var_lastUpdatedDate)); } public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry value) @@ -6138,15 +6138,15 @@ public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry(Amazon.KeyManagementService.Model.GrantListEntry value) { - string var_keyId = value.KeyId; - string var_grantId = value.GrantId; - string var_name = value.Name; - System.DateTime? var_creationDate = value.CreationDate; - string var_granteePrincipal = value.GranteePrincipal; - string var_retiringPrincipal = value.RetiringPrincipal; - string var_issuingAccount = value.IssuingAccount; - System.Collections.Generic.List var_operations = value.Operations; - Amazon.KeyManagementService.Model.GrantConstraints var_constraints = value.Constraints; + string var_keyId = (string)value.KeyId; + string var_grantId = (string)value.GrantId; + string var_name = (string)value.Name; + System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; + string var_granteePrincipal = (string)value.GranteePrincipal; + string var_retiringPrincipal = (string)value.RetiringPrincipal; + string var_issuingAccount = (string)value.IssuingAccount; + System.Collections.Generic.List var_operations = (System.Collections.Generic.List)value.Operations; + Amazon.KeyManagementService.Model.GrantConstraints var_constraints = (Amazon.KeyManagementService.Model.GrantConstraints)value.Constraints; return new software.amazon.cryptography.services.kms.internaldafny.types.GrantListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M7_GrantId(var_grantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M4_Name(var_name), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M16_GranteePrincipal(var_granteePrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M17_RetiringPrincipal(var_retiringPrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M14_IssuingAccount(var_issuingAccount), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M10_Operations(var_operations), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M11_Constraints(var_constraints)); } public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry value) @@ -6158,9 +6158,9 @@ public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry(Amazon.KeyManagementService.Model.RotationsListEntry value) { - string var_keyId = value.KeyId; - System.DateTime? var_rotationDate = value.RotationDate; - Amazon.KeyManagementService.RotationType var_rotationType = value.RotationType; + string var_keyId = (string)value.KeyId; + System.DateTime? var_rotationDate = (System.DateTime?)value.RotationDate; + Amazon.KeyManagementService.RotationType var_rotationType = (Amazon.KeyManagementService.RotationType)value.RotationType; return new software.amazon.cryptography.services.kms.internaldafny.types.RotationsListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry__M12_RotationDate(var_rotationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry__M12_RotationType(var_rotationType)); } public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry value) @@ -6171,8 +6171,8 @@ public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry(Amazon.KeyManagementService.Model.KeyListEntry value) { - string var_keyId = value.KeyId; - string var_keyArn = value.KeyArn; + string var_keyId = (string)value.KeyId; + string var_keyArn = (string)value.KeyArn; return new software.amazon.cryptography.services.kms.internaldafny.types.KeyListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry__M6_KeyArn(var_keyArn)); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType(Dafny.ISequence value) @@ -6189,7 +6189,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M6_TagKey(D } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M6_TagKey(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType((string)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M8_TagValue(Dafny.ISequence value) { @@ -6197,7 +6197,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M8_TagValue } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M8_TagValue(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagValueType(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagValueType((string)value); } public static Amazon.KeyManagementService.MultiRegionKeyType FromDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M18_MultiRegionKeyType(Wrappers_Compile._IOption value) { @@ -6229,7 +6229,7 @@ public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S20_MacAlgorithmSpecList__M6_member(Amazon.KeyManagementService.MacAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec((Amazon.KeyManagementService.MacAlgorithmSpec)value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyConfigurationType__M2_Id(Wrappers_Compile._IOption> value) { @@ -6479,8 +6479,8 @@ public static Amazon.KeyManagementService.Model.MultiRegionKey FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IMultiRegionKey ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey(Amazon.KeyManagementService.Model.MultiRegionKey value) { - string var_arn = value.Arn; - string var_region = value.Region; + string var_arn = (string)value.Arn; + string var_region = (string)value.Region; return new software.amazon.cryptography.services.kms.internaldafny.types.MultiRegionKey(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey__M3_Arn(var_arn), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey__M6_Region(var_region)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_MultiRegionKeyList(Dafny.ISequence value) @@ -6502,11 +6502,11 @@ public static Amazon.KeyManagementService.Model.XksProxyConfigurationType FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._IXksProxyConfigurationType ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType(Amazon.KeyManagementService.Model.XksProxyConfigurationType value) { - Amazon.KeyManagementService.XksProxyConnectivityType var_connectivity = value.Connectivity; - string var_accessKeyId = value.AccessKeyId; - string var_uriEndpoint = value.UriEndpoint; - string var_uriPath = value.UriPath; - string var_vpcEndpointServiceName = value.VpcEndpointServiceName; + Amazon.KeyManagementService.XksProxyConnectivityType var_connectivity = (Amazon.KeyManagementService.XksProxyConnectivityType)value.Connectivity; + string var_accessKeyId = (string)value.AccessKeyId; + string var_uriEndpoint = (string)value.UriEndpoint; + string var_uriPath = (string)value.UriPath; + string var_vpcEndpointServiceName = (string)value.VpcEndpointServiceName; return new software.amazon.cryptography.services.kms.internaldafny.types.XksProxyConfigurationType(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M12_Connectivity(var_connectivity), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M11_AccessKeyId(var_accessKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M11_UriEndpoint(var_uriEndpoint), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M7_UriPath(var_uriPath), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M22_VpcEndpointServiceName(var_vpcEndpointServiceName)); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey__M3_Arn(Wrappers_Compile._IOption> value) @@ -6531,7 +6531,7 @@ public static Amazon.KeyManagementService.Model.MultiRegionKey FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMultiRegionKey ToDafny_N3_com__N9_amazonaws__N3_kms__S18_MultiRegionKeyList__M6_member(Amazon.KeyManagementService.Model.MultiRegionKey value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey(value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey((Amazon.KeyManagementService.Model.MultiRegionKey)value); } public static Amazon.KeyManagementService.XksProxyConnectivityType FromDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M12_Connectivity(Wrappers_Compile._IOption value) { diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/client.py b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/client.py index 1506f200bc..c07a278b12 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/client.py +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/client.py @@ -186,7 +186,11 @@ def _handle_execution( transport_request=None, transport_response=None, ) - _client_interceptors = config.interceptors + try: + _client_interceptors = config.interceptors + except AttributeError: + config.interceptors = [] + _client_interceptors = config.interceptors client_interceptors = cast( list[Interceptor[Input, Output, DafnyRequest, DafnyResponse]], _client_interceptors, diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py index 7faf1161f9..b3d7d9fcc3 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py @@ -447,13 +447,13 @@ def __eq__(self, other: Any) -> bool: class KmsRsaKeyring: key_id: str - encryption_algorithm: str + encryption_algorithm: dict[str, Any] def __init__( self, *, key_id: str, - encryption_algorithm: str, + encryption_algorithm: dict[str, Any], ): self.key_id = key_id self.encryption_algorithm = encryption_algorithm From c25a645f9e17e88a18a34dbc795d2ec447ff5009 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 15 Apr 2025 14:09:04 -0700 Subject: [PATCH 07/48] Revert "m" This reverts commit 84b93bd0f10b175919e11e05a274248adb3ba1ca. --- .../src/CMCs/LocalCMC.dfy | 3 +- .../src/CMM.dfy | 102 ++- .../src/CMMs/DefaultCMM.dfy | 171 ++-- .../src/CMMs/RequiredEncryptionContextCMM.dfy | 154 ++-- .../src/KeyWrapping/EcdhEdkWrapping.dfy | 3 +- .../src/KeyWrapping/EdkWrapping.dfy | 39 +- .../KeyWrapping/IntermediateKeyWrapping.dfy | 41 +- .../src/KeyWrapping/MaterialWrapping.dfy | 42 +- .../src/Keyring.dfy | 144 ++-- .../AwsKms/AwsKmsDiscoveryKeyring.dfy | 44 +- .../src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy | 61 +- .../AwsKms/AwsKmsHierarchicalKeyring.dfy | 115 +-- .../src/Keyrings/AwsKms/AwsKmsKeyring.dfy | 173 ++-- .../AwsKms/AwsKmsMrkDiscoveryKeyring.dfy | 46 +- .../src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy | 52 +- .../src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy | 51 +- .../src/Keyrings/AwsKms/Constants.dfy | 20 +- .../src/Keyrings/MultiKeyring.dfy | 166 +++- .../src/Keyrings/RawAESKeyring.dfy | 54 +- .../src/Keyrings/RawECDHKeyring.dfy | 59 +- .../src/Keyrings/RawRSAKeyring.dfy | 52 +- .../test/CMCs/LocalCMC.dfy | 12 +- .../test/CMCs/StormTracker.dfy | 53 +- .../TestAwsKmsHierarchicalKeyring.dfy | 18 +- .../test/TestErrorMessages.dfy | 43 +- .../AwsCryptographyKeyStore/test/Fixtures.dfy | 11 +- .../to_dafny.go | 16 +- .../to_native.go | 39 +- .../to_dafny.go | 156 ++-- .../to_native.go | 338 +++----- .../to_dafny.go | 16 +- .../to_native.go | 39 +- .../to_dafny.go | 156 ++-- .../to_native.go | 338 +++----- .../runtimes/rust/src/aes_gcm.rs | 53 +- .../runtimes/rust/src/aes_kdf_ctr.rs | 10 +- .../runtimes/rust/src/dafny_libraries.rs | 13 + .../runtimes/rust/src/digest.rs | 10 +- .../runtimes/rust/src/ecdh.rs | 44 +- .../runtimes/rust/src/ecdsa.rs | 22 +- .../runtimes/rust/src/hmac.rs | 31 +- .../runtimes/rust/src/impl_add.rs | 7 - .../runtimes/rust/src/lib.rs | 6 +- .../runtimes/rust/src/oslang.rs | 25 +- .../runtimes/rust/src/random.rs | 6 +- .../runtimes/rust/src/rsa.rs | 27 +- .../runtimes/rust/src/sets.rs | 2 +- .../runtimes/rust/src/uuid.rs | 4 +- .../runtimes/rust/tests/local_cmc_tests.rs | 55 +- .../to_dafny.go | 240 +++--- .../to_native.go | 780 +++++++----------- .../to_dafny.go | 240 +++--- .../to_native.go | 780 +++++++----------- .../test/TestKDF_TestVectors.dfy | 5 +- .../to_dafny.go | 44 +- .../to_native.go | 26 +- .../to_dafny.go | 44 +- .../to_native.go | 26 +- .../to_dafny.go | 144 ++-- .../to_native.go | 468 ++++------- .../to_dafny.go | 144 ++-- .../to_native.go | 468 ++++------- StandardLibrary/src/Actions.dfy | 5 + StandardLibrary/src/Sequence.dfy | 40 + StandardLibrary/src/Time.dfy | 21 +- StandardLibrary/src/UInt.dfy | 15 + StandardLibrary/src/UTF8.dfy | 139 +++- .../src/TestManifests.dfy | 15 + .../to_dafny.go | 12 +- .../to_native.go | 26 +- .../to_dafny.go | 12 +- .../to_native.go | 26 +- 72 files changed, 3489 insertions(+), 3373 deletions(-) delete mode 100644 AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy index 8f5dc266de..d3516f09fa 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy @@ -588,7 +588,8 @@ module {:options "/functionSyntax:4" } LocalCMC { assert MutableMapIsInjective(cache) by { // Since the map values are themselves heap objects, we need to check that they too are unchanged - assert forall k <- cache.Keys() :: old(allocated(cache.Select(k))) && unchanged(cache.Select(k)); + assert forall k <- cache.Keys() :: old(allocated(cache.Select(k))); + assert forall k <- cache.Keys() :: unchanged(cache.Select(k)); assert MutableMapIsInjective(old@CAN_REMOVE(cache)); assert MutableMapContains(old@CAN_REMOVE(cache), cache); diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy index c9dbc230c2..be0c7217fe 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy @@ -12,49 +12,65 @@ module {:options "/functionSyntax:4" } CMM { trait {:termination false} VerifiableInterface extends Types.ICryptographicMaterialsManager { - method GetEncryptionMaterials'(input: Types.GetEncryptionMaterialsInput) - returns (output: Result) - requires ValidState() - modifies Modifies - {History} - // Dafny will skip type parameters when generating a default decreases clause. - decreases Modifies - {History} - ensures ValidState() - ensures GetEncryptionMaterialsEnsuresPublicly(input, output) - ensures unchanged(History) - ensures output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - ensures output.Success? - ==> - && RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - method DecryptMaterials'(input: Types.DecryptMaterialsInput) - returns (output: Result) - requires ValidState() - modifies Modifies - {History} - // Dafny will skip type parameters when generating a default decreases clause. - decreases Modifies - {History} - ensures ValidState() - ensures DecryptMaterialsEnsuresPublicly(input, output) - ensures unchanged(History) - ensures output.Success? - ==> - && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. + ghost predicate GetEncryptionMaterialsEnsuresPublicly(input: Types.GetEncryptionMaterialsInput, output: Result) + : (outcome: bool) ensures - && (output.Success? ==> ReproducedEncryptionContext?(input)) - && (!ReproducedEncryptionContext?(input) ==> output.Failure?) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. - ensures output.Success? ==> EncryptionContextComplete(input, output.value.decryptionMaterials) + outcome ==> + output.Success? + ==> + // if the output materials are valid then they contain the required fields + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# The encryption materials returned MUST include the following: + + // See EncryptionMaterialsHasPlaintextDataKey for details + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# The CMM MUST ensure that the encryption materials returned are valid. + //# - The encryption materials returned MUST follow the specification for [encryption-materials](structures.md#encryption-materials). + //# - The value of the plaintext data key MUST be non-NULL. + //# - The plaintext data key length MUST be equal to the [key derivation input length](algorithm-suites.md#key-derivation-input-length). + //# - The encrypted data keys list MUST contain at least one encrypted data key. + //# - If the algorithm suite contains a signing algorithm, the encryption materials returned MUST include the generated signing key. + //# - For every key in [Required Encryption Context Keys](structures.md#required-encryption-context-keys) + //# there MUST be a matching key in the [Encryption Context](structures.md#encryption-context-1). + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# - The [Required Encryption Context Keys](structures.md#required-encryption-context-keys) MUST be + //# a super set of the Required Encryption Context Keys in the [encryption materials request](#encryption-materials-request). + && RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) + + ghost predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) + : (outcome: bool) + ensures + outcome ==> + // if the output materials are valid then they contain the required fields + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The decryption materials returned MUST include the following: + && (output.Success? + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The CMM MUST ensure that the decryption materials returned are valid. + //# - The decryption materials returned MUST follow the specification for [decryption-materials](structures.md#decryption-materials). + //# - The value of the plaintext data key MUST be non-NULL. + ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. + && (output.Success? ==> ReproducedEncryptionContext?(input)) + && (!ReproducedEncryptionContext?(input) ==> output.Failure?) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. + && (output.Success? ==> EncryptionContextComplete(input, output.value.decryptionMaterials)) } predicate RequiredEncryptionContextKeys?(requiredEncryptionContextKeys: Option, encryptionMaterials: Types.EncryptionMaterials) { @@ -64,7 +80,7 @@ module {:options "/functionSyntax:4" } CMM { predicate EncryptionContextComplete(input: Types.DecryptMaterialsInput, decryptionMaterials: Types.DecryptionMaterials) { var reproducedEncryptionContext := input.reproducedEncryptionContext.UnwrapOr(map[]); - forall k <- reproducedEncryptionContext.Keys + forall k <- reproducedEncryptionContext :: && k in decryptionMaterials.encryptionContext && decryptionMaterials.encryptionContext[k] == reproducedEncryptionContext[k] @@ -72,7 +88,7 @@ module {:options "/functionSyntax:4" } CMM { predicate ReproducedEncryptionContext?(input: Types.DecryptMaterialsInput) { var reproducedEncryptionContext := input.reproducedEncryptionContext.UnwrapOr(map[]); - forall k <- reproducedEncryptionContext.Keys + forall k <- reproducedEncryptionContext | k in input.encryptionContext :: input.encryptionContext[k] == reproducedEncryptionContext[k] } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy index 6b4b193af7..05ca5b26be 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy @@ -7,6 +7,8 @@ include "../CMM.dfy" include "../Defaults.dfy" include "../Commitment.dfy" include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" +include "../Keyring.dfy" +include "../Keyrings/MultiKeyring.dfy" module DefaultCMM { import opened Wrappers @@ -19,16 +21,18 @@ module DefaultCMM { import UTF8 import Types = AwsCryptographyMaterialProvidersTypes import Crypto = AwsCryptographyPrimitivesTypes - import AtomicPrimitives + import Primitives = AtomicPrimitives import Defaults import Commitment import Seq import SortedSets + import Keyring + import MultiKeyring class DefaultCMM extends CMM.VerifiableInterface { - const cryptoPrimitives: AtomicPrimitives.AtomicPrimitivesClient + const cryptoPrimitives: Primitives.AtomicPrimitivesClient predicate ValidState() ensures ValidState() ==> History in Modifies @@ -51,7 +55,7 @@ module DefaultCMM { //# the caller MUST provide the following value: //# - [Keyring](#keyring) k: Types.IKeyring, - c: AtomicPrimitives.AtomicPrimitivesClient + c: Primitives.AtomicPrimitivesClient ) requires k.ValidState() && c.ValidState() ensures keyring == k && cryptoPrimitives == c @@ -70,7 +74,19 @@ module DefaultCMM { } predicate GetEncryptionMaterialsEnsuresPublicly(input: Types.GetEncryptionMaterialsInput, output: Result) - {true} + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) + } // The following are requirements for the CMM interface. // However they are requirments of intent @@ -101,34 +117,6 @@ module DefaultCMM { ensures GetEncryptionMaterialsEnsuresPublicly(input, output) ensures unchanged(History) - // if the output materials are valid then they contain the required fields - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# The encryption materials returned MUST include the following: - - // See EncryptionMaterialsHasPlaintextDataKey for details - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# The CMM MUST ensure that the encryption materials returned are valid. - //# - The encryption materials returned MUST follow the specification for [encryption-materials](structures.md#encryption-materials). - //# - The value of the plaintext data key MUST be non-NULL. - //# - The plaintext data key length MUST be equal to the [key derivation input length](algorithm-suites.md#key-derivation-input-length). - //# - The encrypted data keys list MUST contain at least one encrypted data key. - //# - If the algorithm suite contains a signing algorithm, the encryption materials returned MUST include the generated signing key. - //# - For every key in [Required Encryption Context Keys](structures.md#required-encryption-context-keys) - //# there MUST be a matching key in the [Encryption Context](structures.md#encryption-context-1). - ensures output.Success? - ==> - && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# - The [Required Encryption Context Keys](structures.md#required-encryption-context-keys) MUST be - //# a super set of the Required Encryption Context Keys in the [encryption materials request](#encryption-materials-request). - ensures output.Success? - ==> - && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials //= type=implication //# If the algorithm suite contains a [signing algorithm](algorithm-suites.md#signature-algorithm): @@ -286,25 +274,58 @@ module DefaultCMM { var result :- keyring.OnEncrypt(Types.OnEncryptInput(materials:=materials)); var encryptionMaterialsOutput := Types.GetEncryptionMaterialsOutput(encryptionMaterials:=result.materials); - :- Need( - Materials.EncryptionMaterialsHasPlaintextDataKey(encryptionMaterialsOutput.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Could not retrieve materials required for encryption")); - - // For Dafny keyrings this is a trivial statement - // because they implement a trait that ensures this. - // However not all keyrings are Dafny keyrings. - // Customers can create custom keyrings. - :- Need( - Materials.ValidEncryptionMaterialsTransition(materials, encryptionMaterialsOutput.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring returned an invalid response")); + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || MultiKeyring.Verified?(keyring) + || keyring is MultiKeyring.MultiKeyring + ) { + :- Need( + Materials.EncryptionMaterialsHasPlaintextDataKey(encryptionMaterialsOutput.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Could not retrieve materials required for encryption")); + + :- Need( + Materials.ValidEncryptionMaterialsTransition(materials, encryptionMaterialsOutput.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring returned an invalid response")); + } output := Success(encryptionMaterialsOutput); } predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) - {true} + : (outcome: bool) + ensures + outcome ==> + (output.Success? + ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) + && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) + && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) + && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) + { + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. + && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) + && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) + && (output.Success? + ==> + && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. + && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) + } // The following are requirements for the CMM interface. // However they are requirments of intent @@ -344,43 +365,6 @@ module DefaultCMM { ensures DecryptMaterialsEnsuresPublicly(input, output) ensures unchanged(History) - // if the output materials are valid then they contain the required fields - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The decryption materials returned MUST include the following: - - // See DecryptionMaterialsWithPlaintextDataKey for details - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All keys in this set MUST exist in the decryption materials encryption context. - // - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The CMM MUST ensure that the decryption materials returned are valid. - //# - The decryption materials returned MUST follow the specification for [decryption-materials](structures.md#decryption-materials). - //# - The value of the plaintext data key MUST be non-NULL. - ensures output.Success? - ==> - && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials) - - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. - ensures - && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) - && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. - ensures output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials //= type=implication //# If the requested algorithm suite does not include a signing algorithm @@ -525,14 +509,19 @@ module DefaultCMM { encryptedDataKeys:=input.encryptedDataKeys )); - // For Dafny keyrings this is a trivial statement - // because they implement a trait that ensures this. - // However not all keyrings are Dafny keyrings. - // Customers can create custom keyrings. - :- Need( - Materials.DecryptionMaterialsTransitionIsValid(materials, result.materials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || MultiKeyring.Verified?(keyring) + || keyring is MultiKeyring.MultiKeyring + ) { + :- Need( + Materials.DecryptionMaterialsTransitionIsValid(materials, result.materials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); + } return Success(Types.DecryptMaterialsOutput(decryptionMaterials:=result.materials)); } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy index 3c7ef03669..9d762243ea 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy @@ -7,6 +7,7 @@ include "../CMM.dfy" include "../Defaults.dfy" include "../Commitment.dfy" include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" +include "DefaultCMM.dfy" module RequiredEncryptionContextCMM { import opened Wrappers @@ -18,6 +19,8 @@ module RequiredEncryptionContextCMM { import Seq import SortedSets + import DefaultCMM + class RequiredEncryptionContextCMM extends CMM.VerifiableInterface { @@ -65,7 +68,19 @@ module RequiredEncryptionContextCMM { } predicate GetEncryptionMaterialsEnsuresPublicly(input: Types.GetEncryptionMaterialsInput, output: Result) - {true} + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) + && CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) + } method GetEncryptionMaterials'( input: Types.GetEncryptionMaterialsInput @@ -165,29 +180,63 @@ module RequiredEncryptionContextCMM { Some(input.requiredEncryptionContextKeys.UnwrapOr([]) + requiredEncryptionContextKeys)) ); - :- Need(forall k <- requiredEncryptionContextKeys :: k in result.encryptionMaterials.requiredEncryptionContextKeys, - Types.AwsCryptographicMaterialProvidersException( - message := "Expected encryption context keys do not exist in keys to only authenticate.") - ); - - // For Dafny keyrings this is a trivial statement - // because they implement a trait that ensures this. - // However not all keyrings are Dafny keyrings. - // Customers can create custom keyrings. - :- Need( - Materials.EncryptionMaterialsHasPlaintextDataKey(result.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Could not retrieve materials required for encryption")); - :- Need( - CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, result.encryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring returned an invalid response")); + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || underlyingCMM is DefaultCMM.DefaultCMM + || underlyingCMM is RequiredEncryptionContextCMM + ) { + + :- Need(forall k <- requiredEncryptionContextKeys :: k in result.encryptionMaterials.requiredEncryptionContextKeys, + Types.AwsCryptographicMaterialProvidersException( + message := "Expected encryption context keys do not exist in keys to only authenticate.") + ); + + :- Need( + Materials.EncryptionMaterialsHasPlaintextDataKey(result.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Could not retrieve materials required for encryption")); + :- Need( + CMM.RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, result.encryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring returned an invalid response")); + } output := Success(result); } predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) - {true} + : (outcome: bool) + ensures + outcome ==> + (output.Success? + ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) + && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) + && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) + && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) + { + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. + && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) + && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) + && (output.Success? + ==> + && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. + && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) + } method DecryptMaterials'( input: Types.DecryptMaterialsInput @@ -203,28 +252,6 @@ module RequiredEncryptionContextCMM { ensures DecryptMaterialsEnsuresPublicly(input, output) ensures unchanged(History) - ensures output.Success? - ==> - && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials) - - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. - ensures - && (output.Success? ==> CMM.ReproducedEncryptionContext?(input)) - && (!CMM.ReproducedEncryptionContext?(input) ==> output.Failure?) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. - ensures output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials) - //= aws-encryption-sdk-specification/framework/required-encryption-context-cmm.md#decrypt-materials //= type=implication //# The reproduced encryption context on the [decrypt materials request](./cmm-interface.md#decrypt-materials-request) @@ -285,24 +312,33 @@ module RequiredEncryptionContextCMM { var result :- underlyingCMM.DecryptMaterials(input); - :- Need(forall k <- requiredEncryptionContextKeys :: k in result.decryptionMaterials.encryptionContext, - Types.AwsCryptographicMaterialProvidersException( - message := "Final encryption context missing required keys.") - ); - - :- Need(CMM.EncryptionContextComplete(input, result.decryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Reproduced encryption context missing from encryption context.") - ); - - // For Dafny keyrings this is a trivial statement - // because they implement a trait that ensures this. - // However not all keyrings are Dafny keyrings. - // Customers can create custom keyrings. - :- Need( - Materials.DecryptionMaterialsWithPlaintextDataKey(result.decryptionMaterials), - Types.AwsCryptographicMaterialProvidersException( - message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || underlyingCMM is DefaultCMM.DefaultCMM + || underlyingCMM is RequiredEncryptionContextCMM + ) { + :- Need(forall k <- requiredEncryptionContextKeys :: k in result.decryptionMaterials.encryptionContext, + Types.AwsCryptographicMaterialProvidersException( + message := "Final encryption context missing required keys.") + ); + + :- Need(CMM.EncryptionContextComplete(input, result.decryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Reproduced encryption context missing from encryption context.") + ); + + // For Dafny keyrings this is a trivial statement + // because they implement a trait that ensures this. + // However not all keyrings are Dafny keyrings. + // Customers can create custom keyrings. + :- Need( + Materials.DecryptionMaterialsWithPlaintextDataKey(result.decryptionMaterials), + Types.AwsCryptographicMaterialProvidersException( + message := "Keyring.OnDecrypt failed to decrypt the plaintext data key.")); + } return Success(result); } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy index 9f5b9c5c7c..3c4f7d17ce 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy @@ -299,7 +299,8 @@ module {:options "/functionSyntax:4" } EcdhEdkWrapping { MaterialWrapping.WrapInput( plaintextMaterial := pdk, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext + encryptionContext := input.encryptionContext, + serializedEC := input.serializedEC ), []); var output := MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy index f064f47541..e1d597c077 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy @@ -93,7 +93,9 @@ module EdkWrapping { WrapInput( plaintextMaterial := encryptionMaterials.plaintextDataKey.value, algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext), + encryptionContext := encryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) + ), Success(wrapRes), []) @@ -113,7 +115,9 @@ module EdkWrapping { && generateAndWrap.Ensures( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext), + encryptionContext := encryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) + ), Success( MaterialWrapping.GenerateAndWrapOutput( plaintextMaterial := ret.value.intermediateMaterial.value, @@ -138,7 +142,9 @@ module EdkWrapping { && generateAndWrap.Ensures( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext), + encryptionContext := encryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) + ), Success(generateAndWrapRes), []) && |ret.value.plaintextDataKey| == AlgorithmSuites.GetEncryptKeyLength(encryptionMaterials.algorithmSuite) as nat @@ -158,7 +164,9 @@ module EdkWrapping { && generateAndWrap.Ensures( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext), + encryptionContext := encryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) + ), Success( MaterialWrapping.GenerateAndWrapOutput( plaintextMaterial := ret.value.intermediateMaterial.value, @@ -168,6 +176,7 @@ module EdkWrapping { wrapInfo := ret.value.wrapInfo)), []) { + // It would be nice if we could require this. :- Need(Materials.ValidEncryptionMaterials(encryptionMaterials), Types.AwsCryptographicMaterialProvidersException( message := "Invalid materials for encryption.")); @@ -179,7 +188,8 @@ module EdkWrapping { WrapInput( plaintextMaterial := encryptionMaterials.plaintextDataKey.value, algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext + encryptionContext := encryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) ), []); return Success( @@ -215,7 +225,8 @@ module EdkWrapping { var directOutput :- generateAndWrap.Invoke( MaterialWrapping.GenerateAndWrapInput( algorithmSuite := encryptionMaterials.algorithmSuite, - encryptionContext := encryptionMaterials.encryptionContext + encryptionContext := encryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionMaterials.encryptionContext) ), []); return Success( @@ -273,7 +284,9 @@ module EdkWrapping { UnwrapInput( wrappedMaterial := wrappedMaterial, algorithmSuite := decryptionMaterials.algorithmSuite, - encryptionContext := decryptionMaterials.encryptionContext), + encryptionContext := decryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(decryptionMaterials.encryptionContext) + ), Failure(ret.error), []) @@ -293,10 +306,13 @@ module EdkWrapping { UnwrapInput( wrappedMaterial := maybeProviderWrappedMaterial.value, algorithmSuite := decryptionMaterials.algorithmSuite, - encryptionContext := decryptionMaterials.encryptionContext), + encryptionContext := decryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(decryptionMaterials.encryptionContext) + ), Success(unwrapRes), []) { + // TODO require this :- Need(Materials.ValidDecryptionMaterials(decryptionMaterials), Types.AwsCryptographicMaterialProvidersException( message := "Invalid materials for decryption.")); @@ -306,8 +322,11 @@ module EdkWrapping { UnwrapInput( wrappedMaterial := wrappedMaterial, algorithmSuite := decryptionMaterials.algorithmSuite, - encryptionContext := decryptionMaterials.encryptionContext - ), []); + encryptionContext := decryptionMaterials.encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(decryptionMaterials.encryptionContext) + ), + [] + ); return Success( UnwrapEdkMaterialOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy index 6da1f5b43a..c8218c45c0 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/IntermediateKeyWrapping.dfy @@ -21,8 +21,15 @@ module IntermediateKeyWrapping { import HKDF import CanonicalEncryptionContext - const KEYWRAP_MAC_INFO := UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_MAC") - const KEYWRAP_ENC_INFO := UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_ENC") + const KEYWRAP_MAC_INFO : UTF8.ValidUTF8Bytes := + var s := [0x41, 0x57, 0x53, 0x5f, 0x4d, 0x50, 0x4c, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x57, 0x52, 0x41, 0x50, 0x5f, 0x4d, 0x41, 0x43]; + assert s == UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_MAC"); + s + + const KEYWRAP_ENC_INFO : UTF8.ValidUTF8Bytes := + var s := [0x41, 0x57, 0x53, 0x5f, 0x4d, 0x50, 0x4c, 0x5f, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x4d, 0x45, 0x44, 0x49, 0x41, 0x54, 0x45, 0x5f, 0x4b, 0x45, 0x59, 0x57, 0x52, 0x41, 0x50, 0x5f, 0x45, 0x4e, 0x43]; + assert s == UTF8.EncodeAscii("AWS_MPL_INTERMEDIATE_KEYWRAP_ENC"); + s datatype IntermediateUnwrapOutput = IntermediateUnwrapOutput( nameonly plaintextDataKey: seq, @@ -69,7 +76,9 @@ module IntermediateKeyWrapping { UnwrapInput( wrappedMaterial := maybeIntermediateWrappedMat.value.providerWrappedIkm, encryptionContext := encryptionContext, - algorithmSuite := algorithmSuite), + algorithmSuite := algorithmSuite, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) + ), Success(unwrapRes), []) @@ -82,12 +91,14 @@ module IntermediateKeyWrapping { // Deserialize the Intermediate-Wrapped material var deserializedWrapped :- DeserializeIntermediateWrappedMaterial(wrappedMaterial, algorithmSuite); var DeserializedIntermediateWrappedMaterial(encryptedPdk, providerWrappedIkm) := deserializedWrapped; + var serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext); var unwrapOutput :- unwrap.Invoke( UnwrapInput( wrappedMaterial := providerWrappedIkm, encryptionContext := encryptionContext, - algorithmSuite := algorithmSuite + algorithmSuite := algorithmSuite, + serializedEC := serializedEC ), []); var UnwrapOutput(intermediateMaterial, unwrapInfo) := unwrapOutput; @@ -102,7 +113,7 @@ module IntermediateKeyWrapping { // Decrypt the plaintext data key with the pdkEncryptionKey var iv: seq := seq(AlgorithmSuites.GetEncryptIvLength(algorithmSuite) as nat, _ => 0); // IV is zero var tagIndex := |encryptedPdk| - AlgorithmSuites.GetEncryptTagLength(algorithmSuite) as nat; - var aad :- CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext); + var aad :- serializedEC; var decInput := Crypto.AESDecryptInput( encAlg := algorithmSuite.encrypt.AES_GCM, @@ -115,9 +126,7 @@ module IntermediateKeyWrapping { var decOutR := cryptoPrimitives.AESDecrypt(decInput); var plaintextDataKey :- decOutR.MapFailure(e => Types.AwsCryptographyPrimitives(e)); - :- Need(|plaintextDataKey| == AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) as nat, - Types.AwsCryptographicMaterialProvidersException( - message := "Unexpected AES_GCM Decrypt length")); + assert |plaintextDataKey| == AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) as nat; return Success(IntermediateUnwrapOutput( plaintextDataKey := plaintextDataKey, @@ -145,7 +154,9 @@ module IntermediateKeyWrapping { && generateAndWrap.Ensures( GenerateAndWrapInput( algorithmSuite := algorithmSuite, - encryptionContext := encryptionContext), + encryptionContext := encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) + ), Success( GenerateAndWrapOutput( plaintextMaterial := res.value.intermediateMaterial, @@ -180,7 +191,8 @@ module IntermediateKeyWrapping { var generateAndWrapOutput :- generateAndWrap.Invoke( GenerateAndWrapInput( algorithmSuite := algorithmSuite, - encryptionContext := encryptionContext + encryptionContext := encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) ), []); //= aws-encryption-sdk-specification/framework/algorithm-suites.md#intermediate-key-wrapping @@ -214,10 +226,8 @@ module IntermediateKeyWrapping { var encOutR := cryptoPrimitives.AESEncrypt(encInput); var encryptedPdk :- encOutR.MapFailure(e => Types.AwsCryptographyPrimitives(e)); - :- Need(|encryptedPdk.cipherText + encryptedPdk.authTag| == - (AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) + AlgorithmSuites.GetEncryptTagLength(algorithmSuite)) as nat, - Types.AwsCryptographicMaterialProvidersException( - message := "Unexpected AES_GCM Encrypt length")); + assert |encryptedPdk.cipherText + encryptedPdk.authTag| == + (AlgorithmSuites.GetEncryptKeyLength(algorithmSuite) + AlgorithmSuites.GetEncryptTagLength(algorithmSuite)) as nat; var serializedMaterial := encryptedPdk.cipherText + encryptedPdk.authTag + providerWrappedIkm; @@ -244,7 +254,8 @@ module IntermediateKeyWrapping { && maybeIntermediateWrappedMat.Success? && generateAndWrap.Ensures(GenerateAndWrapInput( algorithmSuite := algorithmSuite, - encryptionContext := encryptionContext + encryptionContext := encryptionContext, + serializedEC := CanonicalEncryptionContext.EncryptionContextToAAD(encryptionContext) ), Success( GenerateAndWrapOutput( plaintextMaterial := res.value.intermediateMaterial, diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy index 123762822e..143ae3c96c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/MaterialWrapping.dfy @@ -3,6 +3,7 @@ include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" include "../Materials.dfy" +include "../CanonicalEncryptionContext.dfy" // Traits and related data types to help keyring encapsulate // wrap/unwrap/generate logic for use with the helper methods @@ -16,10 +17,12 @@ module MaterialWrapping { import AtomicPrimitives import Materials import AlgorithmSuites + import CanonicalEncryptionContext datatype GenerateAndWrapInput = GenerateAndWrapInput( nameonly algorithmSuite: Types.AlgorithmSuiteInfo, - nameonly encryptionContext: Types.EncryptionContext + nameonly encryptionContext: Types.EncryptionContext, + nameonly serializedEC:Result, Types.Error> ) datatype GenerateAndWrapOutput = GenerateAndWrapOutput( @@ -31,7 +34,8 @@ module MaterialWrapping { datatype WrapInput = WrapInput( nameonly plaintextMaterial: seq, nameonly algorithmSuite: Types.AlgorithmSuiteInfo, - nameonly encryptionContext: Types.EncryptionContext + nameonly encryptionContext: Types.EncryptionContext, + nameonly serializedEC:Result, Types.Error> ) datatype WrapOutput = WrapOutput( @@ -42,7 +46,8 @@ module MaterialWrapping { datatype UnwrapInput = UnwrapInput( nameonly wrappedMaterial: seq, nameonly algorithmSuite: Types.AlgorithmSuiteInfo, - nameonly encryptionContext: Types.EncryptionContext + nameonly encryptionContext: Types.EncryptionContext, + nameonly serializedEC:Result, Types.Error> ) datatype UnwrapOutput = UnwrapOutput( @@ -57,15 +62,15 @@ module MaterialWrapping { // of creating necessary key material and performing the Keyring's method of wrapping such material. // Note that the material being generated by `GenerateAndWrapMaterial` may either be the plaintext data key // or the intermediate data key, depending on the EDK Wrapping Algorithm in use. - // We explictly seperate `WrapMaterial` and `GenerateAndWrap` as seperate Actions because: + // We explicitly separate `WrapMaterial` and `GenerateAndWrap` as separate Actions because: // 1. The Keyring may want to utilize a specific method for generating random bytes, // such as the AWS KMS Keyring via KMS::GenerateDataKey. // Keyrings that do not have such optimizations SHOULD implement this by // generating cryptographically secure bytes of the correct length and delegating to `WrapMaterial` - // 2. By seperating these Actions, we can have EdkWrapping implement the logic + // 2. By separating these Actions, we can have EdkWrapping implement the logic // to decide whether it is necessary to generate new material in the right contexts, // as opposed to requiring each Keyring to ensure they implement the - // switch on the existencing of an input pdk correctly. + // switch on the existence of an input pdk correctly. // // `UnwrapMaterial` is used during `UnwrapEdkMaterial` for the purpose of unwrapping // a set of material originally wrapped by `WrapMaterial`. @@ -75,11 +80,19 @@ module MaterialWrapping { method Invoke(input: GenerateAndWrapInput, ghost attemptsState: seq, Types.Error>>>) returns (r: Result, Types.Error>) requires Invariant() + requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(input, r, attemptsState) ensures r.Success? ==> |r.value.plaintextMaterial| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat + + predicate Requires(input: GenerateAndWrapInput) + : (outcome: bool) + { + && input.serializedEC == CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext) + } + } trait {:termination false} WrapMaterial @@ -88,10 +101,17 @@ module MaterialWrapping { method Invoke(input: WrapInput, ghost attemptsState: seq, Types.Error>>>) returns (r: Result, Types.Error>) requires Invariant() + requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(input, r, attemptsState) + + predicate Requires(input: WrapInput) + : (outcome: bool) + { + && input.serializedEC == CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext) + } } trait {:termination false} UnwrapMaterial @@ -100,10 +120,20 @@ module MaterialWrapping { method Invoke(input: UnwrapInput, ghost attemptsState: seq, Types.Error>>>) returns (r: Result, Types.Error>) requires Invariant() + requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(input, r, attemptsState) ensures r.Success? ==> |r.value.unwrappedMaterial| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat + + predicate Requires(input: UnwrapInput) + : (outcome: bool) + { + && input.serializedEC == CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext) + } + } + + } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy index 699a994fa7..c98143c99d 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy @@ -4,7 +4,7 @@ include "../Model/AwsCryptographyMaterialProvidersTypes.dfy" include "Materials.dfy" -module Keyring { +module {:options "/functionSyntax:4" } Keyring { import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes import Materials @@ -12,14 +12,9 @@ module Keyring { trait {:termination false} VerifiableInterface extends Types.IKeyring { - method OnEncrypt'(input: Types.OnEncryptInput) - returns (output: Result) - requires ValidState() - modifies Modifies - {History} - decreases Modifies - {History} - ensures ValidState() - ensures OnEncryptEnsuresPublicly(input, output) - ensures unchanged(History) + + ghost predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) + : (outcome: bool) //= aws-encryption-sdk-specification/framework/keyring-interface.md#onencrypt //= type=implication //# It MUST modify it with at least one of the following behaviors: @@ -27,52 +22,49 @@ module Keyring { //# - [Encrypt data key](#encrypt-data-key) //# If this keyring attempted any of the above behaviors, and successfully completed those behaviors, //# it MUST output the modified [encryption materials](structures.md#encryption-materials). - ensures output.Success? - ==> - // See the details of ValidEncryptionMaterialsTransition for the following + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + // See the details of ValidEncryptionMaterialsTransition for the following - //= aws-encryption-sdk-specification/framework/keyring-interface.md#generate-data-key - //= type=implication - //# If the [encryption materials](structures.md#encryption-materials) do not contain a plaintext data key, - //# OnEncrypt MUST generate a data key. - //# If the encryption materials contain a plaintext data key, OnEncrypt MUST NOT generate a data key. - //# - //# Generate Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): - //# - //# - [plaintext data key](structures.md#plaintext-data-key) - //# - //# To perform this behavior, the keyring generates a [plaintext data key](structures.md#plaintext-data-key) - //# and sets the resulting plaintext data key on the [encryption materials](structures.md#encryption-materials). - //# - //# The length of the output plaintext data key MUST be equal to the KDF input length of the [algorithm suite](algorithm-suites.md) - //# specified in the [encryption materials](structures.md#encryption-materials). - //# The value of the plaintext data key MUST consist of cryptographically secure (pseudo-)random bits. - //# - //# Note: If the keyring successfully performs this behavior, this means that the keyring MAY then - //# perform the [Encrypt Data Key](#encrypt-data-key) behavior. + //= aws-encryption-sdk-specification/framework/keyring-interface.md#generate-data-key + //= type=implication + //# If the [encryption materials](structures.md#encryption-materials) do not contain a plaintext data key, + //# OnEncrypt MUST generate a data key. + //# If the encryption materials contain a plaintext data key, OnEncrypt MUST NOT generate a data key. + //# + //# Generate Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): + //# + //# - [plaintext data key](structures.md#plaintext-data-key) + //# + //# To perform this behavior, the keyring generates a [plaintext data key](structures.md#plaintext-data-key) + //# and sets the resulting plaintext data key on the [encryption materials](structures.md#encryption-materials). + //# + //# The length of the output plaintext data key MUST be equal to the KDF input length of the [algorithm suite](algorithm-suites.md) + //# specified in the [encryption materials](structures.md#encryption-materials). + //# The value of the plaintext data key MUST consist of cryptographically secure (pseudo-)random bits. + //# + //# Note: If the keyring successfully performs this behavior, this means that the keyring MAY then + //# perform the [Encrypt Data Key](#encrypt-data-key) behavior. - //= aws-encryption-sdk-specification/framework/keyring-interface.md#encrypt-data-key - //= type=implication - //# If the [encryption materials](structures.md#encryption-materials) contain a plaintext data key, - //# OnEncrypt MUST encrypt a data key. - //# If the encryption materials do not contain a plaintext data key, OnEncrypt MUST NOT encrypt a data key. - //# - //# Encrypt Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): - //# - //# - [encrypted data keys](structures.md#encrypted-data-keys) - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) + //= aws-encryption-sdk-specification/framework/keyring-interface.md#encrypt-data-key + //= type=implication + //# If the [encryption materials](structures.md#encryption-materials) contain a plaintext data key, + //# OnEncrypt MUST encrypt a data key. + //# If the encryption materials do not contain a plaintext data key, OnEncrypt MUST NOT encrypt a data key. + //# + //# Encrypt Data Key MUST modify the following fields in the [encryption materials](structures.md#encryption-materials): + //# + //# - [encrypted data keys](structures.md#encrypted-data-keys) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) - method OnDecrypt'(input: Types.OnDecryptInput) - returns (output: Result) - requires ValidState() - modifies Modifies - {History} - decreases Modifies - {History} - ensures ValidState() - ensures OnDecryptEnsuresPublicly(input, output) - ensures unchanged(History) + ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) //= aws-encryption-sdk-specification/framework/keyring-interface.md#ondecrypt //= type=implication //# It MUST modify it with the following behavior: @@ -84,29 +76,31 @@ module Keyring { //# and MUST NOT modify the [decryption materials](structures.md#decryption-materials). //# //# If this keyring attempted the above behavior, and succeeded, it MUST output the modified [decryption materials](structures.md#decryption-materials). - ensures output.Success? - ==> - // See the details of DecryptionMaterialsTransitionIsValid for the following + ensures + outcome ==> + output.Success? + ==> + // See the details of DecryptionMaterialsTransitionIsValid for the following - //= aws-encryption-sdk-specification/framework/keyring-interface.md#decrypt-data-key - //= type=implication - //# If the encryption materials do contain a plaintext data key, OnDecrypt MUST NOT decrypt a data key. - //# If the [decryption materials](structures.md#decryption-materials) do not include a plaintext data key, - //# OnDecrypt MUST decrypt a data key. - //# - //# The decrypt data key MUST modify the following fields in the [decryption materials](structures.md#decryption-materials): - //# - //# - [Plaintext data key](structures.md#plaintext-data-key-1) - //# - //# To perform this behavior, the keyring attempts to retrieve a plaintext data key from the input list - //# of [encrypted data keys](structures.md#encrypted-data-key). - //# - //# If the keyring is able to succesfully get at least one plaintext data key from any [encrypted data key](structures.md#encrypted-data-key) - //# and the [decryption materials](structures.md#decryption-materials) still do not include a plaintext data key, - //# it SHOULD set one resulting plaintext data key on the [decryption materials](structures.md#decryption-materials). - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - output.value.materials - ) + //= aws-encryption-sdk-specification/framework/keyring-interface.md#decrypt-data-key + //= type=implication + //# If the encryption materials do contain a plaintext data key, OnDecrypt MUST NOT decrypt a data key. + //# If the [decryption materials](structures.md#decryption-materials) do not include a plaintext data key, + //# OnDecrypt MUST decrypt a data key. + //# + //# The decrypt data key MUST modify the following fields in the [decryption materials](structures.md#decryption-materials): + //# + //# - [Plaintext data key](structures.md#plaintext-data-key-1) + //# + //# To perform this behavior, the keyring attempts to retrieve a plaintext data key from the input list + //# of [encrypted data keys](structures.md#encrypted-data-key). + //# + //# If the keyring is able to succesfully get at least one plaintext data key from any [encrypted data key](structures.md#encrypted-data-key) + //# and the [decryption materials](structures.md#decryption-materials) still do not include a plaintext data key, + //# it SHOULD set one resulting plaintext data key on the [decryption materials](structures.md#decryption-materials). + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) } } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy index 40febeac1b..da08f81115 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy @@ -81,8 +81,24 @@ module AwsKmsDiscoveryKeyring { predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) { - true + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) } method OnEncrypt'( @@ -105,8 +121,22 @@ module AwsKmsDiscoveryKeyring { } predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) { - true + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt @@ -123,12 +153,6 @@ module AwsKmsDiscoveryKeyring { ensures ValidState() ensures OnDecryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - res.value.materials - ) //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt //= type=implication @@ -506,6 +530,10 @@ module AwsKmsDiscoveryKeyring { && Seq.Last(client.History.Decrypt).output.value.KeyId == Some(keyArn) } + predicate Requires(helper: AwsKmsEdkHelper){ + true + } + method Invoke( helper: AwsKmsEdkHelper, ghost attemptsState: seq>> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy index 131cba0d64..d86977de99 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy @@ -125,7 +125,28 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { Modifies := Modifies + client.Modifies + cryptoPrimitives.Modifies; } - ghost predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} + ghost predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-ecdh-keyring.md#onencrypt //= type=implication @@ -138,12 +159,7 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - res.value.materials - ) + ensures StringifyEncryptionContext(input.materials.encryptionContext).Failure? ==> res.Failure? @@ -276,7 +292,24 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { } } - ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -497,20 +530,23 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) } + + ghost predicate Requires(edk: Types.EncryptedDataKey){ + && UTF8.ValidUTF8Seq(edk.keyProviderId) + } + method {:vcs_split_on_every_assert} Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> ) returns (res: Result) requires Invariant() + requires Requires(edk) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(edk, res, attemptsState) { - :- Need ( - UTF8.ValidUTF8Seq(edk.keyProviderId), - Types.AwsCryptographicMaterialProvidersException(message := "Received invalid EDK provider id for AWS KMS ECDH Keyring") - ); + assert UTF8.ValidUTF8Seq(edk.keyProviderId); var suite := materials.algorithmSuite; var keyProviderId := edk.keyProviderId; @@ -649,6 +685,7 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { ==> (edk.keyProviderId == KMS_ECDH_PROVIDER_ID || edk.keyProviderId == RAW_ECDH_PROVIDER_ID) + && UTF8.ValidUTF8Seq(edk.keyProviderId) ) } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy index 509dc57706..6c37f2c2e4 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsHierarchicalKeyring.dfy @@ -207,7 +207,28 @@ module AwsKmsHierarchicalKeyring { } } - predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-hierarchical-keyring.md#onencrypt //= type=implication @@ -221,12 +242,6 @@ module AwsKmsHierarchicalKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - res.value.materials - ) { var materials := input.materials; var suite := materials.algorithmSuite; @@ -309,7 +324,24 @@ module AwsKmsHierarchicalKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } method OnDecrypt'(input: Types.OnDecryptInput) returns (res: Result) requires ValidState() @@ -319,11 +351,6 @@ module AwsKmsHierarchicalKeyring { ensures OnDecryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - res.value.materials) { var materials := input.materials; var suite := input.materials.algorithmSuite; @@ -509,11 +536,7 @@ module AwsKmsHierarchicalKeyring { return Success(branchKeyMaterials); } else { - :- Need( - && getCacheOutput.value.materials.BranchKey? - && getCacheOutput.value.materials == Types.Materials.BranchKey(getCacheOutput.value.materials.BranchKey), - E("Invalid Material Type.") - ); + :- Need(getCacheOutput.value.materials.BranchKey?, E("Invalid Material Type.")); return Success(getCacheOutput.value.materials.BranchKey); } } @@ -597,7 +620,9 @@ module AwsKmsHierarchicalKeyring { && res.Success? && res.value ==> - edk.keyProviderId == PROVIDER_ID_HIERARCHY) + && edk.keyProviderId == PROVIDER_ID_HIERARCHY + && UTF8.ValidUTF8Seq(edk.keyProviderInfo) + ) } method Invoke(edk: Types.EncryptedDataKey) @@ -613,16 +638,14 @@ module AwsKmsHierarchicalKeyring { return Success(false); } - if !UTF8.ValidUTF8Seq(providerInfo) { - // The Keyring produces UTF8 keyProviderInfo. - // If an `aws-kms-hierarchy` encrypted data key's keyProviderInfo is not UTF8 - // this is an error, not simply an EDK to filter out. - return Failure(E("Invalid encoding, provider info is not UTF8.")); - } + // We filter out values that do not match, + // Therefore we know that this provider ID is UTF8 encoded + assert UTF8.ValidUTF8Seq(PROVIDER_ID_HIERARCHY); + assert providerId == PROVIDER_ID_HIERARCHY; //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-hierarchical-keyring.md#ondecrypt //# -- The deserialized key provider info MUST be UTF8 Decoded - var branchKeyId :- UTF8.Decode(providerInfo).MapFailure(WrapStringToError); + var branchKeyId :- UTF8.Decode(providerInfo).MapFailure(e => E("Invalid encoding, provider info is not UTF8.")); //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-hierarchical-keyring.md#ondecrypt //# MUST match this keyring's configured `Branch Key Identifier`. @@ -702,20 +725,23 @@ module AwsKmsHierarchicalKeyring { && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) } + + predicate Requires(edk: Types.EncryptedDataKey){ + && UTF8.ValidUTF8Seq(edk.keyProviderInfo) + } method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> ) returns (res: Result) requires Invariant() + requires Requires(edk) modifies Modifies decreases Modifies ensures Invariant() ensures Ensures(edk, res, attemptsState) { - :- Need ( - UTF8.ValidUTF8Seq(edk.keyProviderInfo), - Types.AwsCryptographicMaterialProvidersException(message := "Received invalid EDK provider info for Hierarchical Keyring") - ); + + assert UTF8.ValidUTF8Seq(edk.keyProviderId); var suite := materials.algorithmSuite; var keyProviderId := edk.keyProviderId; @@ -806,7 +832,7 @@ module AwsKmsHierarchicalKeyring { UTF8.IsASCIIString(branchKeyVersion), E("Unable to represent as an ASCII string.") ); - var versionBytes := UTF8.EncodeAscii(branchKeyVersion); + var versionBytes :- UTF8.Encode(branchKeyVersion).MapFailure(e => Types.AwsCryptographicMaterialProvidersException(message := e)); // Create the suffix var suffix : seq := logicalKeyStoreNameBytes + NULL_BYTE + branchKeyIdUtf8 + NULL_BYTE + versionBytes; @@ -820,11 +846,7 @@ module AwsKmsHierarchicalKeyring { var maybeCacheDigest := Digest.Digest(identifierDigestInput); var cacheDigest :- maybeCacheDigest.MapFailure(e => Types.AwsCryptographyPrimitives(e)); - :- Need( - |cacheDigest| == Digest.Length(hashAlgorithm), - Types.AwsCryptographicMaterialProvidersException( - message := "Digest generated a message not equal to the expected length.") - ); + assert |cacheDigest| == Digest.Length(hashAlgorithm); return Success(cacheDigest); } @@ -898,11 +920,7 @@ module AwsKmsHierarchicalKeyring { return Success(branchKeyMaterials); } else { - :- Need( - && getCacheOutput.value.materials.BranchKey? - && getCacheOutput.value.materials == Types.Materials.BranchKey(getCacheOutput.value.materials.BranchKey), - E("Invalid Material Type.") - ); + :- Need(getCacheOutput.value.materials.BranchKey?, E("Invalid Material Type.")); return Success(getCacheOutput.value.materials.BranchKey); } } @@ -990,6 +1008,7 @@ module AwsKmsHierarchicalKeyring { ghost attemptsState: seq, Types.Error>>> ) returns (res: Result, Types.Error>) requires Invariant() + requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() @@ -1015,7 +1034,7 @@ module AwsKmsHierarchicalKeyring { var wrappedKey := wrappedMaterial[EDK_CIPHERTEXT_VERSION_INDEX.. EDK_CIPHERTEXT_VERSION_INDEX + KeyLength]; var authTag := wrappedMaterial[EDK_CIPHERTEXT_VERSION_INDEX + KeyLength..]; - var serializedEC :- CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext); + var serializedEC :- input.serializedEC; var wrappingAad := WrappingAad(branchKeyIdUtf8, branchKeyVersionAsBytes, serializedEC); var derivedBranchKey :- DeriveEncryptionKeyFromBranchKey( branchKey, @@ -1036,10 +1055,7 @@ module AwsKmsHierarchicalKeyring { ); var unwrappedPdk :- maybeUnwrappedPdk.MapFailure(e => Types.AwsCryptographyPrimitives(AwsCryptographyPrimitives := e)); - :- Need( - |unwrappedPdk| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat, - E("Invalid Key Length") - ); + assert |unwrappedPdk| == AlgorithmSuites.GetEncryptKeyLength(input.algorithmSuite) as nat; var output := MaterialWrapping.UnwrapOutput( unwrappedMaterial := unwrappedPdk, @@ -1105,6 +1121,7 @@ module AwsKmsHierarchicalKeyring { ghost attemptsState: seq, Types.Error>>> ) returns (res: Result, Types.Error>) requires Invariant() + requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() @@ -1127,7 +1144,8 @@ module AwsKmsHierarchicalKeyring { MaterialWrapping.WrapInput( plaintextMaterial := pdk, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext + encryptionContext := input.encryptionContext, + serializedEC := input.serializedEC ), []); var output := MaterialWrapping.GenerateAndWrapOutput( @@ -1209,6 +1227,7 @@ module AwsKmsHierarchicalKeyring { ghost attemptsState: seq, Types.Error>>> ) returns (res: Result, Types.Error>) requires Invariant() + requires Requires(input) modifies Modifies decreases Modifies ensures Invariant() @@ -1240,7 +1259,7 @@ module AwsKmsHierarchicalKeyring { // 1. [version](../structures.md#branch-key-version) as Bytes // 1. [encryption context](structures.md#encryption-context-1) from the input // [encryption materials](../structures.md#encryption-materials) according to the [encryption context serialization specification](../structures.md#serialization). - var serializedEC :- CanonicalEncryptionContext.EncryptionContextToAAD(input.encryptionContext); + var serializedEC :- input.serializedEC; var wrappingAad := WrappingAad(branchKeyIdUtf8, branchKeyVersionAsBytes, serializedEC); var derivedBranchKey :- DeriveEncryptionKeyFromBranchKey( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy index 6de9865f24..775c1e97fd 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy @@ -100,7 +100,28 @@ module AwsKmsKeyring { Modifies := {History} + client.Modifies; } - predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt //= type=implication @@ -114,12 +135,6 @@ module AwsKmsKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - res.value.materials - ) ensures StringifyEncryptionContext(input.materials.encryptionContext).Failure? ==> @@ -382,7 +397,24 @@ module AwsKmsKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -399,12 +431,6 @@ module AwsKmsKeyring { ensures ValidState() ensures OnDecryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.DecryptionMaterialsTransitionIsValid( - input.materials, - res.value.materials - ) //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -429,68 +455,69 @@ module AwsKmsKeyring { && AlgorithmSuites.GetEncryptKeyLength(input.materials.algorithmSuite) as nat == |res.value.materials.plaintextDataKey.value| && var LastDecrypt := Last(client.History.Decrypt); && LastDecrypt.output.Success? - && exists edk - // , returnedEncryptionAlgorithm - | edk in input.encryptedDataKeys - :: - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - Its provider ID MUST exactly match the value “aws-kms”. - && var maybeWrappedMaterial := - EdkWrapping.GetProviderWrappedMaterial(edk.ciphertext, input.materials.algorithmSuite); - && maybeWrappedMaterial.Success? - && edk.keyProviderId == PROVIDER_ID - && KMS.IsValid_CiphertextType(maybeWrappedMaterial.value) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# When calling [AWS KMS Decrypt] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), - //# the keyring MUST call with a request constructed - //# as follows: - && KMS.DecryptRequest( - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - `KeyId` MUST be the configured AWS KMS key identifier. - KeyId := Some(awsKmsKey), + && ( + exists edk + // , returnedEncryptionAlgorithm + | edk in input.encryptedDataKeys + :: + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - Its provider ID MUST exactly match the value “aws-kms”. + && var maybeWrappedMaterial := + EdkWrapping.GetProviderWrappedMaterial(edk.ciphertext, input.materials.algorithmSuite); + && maybeWrappedMaterial.Success? + && edk.keyProviderId == PROVIDER_ID + && KMS.IsValid_CiphertextType(maybeWrappedMaterial.value) //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication - //# - `CiphertextBlob` MUST be the [encrypted data key ciphertext] - //# (../structures.md#ciphertext). - CiphertextBlob := maybeWrappedMaterial.value, + //# When calling [AWS KMS Decrypt] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), + //# the keyring MUST call with a request constructed + //# as follows: + && KMS.DecryptRequest( + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - `KeyId` MUST be the configured AWS KMS key identifier. + KeyId := Some(awsKmsKey), + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - `CiphertextBlob` MUST be the [encrypted data key ciphertext] + //# (../structures.md#ciphertext). + CiphertextBlob := maybeWrappedMaterial.value, + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - `EncryptionContext` MUST be the [encryption context] + //# (../structures.md#encryption-context) included in the input + //# [decryption materials](../structures.md#decryption-materials). + EncryptionContext := Some(maybeStringifiedEncCtx.value), + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - `GrantTokens` MUST be this keyring's [grant tokens] + //# (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token). + GrantTokens := Some(grantTokens), + EncryptionAlgorithm := None + ) //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication - //# - `EncryptionContext` MUST be the [encryption context] - //# (../structures.md#encryption-context) included in the input - //# [decryption materials](../structures.md#decryption-materials). - EncryptionContext := Some(maybeStringifiedEncCtx.value), + //# To attempt to decrypt a particular [encrypted data key] + //# (../structures.md#encrypted-data-key), OnDecrypt MUST call [AWS KMS + //# Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) + //# with the configured AWS KMS client. + == LastDecrypt.input //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication - //# - `GrantTokens` MUST be this keyring's [grant tokens] - //# (https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#grant_token). - GrantTokens := Some(grantTokens), - EncryptionAlgorithm := None - ) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# To attempt to decrypt a particular [encrypted data key] - //# (../structures.md#encrypted-data-key), OnDecrypt MUST call [AWS KMS - //# Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) - //# with the configured AWS KMS client. - == LastDecrypt.input - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - The `KeyId` field in the response MUST equal the configured AWS - //# KMS key identifier. - && LastDecrypt.output.value.KeyId == Some(awsKmsKey) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - MUST immediately return the modified [decryption materials] - //# (../structures.md#decryption-materials). - && ( - input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? - ==> - LastDecrypt.output.value.Plaintext == res.value.materials.plaintextDataKey) - // For intermediate key wrapping, KMS::Decrypt.Plaintext is the intermediate key + //# - The `KeyId` field in the response MUST equal the configured AWS + //# KMS key identifier. + && LastDecrypt.output.value.KeyId == Some(awsKmsKey) + ) + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - MUST immediately return the modified [decryption materials] + //# (../structures.md#decryption-materials). + && ( + input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? + ==> + LastDecrypt.output.value.Plaintext == res.value.materials.plaintextDataKey) { var materials := input.materials; @@ -680,7 +707,11 @@ module AwsKmsKeyring { && Last(client.History.Decrypt).output.value.KeyId == Some(awsKmsKey) } - method Invoke( + predicate Requires(edk: Types.EncryptedDataKey){ + true + } + + method {:vcs_split_on_every_assert} Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> ) returns (res: Result) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy index 5e1aea99be..97c340139c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy @@ -84,7 +84,28 @@ module AwsKmsMrkDiscoveryKeyring { Modifies := {History} + client.Modifies; } - predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } method OnEncrypt'( input: Types.OnEncryptInput @@ -105,7 +126,24 @@ module AwsKmsMrkDiscoveryKeyring { message := "Encryption is not supported with a Discovery Keyring.")); } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt //= type=implication @@ -475,6 +513,10 @@ module AwsKmsMrkDiscoveryKeyring { == res.value.plaintextDataKey) } + predicate Requires(helper: AwsKmsEdkHelper){ + true + } + method Invoke( helper: AwsKmsEdkHelper, ghost attemptsState: seq>> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy index e837ff616c..4c67a9f391 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy @@ -88,7 +88,28 @@ module AwsKmsMrkKeyring { Modifies := {History} + client.Modifies; } - predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt //= type=implication @@ -102,12 +123,6 @@ module AwsKmsMrkKeyring { ensures ValidState() ensures unchanged(History) ensures OnEncryptEnsuresPublicly(input, output) - ensures output.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) ensures StringifyEncryptionContext(input.materials.encryptionContext).Failure? ==> @@ -388,7 +403,24 @@ module AwsKmsMrkKeyring { } } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt //= type=implication @@ -606,6 +638,10 @@ module AwsKmsMrkKeyring { ) } + predicate Requires(edk: Types.EncryptedDataKey){ + true + } + method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy index 1a8a8448c3..f72eb27a35 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsRsaKeyring.dfy @@ -109,8 +109,29 @@ module AwsKmsRsaKeyring { this.grantTokens := grantTokens; } - predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput , output: Result) - {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } + method OnEncrypt'(input: Types.OnEncryptInput) returns (res: Result) @@ -185,7 +206,24 @@ module AwsKmsRsaKeyring { return Success(Types.OnEncryptOutput(materials := returnMaterials)); } - predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } method OnDecrypt'(input: Types.OnDecryptInput) returns (res: Result) @@ -382,6 +420,10 @@ module AwsKmsRsaKeyring { && Seq.Last(client.History.Decrypt).output.value.KeyId == Some(awsKmsKey) } + predicate Requires(edk: Types.EncryptedDataKey){ + true + } + method Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> @@ -482,7 +524,8 @@ module AwsKmsRsaKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext + encryptionContext := input.encryptionContext, + serializedEC := input.serializedEC ), []); var output := MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy index 6a77bd4721..657c0cf28e 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/Constants.dfy @@ -68,16 +68,28 @@ module Constants { s // UTF-8 Encoded "aws-kms-ecdh" - const KMS_ECDH_PROVIDER_ID: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("aws-kms-ecdh") + const KMS_ECDH_PROVIDER_ID: UTF8.ValidUTF8Bytes := + var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x65, 0x63, 0x64, 0x68]; + assert s == UTF8.EncodeAscii("aws-kms-ecdh"); + s // UTF-8 Encoded "raw-ecdh" - const RAW_ECDH_PROVIDER_ID: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("raw-ecdh") + const RAW_ECDH_PROVIDER_ID : UTF8.ValidUTF8Bytes := + var s := [0x72, 0x61, 0x77, 0x2d, 0x65, 0x63, 0x64, 0x68]; + assert s == UTF8.EncodeAscii("raw-ecdh"); + s // UTF-8 Encoded "HMAC_SHA384" - const ECDH_KDF_PRF_NAME: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("HMAC_SHA384") + const ECDH_KDF_PRF_NAME : UTF8.ValidUTF8Bytes := + var s := [0x48, 0x4d, 0x41, 0x43, 0x5f, 0x53, 0x48, 0x41, 0x33, 0x38, 0x34]; + assert s == UTF8.EncodeAscii("HMAC_SHA384"); + s // UTF-8 Encoded "ecdh-key-derivation" - const ECDH_KDF_UTF8: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("ecdh-key-derivation") + const ECDH_KDF_UTF8 : UTF8.ValidUTF8Bytes := + var s := [0x65, 0x63, 0x64, 0x68, 0x2d, 0x6b, 0x65, 0x79, 0x2d, 0x64, 0x65, 0x72, 0x69, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e]; + assert s == UTF8.EncodeAscii("ecdh-key-derivation"); + s type AwsKmsEncryptedDataKey = edk: Types.EncryptedDataKey | && edk.keyProviderId == PROVIDER_ID diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy index bbab093965..d55918c50a 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy @@ -4,9 +4,19 @@ include "../Keyring.dfy" include "../Materials.dfy" include "../../Model/AwsCryptographyMaterialProvidersTypes.dfy" -include "../../../../../libraries/src/Collections/Sequences/Seq.dfy" -module MultiKeyring { +include "RawAESKeyring.dfy" +include "RawECDHKeyring.dfy" +include "RawRSAKeyring.dfy" +include "AwsKms/AwsKmsDiscoveryKeyring.dfy" +include "AwsKms/AwsKmsEcdhKeyring.dfy" +include "AwsKms/AwsKmsHierarchicalKeyring.dfy" +include "AwsKms/AwsKmsKeyring.dfy" +include "AwsKms/AwsKmsMrkDiscoveryKeyring.dfy" +include "AwsKms/AwsKmsMrkKeyring.dfy" +include "AwsKms/AwsKmsRsaKeyring.dfy" + +module {:options "-functionSyntax:4"} MultiKeyring { import opened StandardLibrary import opened Wrappers import Types = AwsCryptographyMaterialProvidersTypes @@ -15,13 +25,52 @@ module MultiKeyring { import UTF8 import Seq + // Rust traits do not have extensive runtime dependency information. + // This means that in Rust you cannot know that one trait also implements another trait. + // This is problematic because in Dafny this is trivial, + // and given how we set up our keyrings and CMMs + // it is very convenient. + // By checking `keyring: Types.IKeyring is Keyring.VerifiableInterface` + // the MultiKeyring can do less work. + // Because it can prove, via Dafny that some work has already been done. + // However the above cannot be currently compiled into Rust. + // This means that to offer this we need to check a different way. + // The workaround for now is to use list of all know verified keyrings. + import RawAESKeyring + import RawECDHKeyring + import RawRSAKeyring + import AwsKmsDiscoveryKeyring + import AwsKmsEcdhKeyring + import AwsKmsHierarchicalKeyring + import AwsKmsKeyring + import AwsKmsMrkDiscoveryKeyring + import AwsKmsMrkKeyring + import AwsKmsRsaKeyring + + predicate Verified?(keyring: Types.IKeyring) + : (outcome: bool) + ensures outcome ==> keyring is Keyring.VerifiableInterface + { + || keyring is RawAESKeyring.RawAESKeyring + || keyring is RawECDHKeyring.RawEcdhKeyring + || keyring is RawRSAKeyring.RawRSAKeyring + || keyring is AwsKmsDiscoveryKeyring.AwsKmsDiscoveryKeyring + || keyring is AwsKmsEcdhKeyring.AwsKmsEcdhKeyring + || keyring is AwsKmsHierarchicalKeyring.AwsKmsHierarchicalKeyring + || keyring is AwsKmsKeyring.AwsKmsKeyring + || keyring is AwsKmsMrkDiscoveryKeyring.AwsKmsMrkDiscoveryKeyring + || keyring is AwsKmsMrkKeyring.AwsKmsMrkKeyring + || keyring is AwsKmsRsaKeyring.AwsKmsRsaKeyring + } + + class MultiKeyring extends Keyring.VerifiableInterface, Types.IKeyring { - predicate ValidState() + ghost predicate ValidState() ensures ValidState() ==> History in Modifies { && History in Modifies @@ -35,6 +84,7 @@ module MultiKeyring { && History !in k.Modifies && k.ValidState() && k.Modifies <= Modifies) + && (generatorKeyring.None? ==> 0 < |childKeyrings|) } const generatorKeyring: Option @@ -94,8 +144,28 @@ module MultiKeyring { && k.Modifies <= Modifies); } - - predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput, output: Result) {true} + ghost predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/multi-keyring.md#generator-keyring //= type=implication //# This keyring MUST implement the [Generate Data Key](keyring- @@ -174,27 +244,47 @@ module MultiKeyring { :- Need(onEncryptOutput.Success?, if onEncryptOutput.Failure? then onEncryptOutput.error else Types.AwsCryptographicMaterialProvidersException( message := "Unexpected failure. Input to Need is !Success.") ); + + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || Verified?(generatorKeyring.value) + || generatorKeyring.value is MultiKeyring + ) { //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# - If the generator keyring returns encryption materials missing a //# plaintext data key, OnEncrypt MUST fail. - :- Need(Materials.ValidEncryptionMaterialsTransition(input.materials, onEncryptOutput.value.materials), - Types.AwsCryptographicMaterialProvidersException( message := "Generator keyring returned invalid encryption materials")); + :- Need( + Materials.EncryptionMaterialsHasPlaintextDataKey(onEncryptOutput.value.materials), + Types.AwsCryptographicMaterialProvidersException( + message := "Could not retrieve materials required for encryption")); + + :- Need(Materials.ValidEncryptionMaterialsTransition(input.materials, onEncryptOutput.value.materials), + Types.AwsCryptographicMaterialProvidersException( message := "Generator keyring returned invalid encryption materials")); + } returnMaterials := onEncryptOutput.value.materials; } for i := 0 to |this.childKeyrings| + invariant 0 == i && this.generatorKeyring.None? ==> returnMaterials == input.materials + invariant 0 < i || this.generatorKeyring.Some? ==> + && Materials.ValidEncryptionMaterialsTransition(input.materials, returnMaterials) + && Materials.EncryptionMaterialsHasPlaintextDataKey(returnMaterials) invariant returnMaterials.plaintextDataKey.Some? invariant unchanged(History) invariant i < |this.childKeyrings| ==> this.childKeyrings[i].Modifies <= Modifies { var onEncryptInput := Types.OnEncryptInput(materials := returnMaterials); + var child: Types.IKeyring := this.childKeyrings[i]; //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# Next, for each [keyring](keyring-interface.md) in this keyring's list //# of [child keyrings](#child-keyrings), the keyring MUST call [OnEncrypt] //# (keyring-interface.md#onencrypt). - var onEncryptOutput := this.childKeyrings[i].OnEncrypt(onEncryptInput); + var onEncryptOutput := child.OnEncrypt(onEncryptInput); //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# If the child keyring's [OnEncrypt](keyring- @@ -202,20 +292,32 @@ module MultiKeyring { :- Need(onEncryptOutput.Success?, Types.AwsCryptographicMaterialProvidersException( message := "Child keyring failed to encrypt plaintext data key")); + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || Verified?(child) + || child is MultiKeyring + ) { // We have to explicitly check for this because our child and generator keyrings are of type // IKeyring, rather than VerifiableKeyring. // If we knew we would always have VerifiableKeyrings, we would get this for free. // However, we want to support customer implementations of keyrings which may or may // not perform valid transitions. - :- Need(Materials.ValidEncryptionMaterialsTransition(returnMaterials, onEncryptOutput.value.materials), - Types.AwsCryptographicMaterialProvidersException( message := "Child keyring performed invalid transition on encryption materials")); + + :- Need( + Materials.EncryptionMaterialsHasPlaintextDataKey(onEncryptOutput.value.materials), + Types.AwsCryptographicMaterialProvidersException( + message := "Could not retrieve materials required for encryption")); + + :- Need(Materials.ValidEncryptionMaterialsTransition(returnMaterials, onEncryptOutput.value.materials), + Types.AwsCryptographicMaterialProvidersException( message := "Child keyring performed invalid transition on encryption materials")); + } returnMaterials := onEncryptOutput.value.materials; } - :- Need(Materials.ValidEncryptionMaterialsTransition(input.materials, returnMaterials), - Types.AwsCryptographicMaterialProvidersException( message := "A child or generator keyring modified the encryption materials in illegal ways.")); - //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt //# If all previous [OnEncrypt](keyring-interface.md#onencrypt) calls //# succeeded, this keyring MUST return the [encryption materials] @@ -224,7 +326,24 @@ module MultiKeyring { return Success(Types.OnEncryptOutput(materials := returnMaterials)); } - predicate OnDecryptEnsuresPublicly(input: Types.OnDecryptInput, output: Result) {true} + ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } /* * OnDecrypt */ @@ -346,10 +465,19 @@ module MultiKeyring { { var output :- keyring.OnDecrypt(input); - :- Need( - Materials.DecryptionMaterialsTransitionIsValid(input.materials, output.materials), - Types.AwsCryptographicMaterialProvidersException( message := "Keyring performed invalid material transition") - ); + // For Dafny these are trivial statements + // because they implement a trait that ensures this. + // However not all CMM/keyrings are Dafny CMM/keyrings. + // Customers can create custom CMM/keyrings. + if !( + || Verified?(keyring) + || keyring is MultiKeyring + ) { + :- Need( + Materials.DecryptionMaterialsTransitionIsValid(input.materials, output.materials), + Types.AwsCryptographicMaterialProvidersException( message := "Keyring performed invalid material transition") + ); + } return Success(output); } @@ -358,7 +486,7 @@ module MultiKeyring { // for Dafny. // Makes the code in the constructor // a little more readable. - function GatherModifies( + ghost function GatherModifies( generatorKeyring: Option, childKeyrings: seq ): diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy index 477d4942c5..f4d18e749c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy @@ -111,7 +111,28 @@ module RawAESKeyring { } - predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput, output: Result) {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#onencrypt //= type=implication @@ -125,12 +146,6 @@ module RawAESKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, output) ensures unchanged(History) - ensures output.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) // EDK created using expected AAD ensures output.Success? @@ -231,7 +246,24 @@ module RawAESKeyring { } } - predicate OnDecryptEnsuresPublicly(input: Types.OnDecryptInput, output: Result){true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#ondecrypt //= type=implication @@ -472,7 +504,8 @@ module RawAESKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext + encryptionContext := input.encryptionContext, + serializedEC := input.serializedEC ), Success(MaterialWrapping.WrapOutput( wrappedMaterial := res.value.wrappedMaterial, @@ -509,7 +542,8 @@ module RawAESKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext + encryptionContext := input.encryptionContext, + serializedEC := input.serializedEC ), []); res := Success(MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy index 22ef8fa4d4..2ddc8bcc01 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawECDHKeyring.dfy @@ -133,7 +133,28 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { } - ghost predicate OnEncryptEnsuresPublicly ( input: Types.OnEncryptInput , output: Result ) {true} + ghost predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#onencrypt //= type=implication @@ -146,12 +167,6 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, res) ensures unchanged(History) - ensures res.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - res.value.materials - ) //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#onencrypt //= type=implication //# OnEncrypt MUST fail if configured with a @@ -288,7 +303,24 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { } } - ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) {true} + ghost predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } method {:vcs_split_on_every_assert} OnDecrypt'(input: Types.OnDecryptInput) returns (res: Result) @@ -413,6 +445,7 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { ==> (edk.keyProviderId == KMS_ECDH_PROVIDER_ID || edk.keyProviderId == RAW_ECDH_PROVIDER_ID) + && UTF8.ValidUTF8Seq(edk.keyProviderId) ) } @@ -540,6 +573,11 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) } + + ghost predicate Requires(edk: Types.EncryptedDataKey){ + && UTF8.ValidUTF8Seq(edk.keyProviderId) + } + method {:vcs_split_on_every_assert} Invoke( edk: Types.EncryptedDataKey, ghost attemptsState: seq>> @@ -550,10 +588,7 @@ module {:options "/functionSyntax:4" } RawECDHKeyring { ensures Invariant() ensures Ensures(edk, res, attemptsState) { - :- Need ( - UTF8.ValidUTF8Seq(edk.keyProviderId), - Types.AwsCryptographicMaterialProvidersException(message := "Received invalid EDK provider id for AWS KMS ECDH Keyring") - ); + assert UTF8.ValidUTF8Seq(edk.keyProviderId); var suite := materials.algorithmSuite; var keyProviderId := edk.keyProviderId; diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy index c20a98b8f9..79972d6558 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawRSAKeyring.dfy @@ -122,7 +122,28 @@ module RawRSAKeyring { Modifies := { History } + cryptoPrimitives.Modifies; } - predicate OnEncryptEnsuresPublicly(input: Types.OnEncryptInput, output: Result) {true} + predicate OnEncryptEnsuresPublicly ( + input: Types.OnEncryptInput , + output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) + && Materials.ValidEncryptionMaterialsTransition( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/raw-rsa-keyring.md#onencrypt //= type=implication @@ -136,13 +157,6 @@ module RawRSAKeyring { ensures ValidState() ensures OnEncryptEnsuresPublicly(input, output) ensures unchanged(History) - ensures - output.Success? - ==> - && Materials.ValidEncryptionMaterialsTransition( - input.materials, - output.value.materials - ) //= aws-encryption-sdk-specification/framework/raw-rsa-keyring.md#onencrypt //= type=implication @@ -263,7 +277,24 @@ module RawRSAKeyring { } } - predicate OnDecryptEnsuresPublicly(input: Types.OnDecryptInput, output: Result){true} + predicate OnDecryptEnsuresPublicly ( input: Types.OnDecryptInput , output: Result ) + : (outcome: bool) + ensures + outcome ==> + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + { + output.Success? + ==> + && Materials.DecryptionMaterialsTransitionIsValid( + input.materials, + output.value.materials + ) + } //= aws-encryption-sdk-specification/framework/raw-rsa-keyring.md#ondecrypt //= type=implication @@ -489,7 +520,8 @@ module RawRSAKeyring { MaterialWrapping.WrapInput( plaintextMaterial := plaintextMaterial, algorithmSuite := input.algorithmSuite, - encryptionContext := input.encryptionContext + encryptionContext := input.encryptionContext, + serializedEC := input.serializedEC ), []); var output := MaterialWrapping.GenerateAndWrapOutput( diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy index adb8e20e3b..850accc2fc 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/LocalCMC.dfy @@ -47,11 +47,19 @@ module {:options "/functionSyntax:4"} TestLocalCMC { ) } + const abc : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x62, 0x63]; + assert s == UTF8.EncodeAscii("abc"); + s + + const cde : UTF8.ValidUTF8Bytes := + var s := [0x63, 0x64, 0x65]; + assert s == UTF8.EncodeAscii("cde"); + s + method {:test} LocalCMCBasics() { var st := new LocalCMC(100); - var abc := UTF8.EncodeAscii("abc"); - var cde := UTF8.EncodeAscii("cde"); var res := st.GetCacheEntryWithTime(MakeGet(abc), 10000); expect res.Failure?; expect res.error.EntryDoesNotExist?; diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy index 29d26076a1..9a3a845779 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/CMCs/StormTracker.dfy @@ -59,11 +59,40 @@ module {:options "/functionSyntax:4"} TestStormTracker { ) } + const abc : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x62, 0x63]; + assert s == UTF8.EncodeAscii("abc"); + s + + const cde : UTF8.ValidUTF8Bytes := + var s := [0x63, 0x64, 0x65]; + assert s == UTF8.EncodeAscii("cde"); + s + + const one : UTF8.ValidUTF8Bytes := + var s := [0x6f, 0x6e, 0x65]; + assert s == UTF8.EncodeAscii("one"); + s + + const two : UTF8.ValidUTF8Bytes := + var s := [0x74, 0x77, 0x6f]; + assert s == UTF8.EncodeAscii("two"); + s + + const three : UTF8.ValidUTF8Bytes := + var s := [0x74, 0x68, 0x72, 0x65, 0x65]; + assert s == UTF8.EncodeAscii("three"); + s + + const four : UTF8.ValidUTF8Bytes := + var s := [0x66, 0x6f, 0x75, 0x72]; + assert s == UTF8.EncodeAscii("four"); + s + + method {:test} StormTrackerBasics() { var st := new StormTracker(DefaultStorm()); - var abc := UTF8.EncodeAscii("abc"); - var cde := UTF8.EncodeAscii("cde"); var res :- expect st.GetFromCacheWithTime(MakeGet(abc), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(abc), 10000); @@ -92,12 +121,6 @@ module {:options "/functionSyntax:4"} TestStormTracker { method {:test} StormTrackerFanOut() { var st := new StormTracker(DefaultStorm().(fanOut := 3)); - - var one := UTF8.EncodeAscii("one"); - var two := UTF8.EncodeAscii("two"); - var three := UTF8.EncodeAscii("three"); - var four := UTF8.EncodeAscii("four"); - var res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(two), 10000); @@ -111,12 +134,6 @@ module {:options "/functionSyntax:4"} TestStormTracker { method {:test} StormTrackerPruneTTL() { var st := new StormTracker(DefaultStorm().(graceInterval := 3, fanOut := 3, inFlightTTL := 5)); - - var one := UTF8.EncodeAscii("one"); - var two := UTF8.EncodeAscii("two"); - var three := UTF8.EncodeAscii("three"); - var four := UTF8.EncodeAscii("four"); - var res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(two), 10000); @@ -139,9 +156,6 @@ module {:options "/functionSyntax:4"} TestStormTracker { method {:test} StormTrackerGraceInterval() { var st := new StormTracker(DefaultStorm().(graceInterval := 3)); - - var one := UTF8.EncodeAscii("one"); - var res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); expect res.EmptyFetch?; res :- expect st.GetFromCacheWithTime(MakeGet(one), 10000); @@ -159,8 +173,6 @@ module {:options "/functionSyntax:4"} TestStormTracker { // The cache is full, we wait for the graceInterval // regardless of the inFlightTTL - var one := UTF8.EncodeAscii("one"); - var st := new StormTracker(DefaultStorm().(graceInterval := 2, inFlightTTL := 3, gracePeriod := 5)); // This entry will be in the cache until ms: 11000 var _ :- expect st.PutCacheEntry(MakePut(one, 10000)); @@ -199,8 +211,6 @@ module {:options "/functionSyntax:4"} TestStormTracker { var insideGracePeriod := expiryTime - config.gracePeriod as Types.PositiveLong + 1; var st := new StormTracker(config); - var one := UTF8.EncodeAscii("one"); - var res2 :- expect st.PutCacheEntry(MakePut(one, expiryTime)); var res :- expect st.GetFromCacheWithTime(MakeGet(one), beforeGracePeriod); @@ -216,7 +226,6 @@ module {:options "/functionSyntax:4"} TestStormTracker { // The cache is empty, we wait for the least // duration between graceInterval and inFlightTTL // for empty identifiers - var one := UTF8.EncodeAscii("one"); var st := new StormTracker(DefaultStorm().(graceInterval := 2, inFlightTTL := 3)); diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy index 259bc8d425..c6170b54ff 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/Keyrings/AwsKms/AwsKmsHierarchicalKeyring/TestAwsKmsHierarchicalKeyring.dfy @@ -43,9 +43,21 @@ module TestAwsKmsHierarchicalKeyring { const BRANCH_KEY_ID := Fixtures.branchKeyId // Constants for TestBranchKeySupplier - const BRANCH_KEY := UTF8.EncodeAscii("branchKey") - const CASE_A := UTF8.EncodeAscii("caseA") - const CASE_B := UTF8.EncodeAscii("caseB") + const BRANCH_KEY : UTF8.ValidUTF8Bytes := + var s := [0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4b, 0x65, 0x79]; + assert s == UTF8.EncodeAscii("branchKey"); + s + + const CASE_A : UTF8.ValidUTF8Bytes := + var s := [0x63, 0x61, 0x73, 0x65, 0x41]; + assert s == UTF8.EncodeAscii("caseA"); + s + + const CASE_B : UTF8.ValidUTF8Bytes := + var s := [0x63, 0x61, 0x73, 0x65, 0x42]; + assert s == UTF8.EncodeAscii("caseB"); + s + const BRANCH_KEY_ID_A := BRANCH_KEY_ID const BRANCH_KEY_ID_B := Fixtures.branchKeyIdWithEC diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy index 32df108163..228dda04e9 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/test/TestErrorMessages.dfy @@ -22,19 +22,50 @@ module TestErrorMessages { expect actualErrorMessage == ExpectErrorMessage; } + const awskms : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73]; + assert s == UTF8.EncodeAscii("aws-kms"); + s + + const keyproviderInfoA : UTF8.ValidUTF8Bytes := + var s := [0x6b, 0x65, 0x79, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x41]; + assert s == UTF8.EncodeAscii("keyproviderInfoA"); + s + + const keyproviderInfoB : UTF8.ValidUTF8Bytes := + var s := [0x6b, 0x65, 0x79, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x42]; + assert s == UTF8.EncodeAscii("keyproviderInfoB"); + s + + const keyproviderInfoC : UTF8.ValidUTF8Bytes := + var s := [0x6b, 0x65, 0x79, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x43]; + assert s == UTF8.EncodeAscii("keyproviderInfoC"); + s + + const awskmsrsa : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x72, 0x73, 0x61]; + assert s == UTF8.EncodeAscii("aws-kms-rsa"); + s + + const awskmshierarchy : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79]; + assert s == UTF8.EncodeAscii("aws-kms-hierarchy"); + s + + method {:test} TestIncorrectDataKeys() { var dummyKey : Types.EncryptedDataKeyList := [Types.EncryptedDataKey( - keyProviderId := UTF8.EncodeAscii("aws-kms") , - keyProviderInfo := UTF8.EncodeAscii("keyproviderInfoA"), + keyProviderId := awskms, + keyProviderInfo := keyproviderInfoA, ciphertext := [1, 2, 3, 4, 5]), Types.EncryptedDataKey( - keyProviderId := UTF8.EncodeAscii("aws-kms-rsa") , - keyProviderInfo := UTF8.EncodeAscii("keyproviderInfoB"), + keyProviderId := awskmsrsa, + keyProviderInfo := keyproviderInfoB, ciphertext := [1, 2, 3, 4, 5]), Types.EncryptedDataKey( - keyProviderId := UTF8.EncodeAscii("aws-kms-hierarchy") , - keyProviderInfo := UTF8.EncodeAscii("keyproviderInfoC"), + keyProviderId := awskmshierarchy, + keyProviderInfo := keyproviderInfoC, ciphertext := [ 64, 92, 115, 7, 85, 121, 112, 79, 69, 12, 82, 25, 67, 34, 11, 66, 93, 45, 40, 23, 90, 61, 16, 28, 59, 114, 52, 122, diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy index bfab986cb0..8bff47668b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/test/Fixtures.dfy @@ -51,6 +51,15 @@ module Fixtures { output := Success(map i <- decodedEncryptionContext :: i.0.value := i.1.value); } + const abc : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x62, 0x63]; + assert s == UTF8.EncodeAscii("abc"); + s + + const x123 : UTF8.ValidUTF8Bytes := + var s := [0x31, 0x32, 0x33]; + assert s == UTF8.EncodeAscii("123"); + s // The following are test resources that exist in tests accounts: @@ -85,7 +94,7 @@ module Fixtures { const KmsSrkConfigEast : Types.KMSConfiguration := Types.KMSConfiguration.kmsKeyArn(MrkArnEast) const KmsSrkConfigWest : Types.KMSConfiguration := Types.KMSConfiguration.kmsKeyArn(MrkArnWest) const KmsMrkConfigAP : Types.KMSConfiguration := Types.KMSConfiguration.kmsMRKeyArn(MrkArnAP) - const KmsMrkEC : Types.EncryptionContext := map[UTF8.EncodeAscii("abc") := UTF8.EncodeAscii("123")] + const KmsMrkEC : Types.EncryptionContext := map[abc := x123] const EastBranchKey : string := "MyEastBranch2" const WestBranchKey : string := "MyWestBranch2" const publicKeyArn := "arn:aws:kms:us-west-2:658956600833:key/b3537ef1-d8dc-4780-9f5a-55776cbb2f7f" diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go index b44cc7d75b..df8ae6a77c 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go @@ -358,14 +358,14 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -414,14 +414,14 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -450,14 +450,14 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_ToDafny(input string) dafny.Sequen func Aws_cryptography_keyStore_HmacKeyMap_value_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -536,7 +536,7 @@ func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_logicalKeyStoreName_ToDafny func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_grantTokens_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -729,7 +729,7 @@ func Aws_cryptography_keyStore_KeyStoreConfig_grantTokens_ToDafny(input []string if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go index 9e4496be36..88e1ce273f 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go @@ -289,18 +289,15 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_keyStore_GetBeaconKeyInput_branchKeyIdentifier_FromDafny(input interface{}) string { @@ -345,18 +342,15 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_keyStore_BeaconKeyMaterials_hmacKeys_FromDafny(input interface{}) map[string][]byte { @@ -385,18 +379,15 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_FromDafny(input interface{}) strin } func Aws_cryptography_keyStore_HmacKeyMap_value_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_keyStore_GetBranchKeyVersionInput_branchKeyIdentifier_FromDafny(input interface{}) string { diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go index 5c6360c812..e1bf3d0a13 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go @@ -776,7 +776,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_discov func Aws_cryptography_materialProviders_DiscoveryFilter_accountIds_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_AccountIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -816,7 +816,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_grantT if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -841,7 +841,7 @@ func Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(input stri func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -877,7 +877,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_g if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -945,27 +945,27 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1004,7 +1004,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_grantTokens if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1262,7 +1262,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsKeyringInput_grantTokens_ToD if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1289,7 +1289,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_gra if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1314,7 +1314,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_reg func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1337,7 +1337,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInpu if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1368,7 +1368,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1397,7 +1397,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_kmsKeyI if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1424,7 +1424,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_grantTo if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1453,7 +1453,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_kmsKeyIds_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1467,7 +1467,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1478,14 +1478,14 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -1542,7 +1542,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1588,7 +1588,7 @@ func Aws_cryptography_materialProviders_CreateCryptographicMaterialsCacheInput_c func Aws_cryptography_materialProviders_CreateMultiKeyringInput_childKeyrings_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.IKeyring) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Keyring_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1625,14 +1625,14 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_ToDafny func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1691,14 +1691,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1711,27 +1711,27 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1744,14 +1744,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1835,34 +1835,34 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_T func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1966,14 +1966,14 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_ToDafny(input awscr func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2352,7 +2352,7 @@ func Aws_cryptography_materialProviders_EncryptionContext_value_ToDafny(input st func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2363,40 +2363,40 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2420,7 +2420,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_encryptionContext_To func Aws_cryptography_materialProviders_EncryptionMaterials_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2455,34 +2455,34 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_ToDafny(i func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2493,27 +2493,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2522,7 +2522,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2533,27 +2533,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2587,7 +2587,7 @@ func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2626,7 +2626,7 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2637,27 +2637,27 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2851,27 +2851,27 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_ToDafny(input *km func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2965,14 +2965,14 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_ToDafny(in func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3033,14 +3033,14 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_ToDafny(inp func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3088,7 +3088,7 @@ func Aws_cryptography_materialProviders_DecryptMaterialsInput_commitmentPolicy_T func Aws_cryptography_materialProviders_DecryptMaterialsInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3184,7 +3184,7 @@ func Aws_cryptography_materialProviders_GetEncryptionMaterialsInput_requiredEncr if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3210,7 +3210,7 @@ func Aws_cryptography_materialProviders_OnDecryptInput_materials_ToDafny(input a func Aws_cryptography_materialProviders_OnDecryptInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go index 38af8faf30..7bceb4391b 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go @@ -883,34 +883,28 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1395,18 +1389,15 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_kmsKeyId_FromDafny(input interface{}) string { @@ -1532,18 +1523,15 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_FromDaf } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingAlg_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AesWrappingAlg { @@ -1594,18 +1582,15 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis } func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.RawPrivateKeyToStaticPublicKeyInput { @@ -1615,34 +1600,28 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.EphemeralPrivateKeyToStaticPublicKeyInput { @@ -1650,18 +1629,15 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri } func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRawEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1720,34 +1696,28 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_F } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -1841,18 +1811,15 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_FromDafny(input int } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_messageVersion_FromDafny(input interface{}) int32 { @@ -2203,50 +2170,41 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_algorithmSuite_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteInfo { @@ -2306,34 +2264,28 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_FromDafny } func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -2349,34 +2301,28 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys_FromDafny(input interface{}) [][]byte { @@ -2395,34 +2341,28 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys } func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_algorithmSuiteId_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2517,34 +2457,28 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_ValidateCommitmentPolicyOnDecryptInput_algorithm_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2740,34 +2674,28 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_FromDafny(input i } func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_bytesUsed_FromDafny(input interface{}) *int64 { @@ -2872,18 +2800,15 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_FromDafny( } func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_PutCacheEntryInput_materials_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.Materials { @@ -2953,18 +2878,15 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_FromDafny(i } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_bytesUsed_FromDafny(input interface{}) int32 { diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go index b44cc7d75b..df8ae6a77c 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_dafny.go @@ -358,14 +358,14 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -414,14 +414,14 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_ToDafny(inpu func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -450,14 +450,14 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_ToDafny(input string) dafny.Sequen func Aws_cryptography_keyStore_HmacKeyMap_value_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -536,7 +536,7 @@ func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_logicalKeyStoreName_ToDafny func Aws_cryptography_keyStore_GetKeyStoreInfoOutput_grantTokens_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -729,7 +729,7 @@ func Aws_cryptography_keyStore_KeyStoreConfig_grantTokens_ToDafny(input []string if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_keyStore_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go index 9e4496be36..88e1ce273f 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographykeystoresmithygenerated/to_native.go @@ -289,18 +289,15 @@ func Aws_cryptography_keyStore_BranchKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BranchKeyMaterials_branchKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_keyStore_GetBeaconKeyInput_branchKeyIdentifier_FromDafny(input interface{}) string { @@ -345,18 +342,15 @@ func Aws_cryptography_keyStore_BeaconKeyMaterials_encryptionContext_FromDafny(in } func Aws_cryptography_keyStore_BeaconKeyMaterials_beaconKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_keyStore_BeaconKeyMaterials_hmacKeys_FromDafny(input interface{}) map[string][]byte { @@ -385,18 +379,15 @@ func Aws_cryptography_keyStore_HmacKeyMap_key_FromDafny(input interface{}) strin } func Aws_cryptography_keyStore_HmacKeyMap_value_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_keyStore_GetBranchKeyVersionInput_branchKeyIdentifier_FromDafny(input interface{}) string { diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go index 5c6360c812..e1bf3d0a13 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_dafny.go @@ -776,7 +776,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_discov func Aws_cryptography_materialProviders_DiscoveryFilter_accountIds_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_AccountIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -816,7 +816,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryKeyringInput_grantT if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -841,7 +841,7 @@ func Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(input stri func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -877,7 +877,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsDiscoveryMultiKeyringInput_g if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -945,27 +945,27 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1004,7 +1004,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_grantTokens if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1262,7 +1262,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsKeyringInput_grantTokens_ToD if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1289,7 +1289,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_gra if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1314,7 +1314,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryKeyringInput_reg func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInput_regions_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_RegionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1337,7 +1337,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkDiscoveryMultiKeyringInpu if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1368,7 +1368,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1397,7 +1397,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_kmsKeyI if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1424,7 +1424,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMrkMultiKeyringInput_grantTo if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1453,7 +1453,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_kmsKeyIds_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_KmsKeyIdList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1467,7 +1467,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1478,14 +1478,14 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -1542,7 +1542,7 @@ func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_grantTokens_ if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_GrantTokenList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1588,7 +1588,7 @@ func Aws_cryptography_materialProviders_CreateCryptographicMaterialsCacheInput_c func Aws_cryptography_materialProviders_CreateMultiKeyringInput_childKeyrings_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.IKeyring) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Keyring_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1625,14 +1625,14 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_ToDafny func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1691,14 +1691,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1711,27 +1711,27 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1744,14 +1744,14 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1835,34 +1835,34 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_T func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -1966,14 +1966,14 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_ToDafny(input awscr func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2352,7 +2352,7 @@ func Aws_cryptography_materialProviders_EncryptionContext_value_ToDafny(input st func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2363,40 +2363,40 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2420,7 +2420,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_encryptionContext_To func Aws_cryptography_materialProviders_EncryptionMaterials_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2455,34 +2455,34 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_ToDafny(i func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2493,27 +2493,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2522,7 +2522,7 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2533,27 +2533,27 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2587,7 +2587,7 @@ func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2626,7 +2626,7 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_encry func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -2637,27 +2637,27 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2851,27 +2851,27 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_ToDafny(input *km func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2965,14 +2965,14 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_ToDafny(in func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3033,14 +3033,14 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_ToDafny(inp func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3088,7 +3088,7 @@ func Aws_cryptography_materialProviders_DecryptMaterialsInput_commitmentPolicy_T func Aws_cryptography_materialProviders_DecryptMaterialsInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3184,7 +3184,7 @@ func Aws_cryptography_materialProviders_GetEncryptionMaterialsInput_requiredEncr if input == nil { return Wrappers.Companion_Option_.Create_None_() } - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -3210,7 +3210,7 @@ func Aws_cryptography_materialProviders_OnDecryptInput_materials_ToDafny(input a func Aws_cryptography_materialProviders_OnDecryptInput_encryptedDataKeys_ToDafny(input []awscryptographymaterialproviderssmithygeneratedtypes.EncryptedDataKey) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProviders_EncryptedDataKeyList_member_ToDafny(val) fieldValue = append(fieldValue, element) diff --git a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go index 38af8faf30..7bceb4391b 100644 --- a/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go +++ b/AwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderssmithygenerated/to_native.go @@ -883,34 +883,28 @@ func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_send } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_senderPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_KmsPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1395,18 +1389,15 @@ func Aws_cryptography_materialProviders_CreateAwsKmsMultiKeyringInput_grantToken } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateAwsKmsRsaKeyringInput_kmsKeyId_FromDafny(input interface{}) string { @@ -1532,18 +1523,15 @@ func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_keyName_FromDaf } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRawAesKeyringInput_wrappingAlg_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AesWrappingAlg { @@ -1594,18 +1582,15 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_PublicKeyDis } func Aws_cryptography_materialProviders_PublicKeyDiscoveryInput_recipientStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.RawPrivateKeyToStaticPublicKeyInput { @@ -1615,34 +1600,28 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_RawPrivateKe } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_senderStaticPrivateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_RawPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPrivateKeyToStaticPublicKey_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.EphemeralPrivateKeyToStaticPublicKeyInput { @@ -1650,18 +1629,15 @@ func Aws_cryptography_materialProviders_RawEcdhStaticConfigurations_EphemeralPri } func Aws_cryptography_materialProviders_EphemeralPrivateKeyToStaticPublicKeyInput_recipientPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRawEcdhKeyringInput_curveSpec_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1720,34 +1696,28 @@ func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_paddingScheme_F } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRawRsaKeyringInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_CreateRequiredEncryptionContextCMMInput_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -1841,18 +1811,15 @@ func Aws_cryptography_materialProviders_AlgorithmSuiteId_DBE_FromDafny(input int } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_binaryId_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_AlgorithmSuiteInfo_messageVersion_FromDafny(input interface{}) int32 { @@ -2203,50 +2170,41 @@ func Aws_cryptography_materialProviders_DecryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_DecryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_DecryptionMaterials_symmetricSigningKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_algorithmSuite_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteInfo { @@ -2306,34 +2264,28 @@ func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderId_FromDafny } func Aws_cryptography_materialProviders_EncryptedDataKey_keyProviderInfo_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptedDataKey_ciphertext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionContextKeys_FromDafny(input interface{}) []string { @@ -2349,34 +2301,28 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_requiredEncryptionCo } func Aws_cryptography_materialProviders_EncryptionMaterials_plaintextDataKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys_FromDafny(input interface{}) [][]byte { @@ -2395,34 +2341,28 @@ func Aws_cryptography_materialProviders_EncryptionMaterials_symmetricSigningKeys } func Aws_cryptography_materialProviders_SymmetricSigningKeyList_member_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_GetAlgorithmSuiteInfoInput_binaryId_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_InitializeDecryptionMaterialsInput_algorithmSuiteId_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2517,34 +2457,28 @@ func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_requi } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_InitializeEncryptionMaterialsInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_ValidateCommitmentPolicyOnDecryptInput_algorithm_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.AlgorithmSuiteId { @@ -2740,34 +2674,28 @@ func Aws_cryptography_materialProviders_GetClientOutput_client_FromDafny(input i } func Aws_cryptography_materialProviders_DeleteCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_GetCacheEntryInput_bytesUsed_FromDafny(input interface{}) *int64 { @@ -2872,18 +2800,15 @@ func Aws_cryptography_materialProviders_GetCacheEntryOutput_bytesUsed_FromDafny( } func Aws_cryptography_materialProviders_PutCacheEntryInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_PutCacheEntryInput_materials_FromDafny(input interface{}) awscryptographymaterialproviderssmithygeneratedtypes.Materials { @@ -2953,18 +2878,15 @@ func Aws_cryptography_materialProviders_PutCacheEntryInput_bytesUsed_FromDafny(i } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_identifier_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProviders_UpdateUsageMetadataInput_bytesUsed_FromDafny(input interface{}) int32 { diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs index b5f12b997f..0f5b0aba49 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_gcm.rs @@ -113,10 +113,10 @@ impl AES_GCM { msg: &::dafny_runtime::Sequence, aad: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result, Rc>> { - let iv: Vec = iv.iter().collect(); - let key: Vec = key.iter().collect(); - let msg: Vec = msg.iter().collect(); - let aad: Vec = aad.iter().collect(); + let iv = &iv.to_array(); + let key = &key.to_array(); + let msg = &msg.to_array(); + let aad = &aad.to_array(); if *self.keyLength() as usize != key.len() { let msg = format!( @@ -135,11 +135,11 @@ impl AES_GCM { return enc_result(&msg); } - match self.do_aes_encrypt(&iv, &key, &msg, &aad) { + match self.do_aes_encrypt(iv, key, msg, aad) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: Rc::new(AESEncryptOutput::AESEncryptOutput { - cipherText: x.cipher_text.iter().cloned().collect(), - authTag: x.auth_tag.iter().cloned().collect(), + cipherText: dafny_runtime::Sequence::from_array_owned(x.cipher_text), + authTag: dafny_runtime::Sequence::from_array_owned(x.auth_tag), }), }), Err(e) => { @@ -158,11 +158,11 @@ impl AES_GCM { iv: &::dafny_runtime::Sequence, aad: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let key: Vec = key.iter().collect(); - let cipher_text: Vec = cipher_text.iter().collect(); - let auth_tag: Vec = auth_tag.iter().collect(); - let iv: Vec = iv.iter().collect(); - let aad: Vec = aad.iter().collect(); + let key = &key.to_array(); + let cipher_text = &cipher_text.to_array(); + let auth_tag = &auth_tag.to_array(); + let iv = &iv.to_array(); + let aad = &aad.to_array(); if *self.keyLength() as usize != key.len() { let msg = format!( @@ -191,9 +191,9 @@ impl AES_GCM { return dec_result(&msg); } - match self.do_aes_decrypt(&key, &cipher_text, &auth_tag, &iv, &aad) { + match self.do_aes_decrypt(key, cipher_text, auth_tag, iv, aad) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: x.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(x), }), Err(e) => { let msg = format!("AES Decrypt : {}", e); @@ -208,23 +208,18 @@ mod tests { use super::*; #[test] fn test_generate() { - let iv: ::dafny_runtime::Sequence = [1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] - .iter() - .cloned() - .collect(); - let key: ::dafny_runtime::Sequence = [ + let iv: ::dafny_runtime::Sequence = dafny_runtime::Sequence::from_array_owned(vec![ + 1u8, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, + ]); + let key: ::dafny_runtime::Sequence = dafny_runtime::Sequence::from_array_owned(vec![ 2u8, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, - ] - .iter() - .cloned() - .collect(); - let msg: ::dafny_runtime::Sequence = [2u8, 4, 6, 8, 10, 12].iter().cloned().collect(); - let aad: ::dafny_runtime::Sequence = - [3u8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17] - .iter() - .cloned() - .collect(); + ]); + let msg: ::dafny_runtime::Sequence = + dafny_runtime::Sequence::from_array_owned(vec![2u8, 4, 6, 8, 10, 12]); + let aad: ::dafny_runtime::Sequence = dafny_runtime::Sequence::from_array_owned(vec![ + 3u8, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, + ]); let alg = AES_GCM::AES_GCM { keyLength: 32, diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs index 5d2800cb82..cb940bbbc3 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/aes_kdf_ctr.rs @@ -11,8 +11,8 @@ pub mod AesKdfCtr { use crate::software::amazon::cryptography::primitives::internaldafny::types::Error as DafnyError; use crate::*; use aws_lc_rs::cipher::{EncryptingKey, EncryptionContext, UnboundCipherKey, AES_256}; - use dafny_runtime::Sequence; use dafny_runtime::Rc; + use dafny_runtime::Sequence; fn error(s: &str) -> Rc { Rc::new(DafnyError::AwsCryptographicPrimitivesError { @@ -58,11 +58,11 @@ pub mod AesKdfCtr { Rc, >, > { - let nonce: Vec = nonce.iter().collect(); - let key: Vec = key.iter().collect(); - match ctr_stream(&nonce, &key, length) { + let nonce = &nonce.to_array(); + let key = &key.to_array(); + match ctr_stream(nonce, key, length) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: x.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(x), }), Err(e) => { let msg = format!("Aes Kdf Ctr : {}", e); diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs index 7781dc3223..75cefe7b8a 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/dafny_libraries.rs @@ -180,6 +180,19 @@ pub mod DafnyLibraries { let file_name = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::dafny_string_to_string(path); let path = Path::new(&file_name); + if let Some(parent) = path.parent() { + if let Err(why) = std::fs::create_dir_all(parent) { + let err_msg = format!( + "couldn't create directory {} from {}: {}", + path.display(), + curr_dir(), + why + ); + let err_msg = dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&err_msg); + return (true, err_msg); + } + } + let maybe_file = std::fs::OpenOptions::new() .append(append) .write(true) diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs index 4d1ca6975f..fda68da344 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/digest.rs @@ -17,7 +17,9 @@ impl crate::ExternDigest::_default { ) -> ::dafny_runtime::Rc< _Wrappers_Compile::Result< ::dafny_runtime::Sequence, - ::dafny_runtime::Rc, + ::dafny_runtime::Rc< + software::amazon::cryptography::primitives::internaldafny::types::Error, + >, >, > { let algorithm = match **digest_algorithm { @@ -25,10 +27,10 @@ impl crate::ExternDigest::_default { DigestAlgorithm::SHA_384 {} => &digest::SHA384, DigestAlgorithm::SHA_256 {} => &digest::SHA256, }; - let message_vec: Vec = message.iter().collect(); - let result = digest::digest(algorithm, &message_vec); + let message_vec = &message.to_array(); + let result = digest::digest(algorithm, message_vec); ::dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { - value: result.as_ref().iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(result.as_ref().to_vec()), }) } } diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs index 58cfca088a..1115423712 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdh.rs @@ -279,7 +279,7 @@ pub mod ECDH { ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { let result = get_out_of_bounds(curve_algorithm); Rc::new(_Wrappers_Compile::Result::Success { - value: result.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(result), }) } @@ -306,17 +306,17 @@ pub mod ECDH { ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { let result = get_infinity(curve_algorithm); Rc::new(_Wrappers_Compile::Result::Success { - value: result.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(result), }) } pub fn GetPublicKey( curve_algorithm: &Rc, private_key: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let private_key: Vec = private_key.pem().iter().collect(); - match get_public_key(curve_algorithm, &private_key) { + let private_key = &private_key.pem().to_array(); + match get_public_key(curve_algorithm, private_key) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: x.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(x), }), Err(e) => { let msg = format!("ECDH Get Public Key : {}", e); @@ -340,7 +340,7 @@ pub mod ECDH { } let ec_key = unsafe { EVP_PKEY_get0_EC_KEY(evp_pkey) }; - if unsafe {aws_lc_sys::EC_KEY_check_fips(ec_key)} != 1 { + if unsafe { aws_lc_sys::EC_KEY_check_fips(ec_key) } != 1 { return Err(INVALID_KEY.to_string()); } let ec_group = unsafe { EC_KEY_get0_group(ec_key) }; @@ -359,8 +359,8 @@ pub mod ECDH { curve_algorithm: &Rc, public_key: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result>> { - let public_key: Vec = public_key.iter().collect(); - match valid_public_key(curve_algorithm, &public_key) { + let public_key = &public_key.to_array(); + match valid_public_key(curve_algorithm, public_key) { Ok(_) => Rc::new(_Wrappers_Compile::Result::Success { value: true }), Err(e) => Rc::new(_Wrappers_Compile::Result::Failure { error: super::error(&e), @@ -372,10 +372,10 @@ pub mod ECDH { public_key: &::dafny_runtime::Sequence, _curve_algorithm: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let public_key: Vec = public_key.iter().collect(); - match X509_to_X962(&public_key, true, None) { + let public_key = &public_key.to_array(); + match X509_to_X962(public_key, true, None) { Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { - value: v.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(v), }), Err(e) => { let msg = format!("ECDH Compress Public Key {}", e); @@ -390,10 +390,10 @@ pub mod ECDH { public_key: &::dafny_runtime::Sequence, curve_algorithm: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let public_key: Vec = public_key.iter().collect(); - match X962_to_X509(&public_key, curve_algorithm) { + let public_key = &public_key.to_array(); + match X962_to_X509(public_key, curve_algorithm) { Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { - value: v.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(v), }), Err(e) => { let msg = format!("ECDH Decompress Public Key {}", e); @@ -407,8 +407,8 @@ pub mod ECDH { pub fn ParsePublicKey( publicKey: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let public_key: Vec = publicKey.iter().collect(); - match X509_to_X962(&public_key, false, None) { + let public_key = &publicKey.to_array(); + match X509_to_X962(public_key, false, None) { Ok(_) => Rc::new(_Wrappers_Compile::Result::Success { value: publicKey.clone(), }), @@ -451,11 +451,11 @@ pub mod ECDH { private_key: &Rc, public_key: &Rc, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let private_key: Vec = private_key.pem().iter().collect(); - let public_key: Vec = public_key.der().iter().collect(); - match agree(curve_algorithm, &private_key, &public_key) { + let private_key = &private_key.pem().to_array(); + let public_key = &public_key.der().to_array(); + match agree(curve_algorithm, private_key, public_key) { Ok(v) => Rc::new(_Wrappers_Compile::Result::Success { - value: v.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(v), }), Err(e) => { let msg = format!("ECDH Calculate Shared Secret : {}", e); @@ -500,8 +500,8 @@ pub mod ECDH { match ecdsa_key_gen(s) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: Rc::new(crate::ECDH::EccKeyPair::EccKeyPair { - publicKey: x.0.iter().cloned().collect(), - privateKey: x.1.iter().cloned().collect(), + publicKey: dafny_runtime::Sequence::from_array_owned(x.0), + privateKey: dafny_runtime::Sequence::from_array_owned(x.1), }), }), Err(e) => { diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs index 628b483c99..f7b9923333 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/ecdsa.rs @@ -134,8 +134,8 @@ pub mod Signature { match ecdsa_key_gen(alg) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: Rc::new(Signature::SignatureKeyPair::SignatureKeyPair { - verificationKey: x.0.iter().cloned().collect(), - signingKey: x.1.iter().cloned().collect(), + verificationKey: dafny_runtime::Sequence::from_array_owned(x.0), + signingKey: dafny_runtime::Sequence::from_array_owned(x.1), }), }), Err(e) => { @@ -182,11 +182,11 @@ pub mod Signature { key: &::dafny_runtime::Sequence, msg: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result<::dafny_runtime::Sequence, Rc>> { - let key: Vec = key.iter().collect(); - let msg: Vec = msg.iter().collect(); - match ecdsa_sign(alg, &key, &msg) { + let key = &key.to_array(); + let msg = &msg.to_array(); + match ecdsa_sign(alg, key, msg) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { - value: x.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(x), }), Err(e) => { let msg = format!("ECDSA Sign : {}", e); @@ -214,10 +214,10 @@ pub mod Signature { msg: &::dafny_runtime::Sequence, sig: &::dafny_runtime::Sequence, ) -> Rc<_Wrappers_Compile::Result>> { - let key: Vec = key.iter().collect(); - let msg: Vec = msg.iter().collect(); - let sig: Vec = sig.iter().collect(); - match ecdsa_verify(alg, &key, &msg, &sig) { + let key = &key.to_array(); + let msg = &msg.to_array(); + let sig = &sig.to_array(); + match ecdsa_verify(alg, key, msg, sig) { Ok(x) => Rc::new(_Wrappers_Compile::Result::Success { value: x }), Err(e) => { let msg = format!("ECDSA Verify : {}", e); @@ -248,7 +248,7 @@ pub mod Signature { }; let message: ::dafny_runtime::Sequence = - [1u8, 2, 3, 4, 5].iter().cloned().collect(); + dafny_runtime::Sequence::from_array_owned(vec![1u8, 2, 3, 4, 5]); let sig = match &*Sign(&alg, &s_key, &message) { _Wrappers_Compile::Result::Success { value } => value.clone(), diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs index 5c441ef551..fdbe43ec06 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/hmac.rs @@ -27,15 +27,17 @@ impl crate::HMAC::_default { ) -> ::dafny_runtime::Rc< _Wrappers_Compile::Result< ::dafny_runtime::Sequence, - ::dafny_runtime::Rc, + ::dafny_runtime::Rc< + software::amazon::cryptography::primitives::internaldafny::types::Error, + >, >, > { - let key_vec: Vec = input.key().iter().collect(); - let the_key = hmac::Key::new(convert_algorithm(input.digestAlgorithm()), &key_vec); - let message_vec: Vec = input.message().iter().collect(); - let result = hmac::sign(&the_key, &message_vec); + let key_vec = &input.key().to_array(); + let the_key = hmac::Key::new(convert_algorithm(input.digestAlgorithm()), key_vec); + let message_vec = &input.message().to_array(); + let result = hmac::sign(&the_key, message_vec); ::dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { - value: result.as_ref().iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(result.as_ref().to_vec()), }) } } @@ -43,8 +45,8 @@ impl crate::HMAC::_default { #[allow(non_snake_case)] pub mod HMAC { use crate::*; - use aws_lc_rs::hmac; use ::dafny_runtime::RefCell; + use aws_lc_rs::hmac; #[allow(non_camel_case_types)] pub struct _default {} @@ -64,8 +66,8 @@ pub mod HMAC { impl HMac { pub fn Init(&self, salt: &::dafny_runtime::Sequence) { - let salt: Vec = salt.iter().collect(); - self.inner.lock().unwrap().key = Some(hmac::Key::new(self.algorithm, &salt)); + let salt = &salt.to_array(); + self.inner.lock().unwrap().key = Some(hmac::Key::new(self.algorithm, salt)); let context = Some(hmac::Context::with_key( self.inner.lock().unwrap().key.as_ref().unwrap(), )); @@ -100,24 +102,25 @@ pub mod HMAC { ::dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { value: inner }) } pub fn BlockUpdate(&self, block: &::dafny_runtime::Sequence) { - let part: Vec = block.iter().collect(); + let part = &block.to_array(); self.inner - .lock().unwrap() + .lock() + .unwrap() .context .as_mut() .unwrap() - .update(&part); + .update(part); } pub fn GetResult(&self) -> ::dafny_runtime::Sequence { let is_empty = self.inner.lock().unwrap().context.is_none(); if is_empty { - return [].iter().cloned().collect(); + return dafny_runtime::Sequence::from_array_owned(vec![]); } let tag = self.inner.lock().unwrap().context.take().unwrap().sign(); // other languages allow you to call BlockUpdate after GetResult // so we re-initialize to mimic that behavior self.re_init(); - tag.as_ref().iter().cloned().collect() + dafny_runtime::Sequence::from_array_owned(tag.as_ref().to_vec()) } } } diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs deleted file mode 100644 index 217cb11008..0000000000 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/impl_add.rs +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright Amazon.com Inc. or its affiliates. All Rights Reserved. -// SPDX-License-Identifier: Apache-2.0 - -pub use crate::deps::aws_cryptography_keyStore; -pub use crate::deps::aws_cryptography_primitives; -pub use crate::deps::com_amazonaws_dynamodb; -pub use crate::deps::com_amazonaws_kms; diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs index 349d6d8fb8..ae5bf10913 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/lib.rs @@ -21,8 +21,8 @@ pub(crate) mod standard_library_conversions; pub(crate) mod standard_library_externs; pub use client::Client; -pub use crate::deps::aws_cryptography_primitives; pub use crate::deps::aws_cryptography_keyStore; +pub use crate::deps::aws_cryptography_primitives; pub use crate::deps::com_amazonaws_dynamodb; pub use crate::deps::com_amazonaws_kms; @@ -57,9 +57,9 @@ pub(crate) use crate::implementation_from_dafny::ExternDigest; pub(crate) use crate::implementation_from_dafny::ExternRandom; pub(crate) use crate::implementation_from_dafny::Signature; pub(crate) use crate::implementation_from_dafny::Time; +pub(crate) use crate::implementation_from_dafny::_LocalCMC_Compile; +pub(crate) use crate::implementation_from_dafny::_StormTracker_Compile; pub(crate) use crate::implementation_from_dafny::ECDH; pub(crate) use crate::implementation_from_dafny::HMAC; pub(crate) use crate::implementation_from_dafny::UTF8; pub(crate) use crate::implementation_from_dafny::UUID; -pub(crate) use crate::implementation_from_dafny::_StormTracker_Compile; -pub(crate) use crate::implementation_from_dafny::_LocalCMC_Compile; diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs index fbacbc0dc5..089b8471a8 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/oslang.rs @@ -8,16 +8,17 @@ #![allow(non_snake_case)] impl crate::implementation_from_dafny::OsLang::_default { - pub fn GetLanguageShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> - { - dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string("Rust") + pub fn GetLanguageShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string( + "Rust", + ) } - pub fn GetLanguageLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> - { - dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string("Rust") + pub fn GetLanguageLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { + dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string( + "Rust", + ) } - pub fn GetOsShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> - { + pub fn GetOsShort() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { let os = match std::env::consts::OS { "macos" => "MacOS", "windows" => "Windows", @@ -25,14 +26,12 @@ impl crate::implementation_from_dafny::OsLang::_default { "linux" => "Unix", "freebsd" => "Unix", "netbsd" => "Unix", - _ => "Other" + _ => "Other", }; dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(os) } - pub fn GetOsLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> - { + pub fn GetOsLong() -> ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16> { let os = format!("{} {}", std::env::consts::OS, std::env::consts::ARCH); dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string(&os) } - -} \ No newline at end of file +} diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs index 3fafbf6b8e..0aedbbae85 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/random.rs @@ -15,7 +15,9 @@ impl crate::ExternRandom::_default { ) -> ::dafny_runtime::Rc< _Wrappers_Compile::Result< ::dafny_runtime::Sequence, - ::dafny_runtime::Rc, + ::dafny_runtime::Rc< + software::amazon::cryptography::primitives::internaldafny::types::Error, + >, >, > { let mut rand_bytes: Vec = vec![0; num_bytes as usize]; @@ -23,7 +25,7 @@ impl crate::ExternRandom::_default { Ok(_) => { ::dafny_runtime::Rc::new( _Wrappers_Compile::Result::Success{value : - dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&rand_bytes, |x| *x) + dafny_runtime::Sequence::from_array_owned(rand_bytes) } ) } diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs index 5edfda2a69..72bd24ca98 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/rsa.rs @@ -71,7 +71,10 @@ pub mod RSAEncryption { length_bits: i32, ) -> (::dafny_runtime::Sequence, ::dafny_runtime::Sequence) { match generate_key_pair(length_bits) { - Ok(x) => (x.0.iter().cloned().collect(), x.1.iter().cloned().collect()), + Ok(x) => ( + dafny_runtime::Sequence::from_array_owned(x.0), + dafny_runtime::Sequence::from_array_owned(x.1), + ), Err(e) => { panic!("Unexpected error generating RSA Key Pair{}", e); } @@ -102,8 +105,8 @@ pub mod RSAEncryption { pub fn GetRSAKeyModulusLengthExtern( public_key: &::dafny_runtime::Sequence, ) -> Rc>> { - let public_key: Vec = public_key.iter().collect(); - match get_modulus(&public_key) { + let public_key = &public_key.to_array(); + match get_modulus(public_key) { Ok(v) => Rc::new(Wrappers::Result::Success { value: v }), Err(e) => Rc::new(Wrappers::Result::Failure { error: error(&e) }), } @@ -140,11 +143,11 @@ pub mod RSAEncryption { private_key: &::dafny_runtime::Sequence, cipher_text: &::dafny_runtime::Sequence, ) -> Rc, Rc>> { - let private_key: Vec = private_key.iter().collect(); - let cipher_text: Vec = cipher_text.iter().collect(); - match decrypt_extern(mode, &private_key, &cipher_text) { + let private_key = &private_key.to_array(); + let cipher_text = &cipher_text.to_array(); + match decrypt_extern(mode, private_key, cipher_text) { Ok(x) => Rc::new(Wrappers::Result::Success { - value: x.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(x), }), Err(e) => { let msg = format!("RSA Decrypt : {}", e); @@ -182,11 +185,11 @@ pub mod RSAEncryption { public_key: &::dafny_runtime::Sequence, message: &::dafny_runtime::Sequence, ) -> Rc, Rc>> { - let public_key: Vec = public_key.iter().collect(); - let message: Vec = message.iter().collect(); - match encrypt_extern(mode, &public_key, &message) { + let public_key = &public_key.to_array(); + let message = &message.to_array(); + match encrypt_extern(mode, public_key, message) { Ok(x) => Rc::new(Wrappers::Result::Success { - value: x.iter().cloned().collect(), + value: dafny_runtime::Sequence::from_array_owned(x), }), Err(e) => { let msg = format!("RSA Encrypt : {}", e); @@ -235,7 +238,7 @@ pub mod RSAEncryption { let mode = RSAPaddingMode::OAEP_SHA256 {}; let plain_text: ::dafny_runtime::Sequence = - [1u8, 2, 3, 4, 5].iter().cloned().collect(); + dafny_runtime::Sequence::from_array_owned(vec![1u8, 2, 3, 4, 5]); let cipher: ::dafny_runtime::Sequence = match &*EncryptExtern(&mode, &public_key, &plain_text) { diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs index 6c9fb380cc..6ac6a71ccc 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/sets.rs @@ -25,7 +25,7 @@ pub mod SortedSets { ) -> ::dafny_runtime::Sequence<::dafny_runtime::Sequence> { let mut vec = elems.iter().cloned().collect::>(); vec.sort_by(|a, b| Self::order(a, b, less)); - dafny_runtime::dafny_runtime_conversions::vec_to_dafny_sequence(&vec, |x| x.clone()) + dafny_runtime::Sequence::from_array_owned(vec) } pub fn SetToOrderedSequence2( diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs b/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs index 2a75c8babf..56f330dbc1 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/src/uuid.rs @@ -26,7 +26,7 @@ impl crate::UUID::_default { Ok(u) => { let b = u.as_bytes(); dafny_runtime::Rc::new(_Wrappers_Compile::Result::Success { value : - b.iter().cloned().collect() + dafny_runtime::Sequence::from_array_owned(b.to_vec()) }) } Err(e) => { @@ -47,7 +47,7 @@ impl crate::UUID::_default { ::dafny_runtime::Sequence<::dafny_runtime::DafnyCharUTF16>, >, > { - let vec: Vec = bytes.iter().collect(); + let vec = &bytes.to_array(); if vec.len() != 16 { return dafny_runtime::Rc::new(_Wrappers_Compile::Result::Failure{ error : dafny_runtime::dafny_runtime_conversions::unicode_chars_false::string_to_dafny_string("Not 16 bytes of input to FromByteArray.") diff --git a/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs b/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs index 5a0e1c96bd..99ee87dc79 100644 --- a/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs +++ b/AwsCryptographicMaterialProviders/runtimes/rust/tests/local_cmc_tests.rs @@ -28,19 +28,19 @@ impl From for BoxError { } pub mod local_cmc_tests { - use aws_mpl_rs::types::material_providers_config::MaterialProvidersConfig; use aws_mpl_rs::client as mpl_client; - use aws_mpl_rs::types::CacheType; - use aws_mpl_rs::types::DefaultCache; - use aws_mpl_rs::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef; + use aws_mpl_rs::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials; use aws_mpl_rs::operation::get_cache_entry::GetCacheEntryOutput; + use aws_mpl_rs::types::cryptographic_materials_cache::CryptographicMaterialsCacheRef; use aws_mpl_rs::types::error::Error; + use aws_mpl_rs::types::material_providers_config::MaterialProvidersConfig; + use aws_mpl_rs::types::CacheType; + use aws_mpl_rs::types::DefaultCache; use aws_mpl_rs::types::Materials; - use aws_mpl_rs::deps::aws_cryptography_keyStore::types::BeaconKeyMaterials; - use std::collections::HashMap; use chrono::Utc; - use rand::{rng, Rng}; use futures::stream::StreamExt; + use rand::{rng, Rng}; + use std::collections::HashMap; // Currently this is commented out to keep it consistent with other // runtimes but every language should eventually have a network // call delay while testing adding to the StormTrackingCache. @@ -50,11 +50,11 @@ pub mod local_cmc_tests { let mpl_config: MaterialProvidersConfig = MaterialProvidersConfig::builder().build()?; let mpl: mpl_client::Client = mpl_client::Client::from_conf(mpl_config)?; - let test: CryptographicMaterialsCacheRef = mpl.create_cryptographic_materials_cache() + let test: CryptographicMaterialsCacheRef = mpl + .create_cryptographic_materials_cache() .cache(CacheType::Default( - DefaultCache::builder() - .entry_capacity(10) - .build()?)) + DefaultCache::builder().entry_capacity(10).build()?, + )) .send() .await?; @@ -79,14 +79,14 @@ pub mod local_cmc_tests { "eighteen", "nineteen", "twenty", - "twenty one" + "twenty one", ]; let id_size: usize = identifiers.len(); let invocations = 300000; let concurrent_tasks = 10; - + futures::stream::iter(0..invocations) .map(|_i| { let identifiers = identifiers.clone(); @@ -97,27 +97,32 @@ pub mod local_cmc_tests { let random = rng().random_range(0..id_size); let beacon_key_identifier: &str = identifiers[random]; - let cache_identifier: aws_smithy_types::Blob = aws_smithy_types::Blob::new(beacon_key_identifier.as_bytes()); + let cache_identifier: aws_smithy_types::Blob = + aws_smithy_types::Blob::new(beacon_key_identifier.as_bytes()); - let cache_entry_output: Result = test.get_cache_entry() + let cache_entry_output: Result = test + .get_cache_entry() .identifier(cache_identifier.clone()) .send() .await; match cache_entry_output { Ok(_) => { - println!("Cache hit for beacon key identifier: {}", beacon_key_identifier); + println!( + "Cache hit for beacon key identifier: {}", + beacon_key_identifier + ); } - Err(Error::EntryDoesNotExist {message: _m}) => { + Err(Error::EntryDoesNotExist { message: _m }) => { let materials = Materials::BeaconKey( - BeaconKeyMaterials::builder() + BeaconKeyMaterials::builder() .beacon_key_identifier(beacon_key_identifier.to_string()) // The cacheIdentifier is used as the material // because we are not testing the cryptography here. .beacon_key(cache_identifier.clone()) .encryption_context(HashMap::new()) - .build()? - ); + .build()?, + ); // This sleep time is to mimic a KMS or DDB call // Currently this is commented out to keep it consistent with other // runtimes but every language should eventually have a network @@ -135,13 +140,15 @@ pub mod local_cmc_tests { .materials(materials) .send() .await?; - - println!("Cache miss for beacon key identifier: {}", beacon_key_identifier); + + println!( + "Cache miss for beacon key identifier: {}", + beacon_key_identifier + ); } Err(e) => { panic!("Unexpected error while accessing cache: {}", e); } - } Ok::<(), crate::BoxError>(()) @@ -150,7 +157,7 @@ pub mod local_cmc_tests { .buffer_unordered(concurrent_tasks) .collect::>() .await; - + Ok(()) } diff --git a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go index 47bf4f58c6..d0adeb556e 100644 --- a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go +++ b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go @@ -417,79 +417,79 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input int32) int32 { func Aws_cryptography_primitives_AESDecryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -502,92 +502,92 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_ToDafny(input awscryptog func Aws_cryptography_primitives_AESEncryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptInput_msg_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -600,27 +600,27 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_ToDafny(input int func Aws_cryptography_primitives_AesKdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -633,14 +633,14 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_ToDafny(input func Aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -672,27 +672,27 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -764,14 +764,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_ToDafny(inpu func Aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -784,14 +784,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_ToDafny(input func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -823,27 +823,27 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_DigestInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_DigestOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -875,40 +875,40 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_ToDafny(input func Aws_cryptography_primitives_ECDSASignInput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSASignInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -940,40 +940,40 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_ToDafny(inp func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1104,27 +1104,27 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1137,14 +1137,14 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_ToDafny(input i func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1171,14 +1171,14 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_ToDafny(input int32) in func Aws_cryptography_primitives_RSAPublicKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1198,14 +1198,14 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_ToDafny(input int32) i func Aws_cryptography_primitives_RSAPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1277,27 +1277,27 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_ToD func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1336,40 +1336,40 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HkdfInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_HkdfInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HkdfInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1382,14 +1382,14 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_ToDafny(input int32) i func Aws_cryptography_primitives_HkdfOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1421,27 +1421,27 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_ToDafny(input a func Aws_cryptography_primitives_HkdfExpandInput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HkdfExpandInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1454,14 +1454,14 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_ToDafny(input in func Aws_cryptography_primitives_HkdfExpandOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1493,40 +1493,40 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_ToDafny(input func Aws_cryptography_primitives_HkdfExtractInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1558,40 +1558,40 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HMacInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HMacInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HMacOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1623,14 +1623,14 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_KdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1643,53 +1643,53 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_ToDafny(input int32) func Aws_cryptography_primitives_KdfCtrInput_purpose_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1728,40 +1728,40 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSADecryptInput_privateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1793,40 +1793,40 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSAEncryptInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1858,14 +1858,14 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go index cf93b68202..7bc7d231b5 100644 --- a/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go +++ b/AwsCryptographyPrimitives/runtimes/go/ImplementationFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go @@ -377,98 +377,80 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input interface{}) i } func Aws_cryptography_primitives_AESDecryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_GCM { @@ -479,114 +461,93 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interfac } func Aws_cryptography_primitives_AESEncryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_msg_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -597,34 +558,28 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input i } func Aws_cryptography_primitives_AesKdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -632,18 +587,15 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(inpu } func Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -666,34 +618,28 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -740,18 +686,15 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_FromDafny(in } func Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -759,18 +702,15 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(inp } func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -793,34 +733,28 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_DigestInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DigestOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -843,50 +777,41 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(inp } func Aws_cryptography_primitives_ECDSASignInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSASignInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -909,50 +834,41 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(i } func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyOutput_success_FromDafny(input interface{}) bool { @@ -1038,34 +954,28 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input interface{}) int32 { @@ -1076,18 +986,15 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input } func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_FromDafny(input interface{}) int32 { @@ -1109,18 +1016,15 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_FromDafny(input interfa } func Aws_cryptography_primitives_RSAPublicKey_pem_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPrivateKey { @@ -1136,18 +1040,15 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_FromDafny(input interf } func Aws_cryptography_primitives_RSAPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1194,34 +1095,28 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_Fro } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_FromDafny(input interface{}) int32 { @@ -1250,50 +1145,41 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HkdfInput_salt_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfInput_info_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1304,18 +1190,15 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interf } func Aws_cryptography_primitives_HkdfOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1338,34 +1221,28 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandInput_prk_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExpandInput_info_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1376,18 +1253,15 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1410,50 +1284,41 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(inpu } func Aws_cryptography_primitives_HkdfExtractInput_salt_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1476,50 +1341,41 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HMacInput_key_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HMacInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HMacOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1542,18 +1398,15 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_KdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1564,66 +1417,54 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input inte } func Aws_cryptography_primitives_KdfCtrInput_purpose_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -1649,50 +1490,41 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSADecryptInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { @@ -1715,50 +1547,41 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSAEncryptInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1781,18 +1604,15 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ValidatePublicKeyOutput_success_FromDafny(input interface{}) bool { diff --git a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go index 47bf4f58c6..d0adeb556e 100644 --- a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go +++ b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_dafny.go @@ -417,79 +417,79 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_ToDafny(input int32) int32 { func Aws_cryptography_primitives_AESDecryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -502,92 +502,92 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_ToDafny(input awscryptog func Aws_cryptography_primitives_AESEncryptInput_iv_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptInput_msg_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptInput_aad_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -600,27 +600,27 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_ToDafny(input int func Aws_cryptography_primitives_AesKdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -633,14 +633,14 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_ToDafny(input func Aws_cryptography_primitives_ECCPublicKey_der_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -672,27 +672,27 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -764,14 +764,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_ToDafny(inpu func Aws_cryptography_primitives_ECCPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -784,14 +784,14 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_ToDafny(input func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -823,27 +823,27 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_DigestInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_DigestOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -875,40 +875,40 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_ToDafny(input func Aws_cryptography_primitives_ECDSASignInput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSASignInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -940,40 +940,40 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_ToDafny(inp func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1104,27 +1104,27 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1137,14 +1137,14 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_ToDafny(input i func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1171,14 +1171,14 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_ToDafny(input int32) in func Aws_cryptography_primitives_RSAPublicKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1198,14 +1198,14 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_ToDafny(input int32) i func Aws_cryptography_primitives_RSAPrivateKey_pem_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1277,27 +1277,27 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_ToD func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1336,40 +1336,40 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HkdfInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_HkdfInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HkdfInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1382,14 +1382,14 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_ToDafny(input int32) i func Aws_cryptography_primitives_HkdfOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1421,27 +1421,27 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_ToDafny(input a func Aws_cryptography_primitives_HkdfExpandInput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HkdfExpandInput_info_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1454,14 +1454,14 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_ToDafny(input in func Aws_cryptography_primitives_HkdfExpandOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1493,40 +1493,40 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_ToDafny(input func Aws_cryptography_primitives_HkdfExtractInput_salt_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1558,40 +1558,40 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_ToDafny(input awscryp func Aws_cryptography_primitives_HMacInput_key_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HMacInput_message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_HMacOutput_digest_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1623,14 +1623,14 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_ToDafny(input awscr func Aws_cryptography_primitives_KdfCtrInput_ikm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1643,53 +1643,53 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_ToDafny(input int32) func Aws_cryptography_primitives_KdfCtrInput_purpose_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1728,40 +1728,40 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSADecryptInput_privateKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1793,40 +1793,40 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_ToDafny(input awscrypto func Aws_cryptography_primitives_RSAEncryptInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -1858,14 +1858,14 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_ToDafny(input a func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go index cf93b68202..7bc7d231b5 100644 --- a/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go +++ b/AwsCryptographyPrimitives/runtimes/go/TestsFromDafny-go/awscryptographyprimitivessmithygenerated/to_native.go @@ -377,98 +377,80 @@ func Aws_cryptography_primitives_AES_GCM_ivLength_FromDafny(input interface{}) i } func Aws_cryptography_primitives_AESDecryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_cipherTxt_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_authTag_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESDecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.AES_GCM { @@ -479,114 +461,93 @@ func Aws_cryptography_primitives_AESEncryptInput_encAlg_FromDafny(input interfac } func Aws_cryptography_primitives_AESEncryptInput_iv_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_key_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_msg_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptInput_aad_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AESEncryptOutput_authTag_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -597,34 +558,28 @@ func Aws_cryptography_primitives_AesKdfCtrInput_expectedLength_FromDafny(input i } func Aws_cryptography_primitives_AesKdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_AesKdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -632,18 +587,15 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_publicKey_FromDafny(inpu } func Aws_cryptography_primitives_ECCPublicKey_der_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -666,34 +618,28 @@ func Aws_cryptography_primitives_CompressPublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_CompressPublicKeyOutput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_compressedPublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DecompressPublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -740,18 +686,15 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_privateKey_FromDafny(in } func Aws_cryptography_primitives_ECCPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -759,18 +702,15 @@ func Aws_cryptography_primitives_DeriveSharedSecretInput_publicKey_FromDafny(inp } func Aws_cryptography_primitives_DeriveSharedSecretOutput_sharedSecret_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -793,34 +733,28 @@ func Aws_cryptography_primitives_DigestInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_DigestInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_DigestOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -843,50 +777,41 @@ func Aws_cryptography_primitives_ECDSASignInput_signatureAlgorithm_FromDafny(inp } func Aws_cryptography_primitives_ECDSASignInput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSASignInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSASignOutput_signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDSASignatureAlgorithm { @@ -909,50 +834,41 @@ func Aws_cryptography_primitives_ECDSAVerifyInput_signatureAlgorithm_FromDafny(i } func Aws_cryptography_primitives_ECDSAVerifyInput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyInput_signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ECDSAVerifyOutput_success_FromDafny(input interface{}) bool { @@ -1038,34 +954,28 @@ func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signatureAlgori } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_verificationKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateECDSASignatureKeyOutput_signingKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input interface{}) int32 { @@ -1076,18 +986,15 @@ func Aws_cryptography_primitives_GenerateRandomBytesInput_length_FromDafny(input } func Aws_cryptography_primitives_GenerateRandomBytesOutput_data_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairInput_lengthBits_FromDafny(input interface{}) int32 { @@ -1109,18 +1016,15 @@ func Aws_cryptography_primitives_RSAPublicKey_lengthBits_FromDafny(input interfa } func Aws_cryptography_primitives_RSAPublicKey_pem_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GenerateRSAKeyPairOutput_privateKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPrivateKey { @@ -1136,18 +1040,15 @@ func Aws_cryptography_primitives_RSAPrivateKey_lengthBits_FromDafny(input interf } func Aws_cryptography_primitives_RSAPrivateKey_pem_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1194,34 +1095,28 @@ func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_privateKey_Fro } func Aws_cryptography_primitives_GetPublicKeyFromPrivateKeyOutput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_GetRSAKeyModulusLengthOutput_length_FromDafny(input interface{}) int32 { @@ -1250,50 +1145,41 @@ func Aws_cryptography_primitives_HkdfInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HkdfInput_salt_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfInput_info_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1304,18 +1190,15 @@ func Aws_cryptography_primitives_HkdfInput_expectedLength_FromDafny(input interf } func Aws_cryptography_primitives_HkdfOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1338,34 +1221,28 @@ func Aws_cryptography_primitives_HkdfExpandInput_digestAlgorithm_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandInput_prk_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExpandInput_info_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1376,18 +1253,15 @@ func Aws_cryptography_primitives_HkdfExpandInput_expectedLength_FromDafny(input } func Aws_cryptography_primitives_HkdfExpandOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1410,50 +1284,41 @@ func Aws_cryptography_primitives_HkdfExtractInput_digestAlgorithm_FromDafny(inpu } func Aws_cryptography_primitives_HkdfExtractInput_salt_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExtractInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HkdfExtractOutput_prk_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1476,50 +1341,41 @@ func Aws_cryptography_primitives_HMacInput_digestAlgorithm_FromDafny(input inter } func Aws_cryptography_primitives_HMacInput_key_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HMacInput_message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_HMacOutput_digest_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.DigestAlgorithm { @@ -1542,18 +1398,15 @@ func Aws_cryptography_primitives_KdfCtrInput_digestAlgorithm_FromDafny(input int } func Aws_cryptography_primitives_KdfCtrInput_ikm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input interface{}) int32 { @@ -1564,66 +1417,54 @@ func Aws_cryptography_primitives_KdfCtrInput_expectedLength_FromDafny(input inte } func Aws_cryptography_primitives_KdfCtrInput_purpose_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrInput_nonce_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_KdfCtrOutput_okm_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ParsePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ParsePublicKeyOutput_publicKey_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECCPublicKey { @@ -1649,50 +1490,41 @@ func Aws_cryptography_primitives_RSADecryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSADecryptInput_privateKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSADecryptInput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSADecryptOutput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.RSAPaddingMode { @@ -1715,50 +1547,41 @@ func Aws_cryptography_primitives_RSAEncryptInput_padding_FromDafny(input interfa } func Aws_cryptography_primitives_RSAEncryptInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSAEncryptInput_plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_RSAEncryptOutput_cipherText_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input interface{}) awscryptographyprimitivessmithygeneratedtypes.ECDHCurveSpec { @@ -1781,18 +1604,15 @@ func Aws_cryptography_primitives_ValidatePublicKeyInput_eccCurve_FromDafny(input } func Aws_cryptography_primitives_ValidatePublicKeyInput_publicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_primitives_ValidatePublicKeyOutput_success_FromDafny(input interface{}) bool { diff --git a/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy b/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy index f8c54b9265..fc75ad8f3a 100644 --- a/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy +++ b/AwsCryptographyPrimitives/test/TestKDF_TestVectors.dfy @@ -13,7 +13,10 @@ module TestKDFK_TestVectors { import opened TestKDF // UTF-8 encoded "aws-kms-hierarchy" - const PURPOSE: UTF8.ValidUTF8Bytes := UTF8.EncodeAscii("aws-kms-hierarchy") + const PURPOSE : UTF8.ValidUTF8Bytes := + var s := [0x61, 0x77, 0x73, 0x2d, 0x6b, 0x6d, 0x73, 0x2d, 0x68, 0x69, 0x65, 0x72, 0x61, 0x72, 0x63, 0x68, 0x79]; + assert s == UTF8.EncodeAscii("aws-kms-hierarchy"); + s // https://tiny.amazon.com/bhksn4so const rawTestVectors: seq := [b1, b2, b3, b4, b5, b6, b7, b8, b9, b10] diff --git a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go index 010c3c9e03..c250ed82ac 100644 --- a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go +++ b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go @@ -1586,14 +1586,14 @@ func Com_amazonaws_dynamodb_AttributeValue_N_ToDafny(input string) Wrappers.Opti func Com_amazonaws_dynamodb_AttributeValue_B_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -1667,14 +1667,14 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_ToDafny(input [][]byte) Wrappers.O func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2079,11 +2079,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_CapacityUnits_ToDafny(input *float6 var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2095,11 +2095,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_ReadCapacityUnits_ToDafny(input *fl var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2111,11 +2111,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_WriteCapacityUnits_ToDafny(input *f var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2136,11 +2136,11 @@ func Com_amazonaws_dynamodb_Capacity_ReadCapacityUnits_ToDafny(input *float64) W var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2152,11 +2152,11 @@ func Com_amazonaws_dynamodb_Capacity_WriteCapacityUnits_ToDafny(input *float64) var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2168,11 +2168,11 @@ func Com_amazonaws_dynamodb_Capacity_CapacityUnits_ToDafny(input *float64) Wrapp var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2858,11 +2858,11 @@ func Com_amazonaws_dynamodb_ItemCollectionSizeEstimateRange_member_ToDafny(input var bits = math.Float64bits(input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -6767,11 +6767,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationD var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -12272,11 +12272,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationU var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go index b1f03b3f3d..971c510f59 100644 --- a/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go +++ b/ComAmazonawsDynamodb/runtimes/go/ImplementationFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go @@ -2136,18 +2136,15 @@ func Com_amazonaws_dynamodb_AttributeValue_N_FromDafny(input interface{}) string } func Com_amazonaws_dynamodb_AttributeValue_B_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_dynamodb_AttributeValue_SS_FromDafny(input interface{}) []string { @@ -2216,18 +2213,15 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_FromDafny(input interface{}) [][]b } func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_dynamodb_AttributeValue_M_FromDafny(input interface{}) map[string]types.AttributeValue { diff --git a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go index 010c3c9e03..c250ed82ac 100644 --- a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go +++ b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_dafny.go @@ -1586,14 +1586,14 @@ func Com_amazonaws_dynamodb_AttributeValue_N_ToDafny(input string) Wrappers.Opti func Com_amazonaws_dynamodb_AttributeValue_B_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -1667,14 +1667,14 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_ToDafny(input [][]byte) Wrappers.O func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2079,11 +2079,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_CapacityUnits_ToDafny(input *float6 var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2095,11 +2095,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_ReadCapacityUnits_ToDafny(input *fl var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2111,11 +2111,11 @@ func Com_amazonaws_dynamodb_ConsumedCapacity_WriteCapacityUnits_ToDafny(input *f var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2136,11 +2136,11 @@ func Com_amazonaws_dynamodb_Capacity_ReadCapacityUnits_ToDafny(input *float64) W var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2152,11 +2152,11 @@ func Com_amazonaws_dynamodb_Capacity_WriteCapacityUnits_ToDafny(input *float64) var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2168,11 +2168,11 @@ func Com_amazonaws_dynamodb_Capacity_CapacityUnits_ToDafny(input *float64) Wrapp var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2858,11 +2858,11 @@ func Com_amazonaws_dynamodb_ItemCollectionSizeEstimateRange_member_ToDafny(input var bits = math.Float64bits(input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -6767,11 +6767,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationD var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -12272,11 +12272,11 @@ func Com_amazonaws_dynamodb_AutoScalingTargetTrackingScalingPolicyConfigurationU var bits = math.Float64bits(*input) var bytes = make([]byte, 8) binary.LittleEndian.PutUint64(bytes, bits) - var v []interface{} + v := make([]interface{}, 0, 8) for _, e := range bytes { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go index b1f03b3f3d..971c510f59 100644 --- a/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go +++ b/ComAmazonawsDynamodb/runtimes/go/TestsFromDafny-go/comamazonawsdynamodbsmithygenerated/to_native.go @@ -2136,18 +2136,15 @@ func Com_amazonaws_dynamodb_AttributeValue_N_FromDafny(input interface{}) string } func Com_amazonaws_dynamodb_AttributeValue_B_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_dynamodb_AttributeValue_SS_FromDafny(input interface{}) []string { @@ -2216,18 +2213,15 @@ func Com_amazonaws_dynamodb_AttributeValue_BS_FromDafny(input interface{}) [][]b } func Com_amazonaws_dynamodb_BinarySetAttributeValue_member_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_dynamodb_AttributeValue_M_FromDafny(input interface{}) map[string]types.AttributeValue { diff --git a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go index a79549b57c..2b6f83e896 100644 --- a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go +++ b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go @@ -2814,14 +2814,14 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_ToDafny(input *string) Wrapper func Com_amazonaws_kms_DecryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2928,14 +2928,14 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_ToDafny(input types. func Com_amazonaws_kms_RecipientInfo_AttestationDocument_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2965,14 +2965,14 @@ func Com_amazonaws_kms_DecryptResponse_KeyId_ToDafny(input *string) Wrappers.Opt func Com_amazonaws_kms_DecryptResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3003,14 +3003,14 @@ func Com_amazonaws_kms_DecryptResponse_EncryptionAlgorithm_ToDafny(input types.E func Com_amazonaws_kms_DecryptResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3101,14 +3101,14 @@ func Com_amazonaws_kms_DeriveSharedSecretRequest_KeyAgreementAlgorithm_ToDafny(i func Com_amazonaws_kms_DeriveSharedSecretRequest_PublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3161,27 +3161,27 @@ func Com_amazonaws_kms_DeriveSharedSecretResponse_KeyId_ToDafny(input *string) W func Com_amazonaws_kms_DeriveSharedSecretResponse_SharedSecret_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_DeriveSharedSecretResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3716,14 +3716,14 @@ func Com_amazonaws_kms_EncryptRequest_KeyId_ToDafny(input *string) dafny.Sequenc func Com_amazonaws_kms_EncryptRequest_Plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3790,14 +3790,14 @@ func Com_amazonaws_kms_EncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Optio func Com_amazonaws_kms_EncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3937,27 +3937,27 @@ func Com_amazonaws_kms_GenerateDataKeyRequest_DryRun_ToDafny(input *bool) Wrappe func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3978,14 +3978,14 @@ func Com_amazonaws_kms_GenerateDataKeyResponse_KeyId_ToDafny(input *string) Wrap func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4076,40 +4076,40 @@ func Com_amazonaws_kms_GenerateDataKeyPairRequest_DryRun_ToDafny(input *bool) Wr func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyPlaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4155,14 +4155,14 @@ func Com_amazonaws_kms_GenerateDataKeyPairResponse_KeyPairSpec_ToDafny(input typ func Com_amazonaws_kms_GenerateDataKeyPairResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4244,27 +4244,27 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextRequest_DryRun_ToDafny func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4395,14 +4395,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextRequest_DryRun_ToDafny(inp func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4423,14 +4423,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_KeyId_ToDafny(inp func Com_amazonaws_kms_GenerateMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -4499,14 +4499,14 @@ func Com_amazonaws_kms_GenerateMacRequest_DryRun_ToDafny(input *bool) Wrappers.O func Com_amazonaws_kms_GenerateMacResponse_Mac_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4585,27 +4585,27 @@ func Com_amazonaws_kms_GenerateRandomRequest_Recipient_ToDafny(input *types.Reci func Com_amazonaws_kms_GenerateRandomResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateRandomResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4829,27 +4829,27 @@ func Com_amazonaws_kms_GetParametersForImportResponse_KeyId_ToDafny(input *strin func Com_amazonaws_kms_GetParametersForImportResponse_ImportToken_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GetParametersForImportResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4915,14 +4915,14 @@ func Com_amazonaws_kms_GetPublicKeyResponse_KeyId_ToDafny(input *string) Wrapper func Com_amazonaws_kms_GetPublicKeyResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -5060,27 +5060,27 @@ func Com_amazonaws_kms_ImportKeyMaterialRequest_KeyId_ToDafny(input *string) daf func Com_amazonaws_kms_ImportKeyMaterialRequest_ImportToken_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Com_amazonaws_kms_ImportKeyMaterialRequest_EncryptedKeyMaterial_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -5977,14 +5977,14 @@ func Com_amazonaws_kms_PutKeyPolicyRequest_BypassPolicyLockoutSafetyCheck_ToDafn func Com_amazonaws_kms_ReEncryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -6119,14 +6119,14 @@ func Com_amazonaws_kms_ReEncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Opt func Com_amazonaws_kms_ReEncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -6558,14 +6558,14 @@ func Com_amazonaws_kms_SignRequest_KeyId_ToDafny(input *string) dafny.Sequence { func Com_amazonaws_kms_SignRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -6659,14 +6659,14 @@ func Com_amazonaws_kms_SignResponse_KeyId_ToDafny(input *string) Wrappers.Option func Com_amazonaws_kms_SignResponse_Signature_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -7012,14 +7012,14 @@ func Com_amazonaws_kms_VerifyRequest_KeyId_ToDafny(input *string) dafny.Sequence func Com_amazonaws_kms_VerifyRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -7050,14 +7050,14 @@ func Com_amazonaws_kms_VerifyRequest_MessageType_ToDafny(input types.MessageType func Com_amazonaws_kms_VerifyRequest_Signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -7158,14 +7158,14 @@ func Com_amazonaws_kms_VerifyResponse_SigningAlgorithm_ToDafny(input types.Signi func Com_amazonaws_kms_VerifyMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -7211,14 +7211,14 @@ func Com_amazonaws_kms_VerifyMacRequest_MacAlgorithm_ToDafny(input types.MacAlgo func Com_amazonaws_kms_VerifyMacRequest_Mac_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go index dfb67b7017..e8bcb00496 100644 --- a/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go +++ b/ComAmazonawsKms/runtimes/go/ImplementationFromDafny-go/comamazonawskmssmithygenerated/to_native.go @@ -3063,18 +3063,15 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_FromDafny(input interface{}) * } func Com_amazonaws_kms_DecryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DecryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3175,18 +3172,15 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_FromDafny(input inte } func Com_amazonaws_kms_RecipientInfo_AttestationDocument_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DecryptInput_DryRun_FromDafny(input interface{}) *bool { @@ -3211,18 +3205,15 @@ func Com_amazonaws_kms_DecryptOutput_KeyId_FromDafny(input interface{}) *string } func Com_amazonaws_kms_DecryptOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interface{}) types.EncryptionAlgorithmSpec { @@ -3248,18 +3239,15 @@ func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interfa } func Com_amazonaws_kms_DecryptOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeleteAliasInput_AliasName_FromDafny(input interface{}) *string { @@ -3314,18 +3302,15 @@ func Com_amazonaws_kms_DeriveSharedSecretInput_KeyAgreementAlgorithm_FromDafny(i } func Com_amazonaws_kms_DeriveSharedSecretInput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeriveSharedSecretInput_GrantTokens_FromDafny(input interface{}) []string { @@ -3377,34 +3362,28 @@ func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyId_FromDafny(input interface{ } func Com_amazonaws_kms_DeriveSharedSecretOutput_SharedSecret_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyAgreementAlgorithm_FromDafny(input interface{}) types.KeyAgreementAlgorithmSpec { @@ -3855,18 +3834,15 @@ func Com_amazonaws_kms_EncryptInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_EncryptInput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_EncryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3935,18 +3911,15 @@ func Com_amazonaws_kms_EncryptInput_DryRun_FromDafny(input interface{}) *bool { } func Com_amazonaws_kms_EncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_EncryptOutput_KeyId_FromDafny(input interface{}) *string { @@ -4075,34 +4048,28 @@ func Com_amazonaws_kms_GenerateDataKeyInput_DryRun_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) *string { @@ -4117,18 +4084,15 @@ func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4213,50 +4177,41 @@ func Com_amazonaws_kms_GenerateDataKeyPairInput_DryRun_FromDafny(input interface } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyPlaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyId_FromDafny(input interface{}) *string { @@ -4292,18 +4247,15 @@ func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyPairSpec_FromDafny(input int } func Com_amazonaws_kms_GenerateDataKeyPairOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4377,34 +4329,28 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_DryRun_FromDafny } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4522,18 +4468,15 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextInput_DryRun_FromDafny(inp } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4548,18 +4491,15 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(inp } func Com_amazonaws_kms_GenerateMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateMacInput_KeyId_FromDafny(input interface{}) *string { @@ -4616,18 +4556,15 @@ func Com_amazonaws_kms_GenerateMacInput_DryRun_FromDafny(input interface{}) *boo } func Com_amazonaws_kms_GenerateMacOutput_Mac_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateMacOutput_MacAlgorithm_FromDafny(input interface{}) types.MacAlgorithmSpec { @@ -4694,34 +4631,28 @@ func Com_amazonaws_kms_GenerateRandomInput_Recipient_FromDafny(input interface{} } func Com_amazonaws_kms_GenerateRandomOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateRandomOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetKeyPolicyInput_KeyId_FromDafny(input interface{}) *string { @@ -4892,34 +4823,28 @@ func Com_amazonaws_kms_GetParametersForImportOutput_KeyId_FromDafny(input interf } func Com_amazonaws_kms_GetParametersForImportOutput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_ParametersValidTo_FromDafny(input interface{}) *time.Time { @@ -4976,18 +4901,15 @@ func Com_amazonaws_kms_GetPublicKeyOutput_KeyId_FromDafny(input interface{}) *st } func Com_amazonaws_kms_GetPublicKeyOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetPublicKeyOutput_CustomerMasterKeySpec_FromDafny(input interface{}) types.CustomerMasterKeySpec { @@ -5111,34 +5033,28 @@ func Com_amazonaws_kms_ImportKeyMaterialInput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_ImportKeyMaterialInput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_EncryptedKeyMaterial_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_ValidTo_FromDafny(input interface{}) *time.Time { @@ -5911,18 +5827,15 @@ func Com_amazonaws_kms_PutKeyPolicyInput_BypassPolicyLockoutSafetyCheck_FromDafn } func Com_amazonaws_kms_ReEncryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ReEncryptInput_SourceEncryptionContext_FromDafny(input interface{}) map[string]string { @@ -6047,18 +5960,15 @@ func Com_amazonaws_kms_ReEncryptInput_DryRun_FromDafny(input interface{}) *bool } func Com_amazonaws_kms_ReEncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ReEncryptOutput_SourceKeyId_FromDafny(input interface{}) *string { @@ -6416,18 +6326,15 @@ func Com_amazonaws_kms_SignInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_SignInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6507,18 +6414,15 @@ func Com_amazonaws_kms_SignOutput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignOutput_Signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_SignOutput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6752,18 +6656,15 @@ func Com_amazonaws_kms_VerifyInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_VerifyInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6789,18 +6690,15 @@ func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) type } func Com_amazonaws_kms_VerifyInput_Signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyInput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6890,18 +6788,15 @@ func Com_amazonaws_kms_VerifyOutput_SigningAlgorithm_FromDafny(input interface{} } func Com_amazonaws_kms_VerifyMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyMacInput_KeyId_FromDafny(input interface{}) *string { @@ -6932,18 +6827,15 @@ func Com_amazonaws_kms_VerifyMacInput_MacAlgorithm_FromDafny(input interface{}) } func Com_amazonaws_kms_VerifyMacInput_Mac_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyMacInput_GrantTokens_FromDafny(input interface{}) []string { diff --git a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go index a79549b57c..2b6f83e896 100644 --- a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go +++ b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_dafny.go @@ -2814,14 +2814,14 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_ToDafny(input *string) Wrapper func Com_amazonaws_kms_DecryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -2928,14 +2928,14 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_ToDafny(input types. func Com_amazonaws_kms_RecipientInfo_AttestationDocument_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -2965,14 +2965,14 @@ func Com_amazonaws_kms_DecryptResponse_KeyId_ToDafny(input *string) Wrappers.Opt func Com_amazonaws_kms_DecryptResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3003,14 +3003,14 @@ func Com_amazonaws_kms_DecryptResponse_EncryptionAlgorithm_ToDafny(input types.E func Com_amazonaws_kms_DecryptResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3101,14 +3101,14 @@ func Com_amazonaws_kms_DeriveSharedSecretRequest_KeyAgreementAlgorithm_ToDafny(i func Com_amazonaws_kms_DeriveSharedSecretRequest_PublicKey_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3161,27 +3161,27 @@ func Com_amazonaws_kms_DeriveSharedSecretResponse_KeyId_ToDafny(input *string) W func Com_amazonaws_kms_DeriveSharedSecretResponse_SharedSecret_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_DeriveSharedSecretResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3716,14 +3716,14 @@ func Com_amazonaws_kms_EncryptRequest_KeyId_ToDafny(input *string) dafny.Sequenc func Com_amazonaws_kms_EncryptRequest_Plaintext_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -3790,14 +3790,14 @@ func Com_amazonaws_kms_EncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Optio func Com_amazonaws_kms_EncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3937,27 +3937,27 @@ func Com_amazonaws_kms_GenerateDataKeyRequest_DryRun_ToDafny(input *bool) Wrappe func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -3978,14 +3978,14 @@ func Com_amazonaws_kms_GenerateDataKeyResponse_KeyId_ToDafny(input *string) Wrap func Com_amazonaws_kms_GenerateDataKeyResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4076,40 +4076,40 @@ func Com_amazonaws_kms_GenerateDataKeyPairRequest_DryRun_ToDafny(input *bool) Wr func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PrivateKeyPlaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyPairResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4155,14 +4155,14 @@ func Com_amazonaws_kms_GenerateDataKeyPairResponse_KeyPairSpec_ToDafny(input typ func Com_amazonaws_kms_GenerateDataKeyPairResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4244,27 +4244,27 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextRequest_DryRun_ToDafny func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PrivateKeyCiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4395,14 +4395,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextRequest_DryRun_ToDafny(inp func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4423,14 +4423,14 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextResponse_KeyId_ToDafny(inp func Com_amazonaws_kms_GenerateMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -4499,14 +4499,14 @@ func Com_amazonaws_kms_GenerateMacRequest_DryRun_ToDafny(input *bool) Wrappers.O func Com_amazonaws_kms_GenerateMacResponse_Mac_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4585,27 +4585,27 @@ func Com_amazonaws_kms_GenerateRandomRequest_Recipient_ToDafny(input *types.Reci func Com_amazonaws_kms_GenerateRandomResponse_Plaintext_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GenerateRandomResponse_CiphertextForRecipient_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4829,27 +4829,27 @@ func Com_amazonaws_kms_GetParametersForImportResponse_KeyId_ToDafny(input *strin func Com_amazonaws_kms_GetParametersForImportResponse_ImportToken_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } func Com_amazonaws_kms_GetParametersForImportResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -4915,14 +4915,14 @@ func Com_amazonaws_kms_GetPublicKeyResponse_KeyId_ToDafny(input *string) Wrapper func Com_amazonaws_kms_GetPublicKeyResponse_PublicKey_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -5060,27 +5060,27 @@ func Com_amazonaws_kms_ImportKeyMaterialRequest_KeyId_ToDafny(input *string) daf func Com_amazonaws_kms_ImportKeyMaterialRequest_ImportToken_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } func Com_amazonaws_kms_ImportKeyMaterialRequest_EncryptedKeyMaterial_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -5977,14 +5977,14 @@ func Com_amazonaws_kms_PutKeyPolicyRequest_BypassPolicyLockoutSafetyCheck_ToDafn func Com_amazonaws_kms_ReEncryptRequest_CiphertextBlob_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -6119,14 +6119,14 @@ func Com_amazonaws_kms_ReEncryptRequest_DryRun_ToDafny(input *bool) Wrappers.Opt func Com_amazonaws_kms_ReEncryptResponse_CiphertextBlob_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -6558,14 +6558,14 @@ func Com_amazonaws_kms_SignRequest_KeyId_ToDafny(input *string) dafny.Sequence { func Com_amazonaws_kms_SignRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -6659,14 +6659,14 @@ func Com_amazonaws_kms_SignResponse_KeyId_ToDafny(input *string) Wrappers.Option func Com_amazonaws_kms_SignResponse_Signature_ToDafny(input []byte) Wrappers.Option { return func() Wrappers.Option { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return Wrappers.Companion_Option_.Create_None_() } for _, e := range input { v = append(v, e) } - return Wrappers.Companion_Option_.Create_Some_(dafny.SeqOf(v...)) + return Wrappers.Companion_Option_.Create_Some_(dafny.SeqFromArray(v, false)) }() } @@ -7012,14 +7012,14 @@ func Com_amazonaws_kms_VerifyRequest_KeyId_ToDafny(input *string) dafny.Sequence func Com_amazonaws_kms_VerifyRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -7050,14 +7050,14 @@ func Com_amazonaws_kms_VerifyRequest_MessageType_ToDafny(input types.MessageType func Com_amazonaws_kms_VerifyRequest_Signature_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -7158,14 +7158,14 @@ func Com_amazonaws_kms_VerifyResponse_SigningAlgorithm_ToDafny(input types.Signi func Com_amazonaws_kms_VerifyMacRequest_Message_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -7211,14 +7211,14 @@ func Com_amazonaws_kms_VerifyMacRequest_MacAlgorithm_ToDafny(input types.MacAlgo func Com_amazonaws_kms_VerifyMacRequest_Mac_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go index dfb67b7017..e8bcb00496 100644 --- a/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go +++ b/ComAmazonawsKms/runtimes/go/TestsFromDafny-go/comamazonawskmssmithygenerated/to_native.go @@ -3063,18 +3063,15 @@ func Com_amazonaws_kms_XksKeyConfigurationType_Id_FromDafny(input interface{}) * } func Com_amazonaws_kms_DecryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DecryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3175,18 +3172,15 @@ func Com_amazonaws_kms_RecipientInfo_KeyEncryptionAlgorithm_FromDafny(input inte } func Com_amazonaws_kms_RecipientInfo_AttestationDocument_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DecryptInput_DryRun_FromDafny(input interface{}) *bool { @@ -3211,18 +3205,15 @@ func Com_amazonaws_kms_DecryptOutput_KeyId_FromDafny(input interface{}) *string } func Com_amazonaws_kms_DecryptOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interface{}) types.EncryptionAlgorithmSpec { @@ -3248,18 +3239,15 @@ func Com_amazonaws_kms_DecryptOutput_EncryptionAlgorithm_FromDafny(input interfa } func Com_amazonaws_kms_DecryptOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeleteAliasInput_AliasName_FromDafny(input interface{}) *string { @@ -3314,18 +3302,15 @@ func Com_amazonaws_kms_DeriveSharedSecretInput_KeyAgreementAlgorithm_FromDafny(i } func Com_amazonaws_kms_DeriveSharedSecretInput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeriveSharedSecretInput_GrantTokens_FromDafny(input interface{}) []string { @@ -3377,34 +3362,28 @@ func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyId_FromDafny(input interface{ } func Com_amazonaws_kms_DeriveSharedSecretOutput_SharedSecret_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_DeriveSharedSecretOutput_KeyAgreementAlgorithm_FromDafny(input interface{}) types.KeyAgreementAlgorithmSpec { @@ -3855,18 +3834,15 @@ func Com_amazonaws_kms_EncryptInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_EncryptInput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_EncryptInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -3935,18 +3911,15 @@ func Com_amazonaws_kms_EncryptInput_DryRun_FromDafny(input interface{}) *bool { } func Com_amazonaws_kms_EncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_EncryptOutput_KeyId_FromDafny(input interface{}) *string { @@ -4075,34 +4048,28 @@ func Com_amazonaws_kms_GenerateDataKeyInput_DryRun_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) *string { @@ -4117,18 +4084,15 @@ func Com_amazonaws_kms_GenerateDataKeyOutput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_GenerateDataKeyOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4213,50 +4177,41 @@ func Com_amazonaws_kms_GenerateDataKeyPairInput_DryRun_FromDafny(input interface } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PrivateKeyPlaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyId_FromDafny(input interface{}) *string { @@ -4292,18 +4247,15 @@ func Com_amazonaws_kms_GenerateDataKeyPairOutput_KeyPairSpec_FromDafny(input int } func Com_amazonaws_kms_GenerateDataKeyPairOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_EncryptionContext_FromDafny(input interface{}) map[string]string { @@ -4377,34 +4329,28 @@ func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextInput_DryRun_FromDafny } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PrivateKeyCiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyPairWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4522,18 +4468,15 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextInput_DryRun_FromDafny(inp } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(input interface{}) *string { @@ -4548,18 +4491,15 @@ func Com_amazonaws_kms_GenerateDataKeyWithoutPlaintextOutput_KeyId_FromDafny(inp } func Com_amazonaws_kms_GenerateMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateMacInput_KeyId_FromDafny(input interface{}) *string { @@ -4616,18 +4556,15 @@ func Com_amazonaws_kms_GenerateMacInput_DryRun_FromDafny(input interface{}) *boo } func Com_amazonaws_kms_GenerateMacOutput_Mac_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateMacOutput_MacAlgorithm_FromDafny(input interface{}) types.MacAlgorithmSpec { @@ -4694,34 +4631,28 @@ func Com_amazonaws_kms_GenerateRandomInput_Recipient_FromDafny(input interface{} } func Com_amazonaws_kms_GenerateRandomOutput_Plaintext_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GenerateRandomOutput_CiphertextForRecipient_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetKeyPolicyInput_KeyId_FromDafny(input interface{}) *string { @@ -4892,34 +4823,28 @@ func Com_amazonaws_kms_GetParametersForImportOutput_KeyId_FromDafny(input interf } func Com_amazonaws_kms_GetParametersForImportOutput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetParametersForImportOutput_ParametersValidTo_FromDafny(input interface{}) *time.Time { @@ -4976,18 +4901,15 @@ func Com_amazonaws_kms_GetPublicKeyOutput_KeyId_FromDafny(input interface{}) *st } func Com_amazonaws_kms_GetPublicKeyOutput_PublicKey_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_GetPublicKeyOutput_CustomerMasterKeySpec_FromDafny(input interface{}) types.CustomerMasterKeySpec { @@ -5111,34 +5033,28 @@ func Com_amazonaws_kms_ImportKeyMaterialInput_KeyId_FromDafny(input interface{}) } func Com_amazonaws_kms_ImportKeyMaterialInput_ImportToken_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_EncryptedKeyMaterial_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ImportKeyMaterialInput_ValidTo_FromDafny(input interface{}) *time.Time { @@ -5911,18 +5827,15 @@ func Com_amazonaws_kms_PutKeyPolicyInput_BypassPolicyLockoutSafetyCheck_FromDafn } func Com_amazonaws_kms_ReEncryptInput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ReEncryptInput_SourceEncryptionContext_FromDafny(input interface{}) map[string]string { @@ -6047,18 +5960,15 @@ func Com_amazonaws_kms_ReEncryptInput_DryRun_FromDafny(input interface{}) *bool } func Com_amazonaws_kms_ReEncryptOutput_CiphertextBlob_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_ReEncryptOutput_SourceKeyId_FromDafny(input interface{}) *string { @@ -6416,18 +6326,15 @@ func Com_amazonaws_kms_SignInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_SignInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6507,18 +6414,15 @@ func Com_amazonaws_kms_SignOutput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_SignOutput_Signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input.(dafny.Sequence)); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_SignOutput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6752,18 +6656,15 @@ func Com_amazonaws_kms_VerifyInput_KeyId_FromDafny(input interface{}) *string { } func Com_amazonaws_kms_VerifyInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) types.MessageType { @@ -6789,18 +6690,15 @@ func Com_amazonaws_kms_VerifyInput_MessageType_FromDafny(input interface{}) type } func Com_amazonaws_kms_VerifyInput_Signature_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyInput_SigningAlgorithm_FromDafny(input interface{}) types.SigningAlgorithmSpec { @@ -6890,18 +6788,15 @@ func Com_amazonaws_kms_VerifyOutput_SigningAlgorithm_FromDafny(input interface{} } func Com_amazonaws_kms_VerifyMacInput_Message_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyMacInput_KeyId_FromDafny(input interface{}) *string { @@ -6932,18 +6827,15 @@ func Com_amazonaws_kms_VerifyMacInput_MacAlgorithm_FromDafny(input interface{}) } func Com_amazonaws_kms_VerifyMacInput_Mac_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Com_amazonaws_kms_VerifyMacInput_GrantTokens_FromDafny(input interface{}) []string { diff --git a/StandardLibrary/src/Actions.dfy b/StandardLibrary/src/Actions.dfy index d90f55bd8f..a3e4f27b71 100644 --- a/StandardLibrary/src/Actions.dfy +++ b/StandardLibrary/src/Actions.dfy @@ -22,6 +22,7 @@ module Actions { method Invoke(a: A, ghost attemptsState: seq>) returns (r: R) requires Invariant() + requires Requires(a) modifies Modifies decreases Modifies ensures Invariant() @@ -31,6 +32,8 @@ module Actions { reads Modifies decreases Modifies + predicate Requires(a: A) + /* * Contains the assertions that should be true upon return of the Invoke method */ @@ -59,6 +62,7 @@ module Actions { method Invoke(a: A, ghost attemptsState: seq>>) returns (r: Result) requires Invariant() + requires Requires(a) modifies Modifies decreases Modifies ensures Invariant() @@ -325,6 +329,7 @@ module Actions { ) requires 0 < |s| requires action.Invariant() + requires forall i <- s :: action.Requires(i) modifies action.Modifies decreases action.Modifies ensures 0 < |attemptsState| <= |s| diff --git a/StandardLibrary/src/Sequence.dfy b/StandardLibrary/src/Sequence.dfy index 2f87dd3095..4784927aed 100644 --- a/StandardLibrary/src/Sequence.dfy +++ b/StandardLibrary/src/Sequence.dfy @@ -2,10 +2,50 @@ // SPDX-License-Identifier: Apache-2.0 include "UInt.dfy" +include "WrappersInterop.dfy" module StandardLibrary.Sequence { // export provides SequenceEqual, StandardLibrary import opened UInt + import opened Wrappers + + // Just like Seq::MapWithResult, but not O(n^2) + function method {:opaque} {:tailrecursion} MapWithResult(f: (T ~> Result), xs: seq, pos : nat := 0, acc : seq := []) + : (result: Result, E>) + requires forall i :: 0 <= i < |xs| ==> f.requires(xs[i]) + requires pos <= |xs| + requires |acc| == pos + requires forall i :: 0 <= i < pos ==> + && f(xs[i]).Success? + && acc[i] == f(xs[i]).value + + ensures result.Success? ==> + && |result.value| == |xs| + && (forall i :: 0 <= i < |xs| ==> + && f(xs[i]).Success? + && result.value[i] == f(xs[i]).value) + reads set i, o | 0 <= i < |xs| && o in f.reads(xs[i]) :: o + decreases |xs| - pos + { + if |xs| == pos then + Success(acc) + else + var head :- f(xs[pos]); + MapWithResult(f, xs, pos+1, acc + [head]) + } + + + /* Flattens a sequence of sequences into a single sequence by concatenating + subsequences, starting from the first element. */ + function method {:tailrecursion} Flatten(xs: seq>, pos : nat := 0, acc : seq := []): (ret : seq) + requires pos <= |xs| + decreases |xs| - pos + { + if |xs| == pos then + acc + else + Flatten(xs, pos+1, acc + xs[pos]) + } predicate method SequenceEqualNat(seq1: seq, seq2: seq, start1: nat, start2: nat, size: nat) : (ret : bool) requires start1 + size <= |seq1| diff --git a/StandardLibrary/src/Time.dfy b/StandardLibrary/src/Time.dfy index 2e4b5891eb..77ca4bf5e1 100644 --- a/StandardLibrary/src/Time.dfy +++ b/StandardLibrary/src/Time.dfy @@ -5,6 +5,8 @@ include "./StandardLibrary.dfy" include "./UInt.dfy" include "./String.dfy" include "./OsLang.dfy" +include "./UTF8.dfy" +include "../../libraries/src/FileIO/FileIO.dfy" module {:extern "Time"} Time { import opened StandardLibrary @@ -12,6 +14,8 @@ module {:extern "Time"} Time { import opened UInt = StandardLibrary.UInt import StandardLibrary.String import OsLang + import UTF8 + import FileIO // Time is non-deterministic. // In this way it is similar to random number. @@ -134,9 +138,22 @@ module {:extern "Time"} Time { print "Clock Time : ", FormatMilli(time.ClockTime), " CPU Time : ", FormatMilli(time.CpuTime), "\n"; } - method PrintTimeLong(time : RelativeTime, tag : string) + method PrintTimeSinceLong(start : AbsoluteTime, tag : string, file : Option := None) { - print tag, " ", OsLang.GetOsLong(), " ", OsLang.GetLanguageLong(), " Clock Time : ", FormatMilli(time.ClockTime), " CPU Time : ", FormatMilli(time.CpuTime), "\n"; + var t := TimeSince(start); + PrintTimeLong(t, tag, file); + } + + method PrintTimeLong(time : RelativeTime, tag : string, file : Option := None) + { + var val := tag + " " + OsLang.GetOsShort() + " " + OsLang.GetLanguageShort() + " " + FormatMilli(time.ClockTime) + " " + FormatMilli(time.CpuTime) + "\n"; + print val; + if file.Some? { + var utf8_val := UTF8.Encode(val); + if utf8_val.Success? { + var _ := FileIO.AppendBytesToFile(file.value, utf8_val.value); + } + } } method PrintTimeShort(time : RelativeTime) diff --git a/StandardLibrary/src/UInt.dfy b/StandardLibrary/src/UInt.dfy index 2f9daf0621..9e82cc81d4 100644 --- a/StandardLibrary/src/UInt.dfy +++ b/StandardLibrary/src/UInt.dfy @@ -59,6 +59,21 @@ module StandardLibrary.UInt { x0 + s[1] as uint16 } + function method SeqPosToUInt16(s: seq, pos : nat): (x: uint16) + requires |s| >= pos+2 + ensures UInt16ToSeq(x) == s[pos..pos+2] + ensures x >= 0 + { + var x0 := s[pos] as uint16 * 0x100; + x0 + s[pos+1] as uint16 + } + + lemma SeqPosToUInt16Same(s: seq, pos : nat) + requires |s| >= pos+2 + ensures UInt16ToSeq(SeqPosToUInt16(s, pos)) == s[pos..pos+2] + ensures SeqToUInt16(s[pos..pos+2]) == SeqPosToUInt16(s, pos) + {} + lemma UInt16SeqSerializeDeserialize(x: uint16) ensures SeqToUInt16(UInt16ToSeq(x)) == x {} diff --git a/StandardLibrary/src/UTF8.dfy b/StandardLibrary/src/UTF8.dfy index dd84ad377e..4579e30a13 100644 --- a/StandardLibrary/src/UTF8.dfy +++ b/StandardLibrary/src/UTF8.dfy @@ -59,7 +59,9 @@ module {:extern "UTF8"} UTF8 { } // Encode ASCII as UTF8 in a function, to allow use in ensures clause - function method {:opaque} {:tailrecursion} EncodeAscii(s : string) : (ret : ValidUTF8Bytes) + // it's a ghost, because it's very expensive + // use explicit bytes in a constant, and then assert that it == EncodeAscii("whatever") + function {:opaque} EncodeAscii(s : string) : (ret : ValidUTF8Bytes) requires IsASCIIString(s) ensures |s| == |ret| ensures forall i | 0 <= i < |s| :: s[i] as uint8 == ret[i] @@ -135,7 +137,7 @@ module {:extern "UTF8"} UTF8 { || ((s[0] == 0xF4) && (0x80 <= s[1] <= 0x8F) && (0x80 <= s[2] <= 0xBF) && (0x80 <= s[3] <= 0xBF)) } - predicate method {:tailrecursion} ValidUTF8Range(a: seq, lo: nat, hi: nat) + predicate ValidUTF8Range(a: seq, lo: nat, hi: nat) requires lo <= hi <= |a| decreases hi - lo { @@ -153,6 +155,126 @@ module {:extern "UTF8"} UTF8 { ValidUTF8Range(a, lo + 4, hi) else false + } by method { + + // The slice a[lo..hi] is un-optimized operations in Dafny. + // This means that their usage will result in a lot of data copying. + // Additional, it is very likely that these size of these sequences + // will be less than uint64. + // So writing an optimized version that only works on bounded types + // should further optimized this hot code. + + if HasUint64Len(a) { + return BoundedValidUTF8Range(a, lo as uint64, hi as uint64); + } + + if lo == hi { + assert ValidUTF8Range(a, lo, hi); + return true; + } + + var i := lo; + + while i < hi + invariant lo <= i <= hi + invariant ValidUTF8Range(a, lo, hi) == ValidUTF8Range(a, i, hi) + decreases hi - i + { + if + && i < hi + && 0x00 <= a[i] <= 0x7F + { + assert Uses1Byte(a[i..hi]); + i := i + 1; + } else if + && i + 1 < hi + && (0xC2 <= a[i] <= 0xDF) + && (0x80 <= a[i+1] <= 0xBF) + { + assert Uses2Bytes(a[i..hi]); + i := i + 2; + } else if + && i + 2 < hi + && (((a[i] == 0xE0) && (0xA0 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) + || ((0xE1 <= a[i] <= 0xEC) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) + || ((a[i] == 0xED) && (0x80 <= a[i + 1] <= 0x9F) && (0x80 <= a[i + 2] <= 0xBF)) + || ((0xEE <= a[i] <= 0xEF) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF))) + { + assert Uses3Bytes(a[i..hi]); + i := i + 3; + } else if + && i + 3 < hi + && (((a[i] == 0xF0) && (0x90 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) + || ((0xF1 <= a[i] <= 0xF3) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) + || ((a[i] == 0xF4) && (0x80 <= a[i + 1] <= 0x8F) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF))) + { + assert Uses4Bytes(a[i..hi]); + i := i + 4; + } else { + assert i < hi; + return false; + } + } + + return true; + } + + predicate BoundedValidUTF8Range(a: seq64, lo: uint64, hi: uint64) + requires lo <= hi <= |a| as uint64 + decreases hi - lo + { + ValidUTF8Range(a, lo as nat, hi as nat) + } by method { + if lo == hi { + assert ValidUTF8Range(a, lo as nat, hi as nat); + return true; + } + + var i := lo; + + while i < hi + invariant lo <= i <= hi + invariant ValidUTF8Range(a, lo as nat, hi as nat) == ValidUTF8Range(a, i as nat, hi as nat) + decreases hi - i + { + if + && i < hi + && 0x00 <= a[i] <= 0x7F + { + assert Uses1Byte(a[i..hi]); + i := i + 1; + } else if + && i < hi - 1 + && (0xC2 <= a[i] <= 0xDF) + && (0x80 <= a[i+1] <= 0xBF) + { + assert Uses2Bytes(a[i..hi]); + i := i + 2; + } else if + && 2 <= hi + && i < hi - 2 + && (((a[i] == 0xE0) && (0xA0 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) + || ((0xE1 <= a[i] <= 0xEC) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF)) + || ((a[i] == 0xED) && (0x80 <= a[i + 1] <= 0x9F) && (0x80 <= a[i + 2] <= 0xBF)) + || ((0xEE <= a[i] <= 0xEF) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF))) + { + assert Uses3Bytes(a[i..hi]); + i := i + 3; + } else if + && 3 <= hi + && i < hi - 3 + && (((a[i] == 0xF0) && (0x90 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) + || ((0xF1 <= a[i] <= 0xF3) && (0x80 <= a[i + 1] <= 0xBF) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF)) + || ((a[i] == 0xF4) && (0x80 <= a[i + 1] <= 0x8F) && (0x80 <= a[i + 2] <= 0xBF) && (0x80 <= a[i + 3] <= 0xBF))) + { + assert Uses4Bytes(a[i..hi]); + i := i + 4; + } else { + return false; + } + } + + return true; } lemma ValidUTF8Embed(a: seq, b: seq, c: seq, lo: nat, hi: nat) @@ -208,4 +330,17 @@ module {:extern "UTF8"} UTF8 { assert s + t == s + t + [] && lo == |s|; } } + + lemma IsASCIIBytesIsValidUTF8(s: seq) + requires forall i | 0 <= i < |s| :: Uses1Byte([s[i]]) + ensures ValidUTF8Seq(s) + { + if |s| == 0 { + } else { + IsASCIIBytesIsValidUTF8(s[1..]); + assert ValidUTF8Seq(s[..1]); + ValidUTF8Concat(s[..1], s[1..]); + assert s[..1] + s[1..] == s; + } + } } diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy index ee1a10954f..6420f5bba0 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy @@ -26,6 +26,15 @@ module {:options "-functionSyntax:4"} TestManifests { import MplManifestOptions import CompleteVectors import Time + import OsLang + + function LogFileName() : string + { + if OsLang.GetOsShort() == "Windows" && OsLang.GetLanguageShort() == "Dotnet" then + "..\\..\\PerfLog.txt" + else + "../../PerfLog.txt" + } method StartEncrypt(op: MplManifestOptions.ManifestOptions) returns (output: Result<(), string>) @@ -60,6 +69,7 @@ module {:options "-functionSyntax:4"} TestManifests { var decryptableTests: seq<(TestVectors.EncryptTest, Types.EncryptionMaterials)> := []; + var time := Time.GetAbsoluteTime(); for i := 0 to |tests| invariant forall t <- tests :: t.cmm.ValidState() { @@ -72,6 +82,8 @@ module {:options "-functionSyntax:4"} TestManifests { hasFailure := true; } } + var elapsed :=Time.TimeSince(time); + Time.PrintTimeLong(elapsed, "TestEncrypts", Some(LogFileName())); print "\n=================== Completed ", |tests|, " Encrypt Tests =================== \n\n"; @@ -106,6 +118,7 @@ module {:options "-functionSyntax:4"} TestManifests { var hasFailure := false; + var time := Time.GetAbsoluteTime(); for i := 0 to |tests| invariant forall t <- tests :: t.cmm.ValidState() { @@ -114,6 +127,8 @@ module {:options "-functionSyntax:4"} TestManifests { hasFailure := true; } } + var elapsed := Time.TimeSince(time); + Time.PrintTimeLong(elapsed, "TestDecrypts", Some(LogFileName())); print "\n=================== Completed ", |tests|, " Decrypt Tests =================== \n\n"; expect !hasFailure; diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go index c0f7bdb4ce..b48b571b7a 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go @@ -726,7 +726,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextCMM_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := awscryptographymaterialproviderssmithygenerated.Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -738,7 +738,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_MultiKeyring_childKeyrings_ToDafny(input []awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProvidersTestVectorKeys_KeyDescriptionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -869,14 +869,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -976,14 +976,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go index f761006f29..355ea9b522 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/ImplementationFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go @@ -867,18 +867,15 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionOutput_keyDescription_FromDafny(input interface{}) awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription { @@ -1041,18 +1038,15 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp } func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_KeyVectorException_message_FromDafny(input interface{}) string { diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go index c0f7bdb4ce..b48b571b7a 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_dafny.go @@ -726,7 +726,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextCMM_requiredEncryptionContextKeys_ToDafny(input []string) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := awscryptographymaterialproviderssmithygenerated.Aws_cryptography_materialProviders_EncryptionContextKeys_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -738,7 +738,7 @@ func Aws_cryptography_materialProvidersTestVectorKeys_RequiredEncryptionContextC func Aws_cryptography_materialProvidersTestVectorKeys_MultiKeyring_childKeyrings_ToDafny(input []awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription) dafny.Sequence { return func() dafny.Sequence { - var fieldValue []interface{} = make([]interface{}, 0) + var fieldValue []interface{} = make([]interface{}, 0, len(input)) for _, val := range input { element := Aws_cryptography_materialProvidersTestVectorKeys_KeyDescriptionList_member_ToDafny(val) fieldValue = append(fieldValue, element) @@ -869,14 +869,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } @@ -976,14 +976,14 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_ToDafny(input []byte) dafny.Sequence { return func() dafny.Sequence { - var v []interface{} + v := make([]interface{}, 0, len(input)) if input == nil { return nil } for _, e := range input { v = append(v, e) } - return dafny.SeqOf(v...) + return dafny.SeqFromArray(v, false) }() } diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go index f761006f29..355ea9b522 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/go/TestsFromDafny-go/awscryptographymaterialproviderstestvectorkeyssmithygenerated/to_native.go @@ -867,18 +867,15 @@ func Aws_cryptography_materialProvidersTestVectorKeys_TestVectorCmmInput_forOper } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionInput_json_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_GetKeyDescriptionOutput_keyDescription_FromDafny(input interface{}) awscryptographymaterialproviderstestvectorkeyssmithygeneratedtypes.KeyDescription { @@ -1041,18 +1038,15 @@ func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionInp } func Aws_cryptography_materialProvidersTestVectorKeys_SerializeKeyDescriptionOutput_json_FromDafny(input interface{}) []byte { return func() []byte { - b := []byte{} if input == nil { return nil } - for i := dafny.Iterate(input); ; { - val, ok := i() - if !ok { - return b - } else { - b = append(b, val.(byte)) - } + a := input.(dafny.Sequence).ToArray().(dafny.GoNativeArray) + b := make([]byte, 0, a.Length()) + for i := uint32(0); i < a.Length(); i++ { + b = append(b, a.Select(i).(byte)) } + return b }() } func Aws_cryptography_materialProvidersTestVectorKeys_KeyVectorException_message_FromDafny(input interface{}) string { From d78d7316a9a288233957cef810ff55aa0eef3629 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Wed, 16 Apr 2025 10:42:39 -0700 Subject: [PATCH 08/48] local dafnyruntimepython --- .../dafnyruntimepython-4.10.1-py3-none-any.whl | Bin 0 -> 6581 bytes StandardLibrary/runtimes/python/pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl diff --git a/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl b/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..40f823af7bb1b94c68256b64b5fb1a7bcbaa1ede GIT binary patch literal 6581 zcmb7JWl&t}mTjD%L4v!xyM+!Ar12nWtZ`_Z#x*qV4#5fTP6+OrK=42Zf(9o*2o`j> z@72tG@6Ma5JLlA{UEhzrYS-Fl?NhZrO%MtyF#rI-1bmOQGl(=vIh%VtSt0=dM34EE zkDI%dBZLYcw5Jxdz5$9JuaBH&n$a)=Fp|yE6B9rTz%GBuHXT- z=vYb~XNrF}5?RV7{v^J8pAAz(chUXst&R(>Bke`$w$cxYy_%k5BJ3r8{fuY{vo$`2 zJZY5GSw2@K4Z}#ZirVg})EsE-n7~%#4!fVTK1wHVy%G_-O7W(!O zYUl1EQutq?&zCteIVD|ZZ)mzSlPU>TQhI@tL?LrH?Yq^#@SUv6MO!JC5*=51J!wdfaLrVZT?ynCR6kqiHC@|} zmLJ;fiC}o%J8ogx6Dq2YBU7zxi4U9lNcN1poTDl8MtCkb7dO#ioCK(#!1XY8WRSf#c( z#Z0p48}b8-7~zUOR2sOZwTh~2xk3_(21tZ^5cm_-#i$K+o3e;p#4pYwi>VDs9hCUO zEKSh3Mq39fs9JBf+xY40LuB~%&o<4V*gOHSKy$*%va%khFtor5Ix$t-jb3zICteY4 zp!zxlQm$P;7Cw-lvKSZrAs1zt4hDkAg)p^i9*r#D}Q?2pgo=&#Dw$|B^cp2mR- zHqgAYDRU(Fc1EZ!J-O92X6tENb)NT|9QDyWU7f$ojSRkd`SZOdaQHHqukZ7V>=qF5 zNP1rpF~@u?k>>=i!DtH_a)pzH8u`sYGQr9=eN+^ve!nJWMEjd!*z9z2Q|G>eFzGxU zWNhEd#oFq=W?Z-uH1x1dMtDXt4@!M9ve;$`nONQ%aro%8_eCHP5B4{ zN0!;T&~aly{~UEAE-AI_);zgl%E;}SUi?ZP{oRtzCp5ZNUENfxG~;Ge>z8W^9GSaP zh2R(I5;@eEA%{iy+lTYX%CPL@F7sazA0CABBXEp7`QBVXWsapGTzY&G_=eb@2u<1$ z389OK`Vxk1m;!^Isn18+{w^)|ck9^-C3&+PBUXz73ZB z5S8;pyJ>vYo`m1)fH4T&27}bOPMC2YdzC(eTG4Pa@*vIM zz)=G*0^iRFt;Af3;!T^wIGTk<&V5ut>STZ@zRKcmI%h1Bwbn{FsJUWPu8KOt zr&Gwq^PL=Ed*vL7DNI2}SKBVk*U)ValsElRy!ez*SY1esvOK%MN=yEz^6Vyzgxc>Y zHfCVW-SxzJU~{wSp0kWwA^ z)l8C?ngHFAqM#Jiz_YX+4nLKimw0Zm)C;zf$ZeruB{M9R%Na2uiN(5&J(9|>L^=(v zTpMFOMA50{Q`0PuYGq#m_ik$NCo~wIVWn&?)C{lc#V7KWi^oX*Y?Z9$pgDzc~$!|ZbCQOjFk+=5)kp~i`A`5dn z`-hGew2vyJob$O{6HUz8v z^@#tQ#OSQrh2wJx=f*Qdy875l=pp&c>npxtvVyUTO$^kTigR;TIgXZk)K7z?xpAlC zaU3S*@-^(UXz5N6?C0%LVdwRWEzNsynH(N(3but5AwExMVND^vrx7{TmO3vs`Sm`% z{P~7TO=2}I9*-b3wuNgy&121FW`4c=Tgr#1)n>2W6(B0ILL?|=@z9yDiSjfjeQMm@hJXSuYnD<2C1|k|FVneljSWy8 z4^&WAS8%7k2`nTNcwUgfz8r{Nid_;O5b#K|HzaiF3a|0T_B8CwHG*Mzk}0nBzXxYQ_VF-h{Sar?s;tv_ZEP1xr{q4E&DK@6`Jc zfUkT>yViXiR28+un>Gj4XHsk8^u=P#F zS;Jn9H9$P z=^8Z{Uwayt&FPqxD4%|!s2C5%_)*>tb`U5-=%Ja~#{L%6JslA?_p88dC|H}*O-BqC zBu;k;=FOwT`2OWHLKmR#)jCw z%o@Vwo3suA%1N7V>yz%fkz2WO3lnd}#vW+$$BNX% z-X2Z^Jt0iK&vcV3ONr%<>wz4UnqMDk11kX1o1?7 zot-I0)g?EcaB}6>qrMlCiBU~fR9M9qHq_hicc}I+9snfG^s$!TJ-Cx!;mzOi2&TPy zmrbhP)Z0@B-<}C>jzbM@u89;?=u6m~z`XkD6_9u@m3A{jfJHq<60C1tVpyxWh0eN0 z-S0%ncLrhO3|461X&#V>x$<;%D?84r{>p8+Vg-?ooA17{KD0D=yk-6~2h>s^N^V6fmM^=IToexf7{ls|Z{&U7 zTp#HZAS(2=3Oc}IF1#seQNwXly;_Z8N}HV*^w9&a}^04zh`5>5dZ8f0BLMdv<_u&}VI{eG`COiK`kaw{BUc&!?bW0A^THa0 zFgwvJ+{so`JaLvT*q~8}uZ7L{GmoGcI94x)6Cn#*pbMmTQVW zsje6K*`&O`LBP4Sn{sAz?D{AtIo(3V?xg9BzzECo`^KgrvQjg+zDHQD10HWg{^#wp zHqjLvk&%_zo|A#O)S8vBvZx3u-m({jTJ1J1H)d{aLyFB4*@?&|&(oC8;|fA)(J5?( zhdxoViFLPJZZng}B^+9hb@rj*sH=4XPbKc&KP)UC$G&M^N$(x*s+KY71|%R+jmY1c z1St)Kz4h{x#r0kwAYMW=mN%prlAK}ikz!O&hviVegt~YYW~wf5MxlMfXbs9Cg5L@W z)3Gp(G{4d+mWDY!PqO5p->i_~y7lry{e=~@e6Qx`^GY(#m|73U%jxe^sv(Ut10Bfx zG-8#@G=RBH28%wMyY+7>s26U$&nzjB*jEj(u1(As=Au!cLaYY*+#J<8-(x5Yfy0ld zT!$Kcdq@<#)H>-lMo&mNdRnm#Z=6}FEgwc%o`JhZ7!- zjA0pFsXOt3Z5IxsN`R|9K)sLLYf4*sGZp=oA_c!HO}91tk7|APeXU9JfnEe6Om8!M ztghip7w3XE4L1AR^efl>>=wT0b~HV9i%Z#uNBk|%8?!q`lou#|#QNNNNaQ!}BpN-H z7W5jMV(`z&S>b8xx86XPKq!6!5e^ok0cO^R+5Z=nBXAja_T);6^QM; z3pa-FB1%7v$qmLk1$Ojn+u6SwTlwPkfu?J$Vx6Jo-K+|0EB>iOryNbE#{~h+Ll07S z?$AbjDv29$iv3eQg3zDTPf(occUO74R_}7VcY3xI22C&DF`D*y5%`f`Ozp+c@G@Q) zUw)}zxrmq@%u)dOp3KueWOU@KbsqTo$mDEH_k^Upl)3#wGZW(3nK|c(C0S4P53U`x zf|Ob7dm$}WmC|Gz&SgeslETmK^{Bq2k$y?B;a@_KLN=+toIkm=U$aI6qBnWiu6DT7 zYw!wS2b1S>?{*(jh#TZU>T}`t!6zif_m@5fA>WNJ7BWOmJ)Ue(5Gf8^(jsNOBwC&n zOmr7CPm_f&AQ1MQm)SU-e!o|ZbSJ7(yWVnK7IOX8%Mj&Din__NNn2I|9tWipJpKoD z2Jyn`+n!pt3zxQGu05fE2TKfIu&7ZI(~>lv%~>ho8)Y8-#`md3oqR|0Q}sB#cI0KM z(l_B=_nsyc@^@(;>-`e>-n^dburU+-tsj6R9vX7J4V>zhEpx@AE74z}3-Vr`*-1uR zB^!P3B-_!vRL5wf@jAV}E|J-?>qi0i#nK3IPCaOmAY~?k#p3F%^R6p1{QzJ#Q}$KMB6q0Ii$_pRB9vYBZ} zIq~|U*&ev>`1bpU+W^nTq9A7URN6rk$*MITaFnP}@fsTE5_J*o*Qo;RxTcMK1Ll|| zOZrn=9GGZBFC$KxMMkXJA#b{+X8yArima)AejuID37@?9U>VGoIsV|iSp7{Q!|3Iv zUSE~qoVl9lROpm%TIqW{wOdszo0%Aa1xp zNBhMK%R>l~idqll3~boh1Na4!7?9Uj>WH}06rbxjJX^?Pzey(>sHZ#jrxR>XL?j#R z<5LbMbr)Hm!i=g+?^;!lhIs#-PL69*cB4lc4IhL3Z_=r+q@bXRJ*lKNF^vo2=J-55 z*`&=kC%6XFm;iCBaErfnQZ|#)qvux|aT#*3(-XeMt=sm$>Yxs}B|2JE7cXoj|Sb17G z@VI-sW7l%=C{M)gL~AIkeyaM8{1<#L5M!R`@)InW4uZ0;QBC7PFsyFpL51W(AXJON zCtZ$Vi_2I9vFQ*#YsOcIvin|Mu-4 zXYh}w82(544=(<{0{kb>`=8|iKr#G}P4T}S@PDoUPdnw$`mM)%g#XWm`782Y<@G1B z(6hgX{137H751-^_!D;FZ^HhYK>iB<{9 literal 0 HcmV?d00001 diff --git a/StandardLibrary/runtimes/python/pyproject.toml b/StandardLibrary/runtimes/python/pyproject.toml index 4906a8723a..0252c9cf83 100644 --- a/StandardLibrary/runtimes/python/pyproject.toml +++ b/StandardLibrary/runtimes/python/pyproject.toml @@ -18,7 +18,7 @@ include = [ python = "^3.11.0" pytz = ">=2023.3.post1, <2025.0.0" # TODO: Longer-term, write something to pull this in from the project's project.properties file -DafnyRuntimePython = "4.9.0" +DafnyRuntimePython = {path = "dafnyruntimepython-4.10.1-py3-none-any.whl"} # Package testing From 961873c574c85b107051485ccd0b5b524b87d0e9 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 17 Apr 2025 10:42:23 -0700 Subject: [PATCH 09/48] m --- smithy-dafny | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithy-dafny b/smithy-dafny index 8d3d04ec52..68f9667b87 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit 8d3d04ec525afbeee8daffd95c73b929e5a938ee +Subproject commit 68f9667b87eec1e63c15858b76fe6db9218b5d79 From eed39e9da554b79af7731754b3d2e7aa240acc35 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 17 Apr 2025 10:58:58 -0700 Subject: [PATCH 10/48] m --- .../CreateAwsKmsHierarchicalKeyringInput.java | 22 +- .../materialproviders/model/DefaultCache.java | 24 +- .../model/GetCacheEntryOutput.java | 88 +- .../materialproviders/model/HKDF.java | 76 +- .../model/MultiThreadedCache.java | 47 +- .../model/PutCacheEntryInput.java | 84 +- .../model/SingleThreadedCache.java | 47 +- .../model/StormTrackingCache.java | 157 +- .../model/UpdateUsageMetadataInput.java | 22 +- .../TypeConversion.cs | 540 ++--- .../AwsCryptographyKeyStore/TypeConversion.cs | 78 +- .../internaldafny/generated/dafny_src-py.dtr | 46 +- .../primitives/model/AES_CTR.java | 50 +- .../primitives/model/AES_GCM.java | 74 +- .../primitives/model/AesKdfCtrInput.java | 22 +- .../model/GenerateRSAKeyPairInput.java | 26 +- .../model/GenerateRandomBytesInput.java | 24 +- .../model/GetRSAKeyModulusLengthOutput.java | 24 +- .../primitives/model/HkdfExpandInput.java | 22 +- .../primitives/model/HkdfInput.java | 22 +- .../primitives/model/KdfCtrInput.java | 22 +- .../primitives/model/RSAPrivateKey.java | 22 +- .../primitives/model/RSAPublicKey.java | 22 +- .../net/Generated/AtomicPrimitives.cs | 2 +- .../runtimes/net/Generated/TypeConversion.cs | 266 +-- .../runtimes/net/Generated/TypeConversion.cs | 1836 ++++++++--------- .../runtimes/net/Generated/TypeConversion.cs | 872 ++++---- 27 files changed, 2330 insertions(+), 2207 deletions(-) diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java index e9601e5561..da972fa977 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/CreateAwsKmsHierarchicalKeyringInput.java @@ -31,7 +31,7 @@ public class CreateAwsKmsHierarchicalKeyringInput { /** * How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - private final Long ttlSeconds; + private final long ttlSeconds; /** * Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. @@ -76,7 +76,7 @@ public KeyStore keyStore() { /** * @return How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - public Long ttlSeconds() { + public long ttlSeconds() { return this.ttlSeconds; } @@ -136,12 +136,12 @@ public interface Builder { /** * @param ttlSeconds How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - Builder ttlSeconds(Long ttlSeconds); + Builder ttlSeconds(long ttlSeconds); /** * @return How many seconds the Branch Key material is allowed to be reused within the local cache before it is re-retrieved from Amazon DynamoDB and re-authenticated with AWS KMS. */ - Long ttlSeconds(); + long ttlSeconds(); /** * @param cache Sets the type of cache for this Hierarchical Keyring. By providing an already initialized 'Shared' cache, users can determine the scope of the cache. That is, if the cache is shared across other Cryptographic Material Providers, for instance other Hierarchical Keyrings or Caching Cryptographic Materials Managers (Caching CMMs). If any other type of cache in the CacheType union is provided, the Hierarchical Keyring will initialize a cache of that type, to be used with only this Hierarchical Keyring. If not set, a DefaultCache is initialized to be used with only this Hierarchical Keyring with entryCapacity = 1000. @@ -174,7 +174,9 @@ static class BuilderImpl implements Builder { protected KeyStore keyStore; - protected Long ttlSeconds; + protected long ttlSeconds; + + private boolean _ttlSecondsSet = false; protected CacheType cache; @@ -187,6 +189,7 @@ protected BuilderImpl(CreateAwsKmsHierarchicalKeyringInput model) { this.branchKeyIdSupplier = model.branchKeyIdSupplier(); this.keyStore = model.keyStore(); this.ttlSeconds = model.ttlSeconds(); + this._ttlSecondsSet = true; this.cache = model.cache(); this.partitionId = model.partitionId(); } @@ -220,12 +223,13 @@ public KeyStore keyStore() { return this.keyStore; } - public Builder ttlSeconds(Long ttlSeconds) { + public Builder ttlSeconds(long ttlSeconds) { this.ttlSeconds = ttlSeconds; + this._ttlSecondsSet = true; return this; } - public Long ttlSeconds() { + public long ttlSeconds() { return this.ttlSeconds; } @@ -253,12 +257,12 @@ public CreateAwsKmsHierarchicalKeyringInput build() { "Missing value for required field `keyStore`" ); } - if (Objects.isNull(this.ttlSeconds())) { + if (!this._ttlSecondsSet) { throw new IllegalArgumentException( "Missing value for required field `ttlSeconds`" ); } - if (Objects.nonNull(this.ttlSeconds()) && this.ttlSeconds() < 0) { + if (this._ttlSecondsSet && this.ttlSeconds() < 0) { throw new IllegalArgumentException( "`ttlSeconds` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java index 844d26eab3..fda8b217cf 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/DefaultCache.java @@ -3,8 +3,6 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; -import java.util.Objects; - /** * The best choice for most situations. Probably a StormTrackingCache. */ @@ -13,7 +11,7 @@ public class DefaultCache { /** * Maximum number of entries cached. */ - private final Integer entryCapacity; + private final int entryCapacity; protected DefaultCache(BuilderImpl builder) { this.entryCapacity = builder.entryCapacity(); @@ -22,7 +20,7 @@ protected DefaultCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } @@ -38,42 +36,46 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(Integer entryCapacity); + Builder entryCapacity(int entryCapacity); /** * @return Maximum number of entries cached. */ - Integer entryCapacity(); + int entryCapacity(); DefaultCache build(); } static class BuilderImpl implements Builder { - protected Integer entryCapacity; + protected int entryCapacity; + + private boolean _entryCapacitySet = false; protected BuilderImpl() {} protected BuilderImpl(DefaultCache model) { this.entryCapacity = model.entryCapacity(); + this._entryCapacitySet = true; } - public Builder entryCapacity(Integer entryCapacity) { + public Builder entryCapacity(int entryCapacity) { this.entryCapacity = entryCapacity; + this._entryCapacitySet = true; return this; } - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } public DefaultCache build() { - if (Objects.isNull(this.entryCapacity())) { + if (!this._entryCapacitySet) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { + if (this._entryCapacitySet && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java index d4d4b7f5ec..98f90d6070 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/GetCacheEntryOutput.java @@ -9,13 +9,13 @@ public class GetCacheEntryOutput { private final Materials materials; - private final Long creationTime; + private final long creationTime; - private final Long expiryTime; + private final long expiryTime; - private final Integer messagesUsed; + private final int messagesUsed; - private final Integer bytesUsed; + private final int bytesUsed; protected GetCacheEntryOutput(BuilderImpl builder) { this.materials = builder.materials(); @@ -29,19 +29,19 @@ public Materials materials() { return this.materials; } - public Long creationTime() { + public long creationTime() { return this.creationTime; } - public Long expiryTime() { + public long expiryTime() { return this.expiryTime; } - public Integer messagesUsed() { + public int messagesUsed() { return this.messagesUsed; } - public Integer bytesUsed() { + public int bytesUsed() { return this.bytesUsed; } @@ -58,21 +58,21 @@ public interface Builder { Materials materials(); - Builder creationTime(Long creationTime); + Builder creationTime(long creationTime); - Long creationTime(); + long creationTime(); - Builder expiryTime(Long expiryTime); + Builder expiryTime(long expiryTime); - Long expiryTime(); + long expiryTime(); - Builder messagesUsed(Integer messagesUsed); + Builder messagesUsed(int messagesUsed); - Integer messagesUsed(); + int messagesUsed(); - Builder bytesUsed(Integer bytesUsed); + Builder bytesUsed(int bytesUsed); - Integer bytesUsed(); + int bytesUsed(); GetCacheEntryOutput build(); } @@ -81,22 +81,34 @@ static class BuilderImpl implements Builder { protected Materials materials; - protected Long creationTime; + protected long creationTime; - protected Long expiryTime; + private boolean _creationTimeSet = false; - protected Integer messagesUsed; + protected long expiryTime; - protected Integer bytesUsed; + private boolean _expiryTimeSet = false; + + protected int messagesUsed; + + private boolean _messagesUsedSet = false; + + protected int bytesUsed; + + private boolean _bytesUsedSet = false; protected BuilderImpl() {} protected BuilderImpl(GetCacheEntryOutput model) { this.materials = model.materials(); this.creationTime = model.creationTime(); + this._creationTimeSet = true; this.expiryTime = model.expiryTime(); + this._expiryTimeSet = true; this.messagesUsed = model.messagesUsed(); + this._messagesUsedSet = true; this.bytesUsed = model.bytesUsed(); + this._bytesUsedSet = true; } public Builder materials(Materials materials) { @@ -108,39 +120,43 @@ public Materials materials() { return this.materials; } - public Builder creationTime(Long creationTime) { + public Builder creationTime(long creationTime) { this.creationTime = creationTime; + this._creationTimeSet = true; return this; } - public Long creationTime() { + public long creationTime() { return this.creationTime; } - public Builder expiryTime(Long expiryTime) { + public Builder expiryTime(long expiryTime) { this.expiryTime = expiryTime; + this._expiryTimeSet = true; return this; } - public Long expiryTime() { + public long expiryTime() { return this.expiryTime; } - public Builder messagesUsed(Integer messagesUsed) { + public Builder messagesUsed(int messagesUsed) { this.messagesUsed = messagesUsed; + this._messagesUsedSet = true; return this; } - public Integer messagesUsed() { + public int messagesUsed() { return this.messagesUsed; } - public Builder bytesUsed(Integer bytesUsed) { + public Builder bytesUsed(int bytesUsed) { this.bytesUsed = bytesUsed; + this._bytesUsedSet = true; return this; } - public Integer bytesUsed() { + public int bytesUsed() { return this.bytesUsed; } @@ -150,42 +166,42 @@ public GetCacheEntryOutput build() { "Missing value for required field `materials`" ); } - if (Objects.isNull(this.creationTime())) { + if (!this._creationTimeSet) { throw new IllegalArgumentException( "Missing value for required field `creationTime`" ); } - if (Objects.nonNull(this.creationTime()) && this.creationTime() < 0) { + if (this._creationTimeSet && this.creationTime() < 0) { throw new IllegalArgumentException( "`creationTime` must be greater than or equal to 0" ); } - if (Objects.isNull(this.expiryTime())) { + if (!this._expiryTimeSet) { throw new IllegalArgumentException( "Missing value for required field `expiryTime`" ); } - if (Objects.nonNull(this.expiryTime()) && this.expiryTime() < 0) { + if (this._expiryTimeSet && this.expiryTime() < 0) { throw new IllegalArgumentException( "`expiryTime` must be greater than or equal to 0" ); } - if (Objects.isNull(this.messagesUsed())) { + if (!this._messagesUsedSet) { throw new IllegalArgumentException( "Missing value for required field `messagesUsed`" ); } - if (Objects.nonNull(this.messagesUsed()) && this.messagesUsed() < 0) { + if (this._messagesUsedSet && this.messagesUsed() < 0) { throw new IllegalArgumentException( "`messagesUsed` must be greater than or equal to 0" ); } - if (Objects.isNull(this.bytesUsed())) { + if (!this._bytesUsedSet) { throw new IllegalArgumentException( "Missing value for required field `bytesUsed`" ); } - if (Objects.nonNull(this.bytesUsed()) && this.bytesUsed() < 0) { + if (this._bytesUsedSet && this.bytesUsed() < 0) { throw new IllegalArgumentException( "`bytesUsed` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java index 0038e98d62..65b935b09d 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/HKDF.java @@ -10,11 +10,11 @@ public class HKDF { private final DigestAlgorithm hmac; - private final Integer saltLength; + private final int saltLength; - private final Integer inputKeyLength; + private final int inputKeyLength; - private final Integer outputKeyLength; + private final int outputKeyLength; protected HKDF(BuilderImpl builder) { this.hmac = builder.hmac(); @@ -27,15 +27,15 @@ public DigestAlgorithm hmac() { return this.hmac; } - public Integer saltLength() { + public int saltLength() { return this.saltLength; } - public Integer inputKeyLength() { + public int inputKeyLength() { return this.inputKeyLength; } - public Integer outputKeyLength() { + public int outputKeyLength() { return this.outputKeyLength; } @@ -52,17 +52,17 @@ public interface Builder { DigestAlgorithm hmac(); - Builder saltLength(Integer saltLength); + Builder saltLength(int saltLength); - Integer saltLength(); + int saltLength(); - Builder inputKeyLength(Integer inputKeyLength); + Builder inputKeyLength(int inputKeyLength); - Integer inputKeyLength(); + int inputKeyLength(); - Builder outputKeyLength(Integer outputKeyLength); + Builder outputKeyLength(int outputKeyLength); - Integer outputKeyLength(); + int outputKeyLength(); HKDF build(); } @@ -71,19 +71,28 @@ static class BuilderImpl implements Builder { protected DigestAlgorithm hmac; - protected Integer saltLength; + protected int saltLength; - protected Integer inputKeyLength; + private boolean _saltLengthSet = false; - protected Integer outputKeyLength; + protected int inputKeyLength; + + private boolean _inputKeyLengthSet = false; + + protected int outputKeyLength; + + private boolean _outputKeyLengthSet = false; protected BuilderImpl() {} protected BuilderImpl(HKDF model) { this.hmac = model.hmac(); this.saltLength = model.saltLength(); + this._saltLengthSet = true; this.inputKeyLength = model.inputKeyLength(); + this._inputKeyLengthSet = true; this.outputKeyLength = model.outputKeyLength(); + this._outputKeyLengthSet = true; } public Builder hmac(DigestAlgorithm hmac) { @@ -95,30 +104,33 @@ public DigestAlgorithm hmac() { return this.hmac; } - public Builder saltLength(Integer saltLength) { + public Builder saltLength(int saltLength) { this.saltLength = saltLength; + this._saltLengthSet = true; return this; } - public Integer saltLength() { + public int saltLength() { return this.saltLength; } - public Builder inputKeyLength(Integer inputKeyLength) { + public Builder inputKeyLength(int inputKeyLength) { this.inputKeyLength = inputKeyLength; + this._inputKeyLengthSet = true; return this; } - public Integer inputKeyLength() { + public int inputKeyLength() { return this.inputKeyLength; } - public Builder outputKeyLength(Integer outputKeyLength) { + public Builder outputKeyLength(int outputKeyLength) { this.outputKeyLength = outputKeyLength; + this._outputKeyLengthSet = true; return this; } - public Integer outputKeyLength() { + public int outputKeyLength() { return this.outputKeyLength; } @@ -128,48 +140,42 @@ public HKDF build() { "Missing value for required field `hmac`" ); } - if (Objects.isNull(this.saltLength())) { + if (!this._saltLengthSet) { throw new IllegalArgumentException( "Missing value for required field `saltLength`" ); } - if (Objects.nonNull(this.saltLength()) && this.saltLength() < 0) { + if (this._saltLengthSet && this.saltLength() < 0) { throw new IllegalArgumentException( "`saltLength` must be greater than or equal to 0" ); } - if (Objects.isNull(this.inputKeyLength())) { + if (!this._inputKeyLengthSet) { throw new IllegalArgumentException( "Missing value for required field `inputKeyLength`" ); } - if (Objects.nonNull(this.inputKeyLength()) && this.inputKeyLength() < 1) { + if (this._inputKeyLengthSet && this.inputKeyLength() < 1) { throw new IllegalArgumentException( "`inputKeyLength` must be greater than or equal to 1" ); } - if ( - Objects.nonNull(this.inputKeyLength()) && this.inputKeyLength() > 32 - ) { + if (this._inputKeyLengthSet && this.inputKeyLength() > 32) { throw new IllegalArgumentException( "`inputKeyLength` must be less than or equal to 32." ); } - if (Objects.isNull(this.outputKeyLength())) { + if (!this._outputKeyLengthSet) { throw new IllegalArgumentException( "Missing value for required field `outputKeyLength`" ); } - if ( - Objects.nonNull(this.outputKeyLength()) && this.outputKeyLength() < 1 - ) { + if (this._outputKeyLengthSet && this.outputKeyLength() < 1) { throw new IllegalArgumentException( "`outputKeyLength` must be greater than or equal to 1" ); } - if ( - Objects.nonNull(this.outputKeyLength()) && this.outputKeyLength() > 32 - ) { + if (this._outputKeyLengthSet && this.outputKeyLength() > 32) { throw new IllegalArgumentException( "`outputKeyLength` must be less than or equal to 32." ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java index 742bd24824..79e146e5f6 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/MultiThreadedCache.java @@ -3,8 +3,6 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; -import java.util.Objects; - /** * A cache that is safe for use in a multi threaded environment, but no extra functionality. */ @@ -13,12 +11,12 @@ public class MultiThreadedCache { /** * Maximum number of entries cached. */ - private final Integer entryCapacity; + private final int entryCapacity; /** * Number of entries to prune at a time. */ - private final Integer entryPruningTailSize; + private final int entryPruningTailSize; protected MultiThreadedCache(BuilderImpl builder) { this.entryCapacity = builder.entryCapacity(); @@ -28,14 +26,14 @@ protected MultiThreadedCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } /** * @return Number of entries to prune at a time. */ - public Integer entryPruningTailSize() { + public int entryPruningTailSize() { return this.entryPruningTailSize; } @@ -51,72 +49,77 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(Integer entryCapacity); + Builder entryCapacity(int entryCapacity); /** * @return Maximum number of entries cached. */ - Integer entryCapacity(); + int entryCapacity(); /** * @param entryPruningTailSize Number of entries to prune at a time. */ - Builder entryPruningTailSize(Integer entryPruningTailSize); + Builder entryPruningTailSize(int entryPruningTailSize); /** * @return Number of entries to prune at a time. */ - Integer entryPruningTailSize(); + int entryPruningTailSize(); MultiThreadedCache build(); } static class BuilderImpl implements Builder { - protected Integer entryCapacity; + protected int entryCapacity; + + private boolean _entryCapacitySet = false; + + protected int entryPruningTailSize; - protected Integer entryPruningTailSize; + private boolean _entryPruningTailSizeSet = false; protected BuilderImpl() {} protected BuilderImpl(MultiThreadedCache model) { this.entryCapacity = model.entryCapacity(); + this._entryCapacitySet = true; this.entryPruningTailSize = model.entryPruningTailSize(); + this._entryPruningTailSizeSet = true; } - public Builder entryCapacity(Integer entryCapacity) { + public Builder entryCapacity(int entryCapacity) { this.entryCapacity = entryCapacity; + this._entryCapacitySet = true; return this; } - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } - public Builder entryPruningTailSize(Integer entryPruningTailSize) { + public Builder entryPruningTailSize(int entryPruningTailSize) { this.entryPruningTailSize = entryPruningTailSize; + this._entryPruningTailSizeSet = true; return this; } - public Integer entryPruningTailSize() { + public int entryPruningTailSize() { return this.entryPruningTailSize; } public MultiThreadedCache build() { - if (Objects.isNull(this.entryCapacity())) { + if (!this._entryCapacitySet) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { + if (this._entryCapacitySet && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); } - if ( - Objects.nonNull(this.entryPruningTailSize()) && - this.entryPruningTailSize() < 1 - ) { + if (this._entryPruningTailSizeSet && this.entryPruningTailSize() < 1) { throw new IllegalArgumentException( "`entryPruningTailSize` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java index cdcf808ea2..cdc22c12d1 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/PutCacheEntryInput.java @@ -12,13 +12,13 @@ public class PutCacheEntryInput { private final Materials materials; - private final Long creationTime; + private final long creationTime; - private final Long expiryTime; + private final long expiryTime; - private final Integer messagesUsed; + private final int messagesUsed; - private final Integer bytesUsed; + private final int bytesUsed; protected PutCacheEntryInput(BuilderImpl builder) { this.identifier = builder.identifier(); @@ -37,19 +37,19 @@ public Materials materials() { return this.materials; } - public Long creationTime() { + public long creationTime() { return this.creationTime; } - public Long expiryTime() { + public long expiryTime() { return this.expiryTime; } - public Integer messagesUsed() { + public int messagesUsed() { return this.messagesUsed; } - public Integer bytesUsed() { + public int bytesUsed() { return this.bytesUsed; } @@ -70,21 +70,21 @@ public interface Builder { Materials materials(); - Builder creationTime(Long creationTime); + Builder creationTime(long creationTime); - Long creationTime(); + long creationTime(); - Builder expiryTime(Long expiryTime); + Builder expiryTime(long expiryTime); - Long expiryTime(); + long expiryTime(); - Builder messagesUsed(Integer messagesUsed); + Builder messagesUsed(int messagesUsed); - Integer messagesUsed(); + int messagesUsed(); - Builder bytesUsed(Integer bytesUsed); + Builder bytesUsed(int bytesUsed); - Integer bytesUsed(); + int bytesUsed(); PutCacheEntryInput build(); } @@ -95,13 +95,21 @@ static class BuilderImpl implements Builder { protected Materials materials; - protected Long creationTime; + protected long creationTime; - protected Long expiryTime; + private boolean _creationTimeSet = false; - protected Integer messagesUsed; + protected long expiryTime; - protected Integer bytesUsed; + private boolean _expiryTimeSet = false; + + protected int messagesUsed; + + private boolean _messagesUsedSet = false; + + protected int bytesUsed; + + private boolean _bytesUsedSet = false; protected BuilderImpl() {} @@ -109,9 +117,13 @@ protected BuilderImpl(PutCacheEntryInput model) { this.identifier = model.identifier(); this.materials = model.materials(); this.creationTime = model.creationTime(); + this._creationTimeSet = true; this.expiryTime = model.expiryTime(); + this._expiryTimeSet = true; this.messagesUsed = model.messagesUsed(); + this._messagesUsedSet = true; this.bytesUsed = model.bytesUsed(); + this._bytesUsedSet = true; } public Builder identifier(ByteBuffer identifier) { @@ -132,39 +144,43 @@ public Materials materials() { return this.materials; } - public Builder creationTime(Long creationTime) { + public Builder creationTime(long creationTime) { this.creationTime = creationTime; + this._creationTimeSet = true; return this; } - public Long creationTime() { + public long creationTime() { return this.creationTime; } - public Builder expiryTime(Long expiryTime) { + public Builder expiryTime(long expiryTime) { this.expiryTime = expiryTime; + this._expiryTimeSet = true; return this; } - public Long expiryTime() { + public long expiryTime() { return this.expiryTime; } - public Builder messagesUsed(Integer messagesUsed) { + public Builder messagesUsed(int messagesUsed) { this.messagesUsed = messagesUsed; + this._messagesUsedSet = true; return this; } - public Integer messagesUsed() { + public int messagesUsed() { return this.messagesUsed; } - public Builder bytesUsed(Integer bytesUsed) { + public Builder bytesUsed(int bytesUsed) { this.bytesUsed = bytesUsed; + this._bytesUsedSet = true; return this; } - public Integer bytesUsed() { + public int bytesUsed() { return this.bytesUsed; } @@ -179,32 +195,32 @@ public PutCacheEntryInput build() { "Missing value for required field `materials`" ); } - if (Objects.isNull(this.creationTime())) { + if (!this._creationTimeSet) { throw new IllegalArgumentException( "Missing value for required field `creationTime`" ); } - if (Objects.nonNull(this.creationTime()) && this.creationTime() < 0) { + if (this._creationTimeSet && this.creationTime() < 0) { throw new IllegalArgumentException( "`creationTime` must be greater than or equal to 0" ); } - if (Objects.isNull(this.expiryTime())) { + if (!this._expiryTimeSet) { throw new IllegalArgumentException( "Missing value for required field `expiryTime`" ); } - if (Objects.nonNull(this.expiryTime()) && this.expiryTime() < 0) { + if (this._expiryTimeSet && this.expiryTime() < 0) { throw new IllegalArgumentException( "`expiryTime` must be greater than or equal to 0" ); } - if (Objects.nonNull(this.messagesUsed()) && this.messagesUsed() < 0) { + if (this._messagesUsedSet && this.messagesUsed() < 0) { throw new IllegalArgumentException( "`messagesUsed` must be greater than or equal to 0" ); } - if (Objects.nonNull(this.bytesUsed()) && this.bytesUsed() < 0) { + if (this._bytesUsedSet && this.bytesUsed() < 0) { throw new IllegalArgumentException( "`bytesUsed` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java index 614182944c..12b64bde31 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/SingleThreadedCache.java @@ -3,8 +3,6 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; -import java.util.Objects; - /** * A cache that is NOT safe for use in a multi threaded environment. */ @@ -13,12 +11,12 @@ public class SingleThreadedCache { /** * Maximum number of entries cached. */ - private final Integer entryCapacity; + private final int entryCapacity; /** * Number of entries to prune at a time. */ - private final Integer entryPruningTailSize; + private final int entryPruningTailSize; protected SingleThreadedCache(BuilderImpl builder) { this.entryCapacity = builder.entryCapacity(); @@ -28,14 +26,14 @@ protected SingleThreadedCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } /** * @return Number of entries to prune at a time. */ - public Integer entryPruningTailSize() { + public int entryPruningTailSize() { return this.entryPruningTailSize; } @@ -51,72 +49,77 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(Integer entryCapacity); + Builder entryCapacity(int entryCapacity); /** * @return Maximum number of entries cached. */ - Integer entryCapacity(); + int entryCapacity(); /** * @param entryPruningTailSize Number of entries to prune at a time. */ - Builder entryPruningTailSize(Integer entryPruningTailSize); + Builder entryPruningTailSize(int entryPruningTailSize); /** * @return Number of entries to prune at a time. */ - Integer entryPruningTailSize(); + int entryPruningTailSize(); SingleThreadedCache build(); } static class BuilderImpl implements Builder { - protected Integer entryCapacity; + protected int entryCapacity; + + private boolean _entryCapacitySet = false; + + protected int entryPruningTailSize; - protected Integer entryPruningTailSize; + private boolean _entryPruningTailSizeSet = false; protected BuilderImpl() {} protected BuilderImpl(SingleThreadedCache model) { this.entryCapacity = model.entryCapacity(); + this._entryCapacitySet = true; this.entryPruningTailSize = model.entryPruningTailSize(); + this._entryPruningTailSizeSet = true; } - public Builder entryCapacity(Integer entryCapacity) { + public Builder entryCapacity(int entryCapacity) { this.entryCapacity = entryCapacity; + this._entryCapacitySet = true; return this; } - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } - public Builder entryPruningTailSize(Integer entryPruningTailSize) { + public Builder entryPruningTailSize(int entryPruningTailSize) { this.entryPruningTailSize = entryPruningTailSize; + this._entryPruningTailSizeSet = true; return this; } - public Integer entryPruningTailSize() { + public int entryPruningTailSize() { return this.entryPruningTailSize; } public SingleThreadedCache build() { - if (Objects.isNull(this.entryCapacity())) { + if (!this._entryCapacitySet) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { + if (this._entryCapacitySet && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); } - if ( - Objects.nonNull(this.entryPruningTailSize()) && - this.entryPruningTailSize() < 1 - ) { + if (this._entryPruningTailSizeSet && this.entryPruningTailSize() < 1) { throw new IllegalArgumentException( "`entryPruningTailSize` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java index f2227c785c..8f3835b439 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/StormTrackingCache.java @@ -3,8 +3,6 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.materialproviders.model; -import java.util.Objects; - /** * A cache that is safe for use in a multi threaded environment, * and tries to prevent redundant or overly parallel backend calls. @@ -14,38 +12,38 @@ public class StormTrackingCache { /** * Maximum number of entries cached. */ - private final Integer entryCapacity; + private final int entryCapacity; /** * Number of entries to prune at a time. */ - private final Integer entryPruningTailSize; + private final int entryPruningTailSize; /** * How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - private final Integer gracePeriod; + private final int gracePeriod; /** * How much time between attempts to refresh the materials. */ - private final Integer graceInterval; + private final int graceInterval; /** * How many simultaneous attempts to refresh the materials. */ - private final Integer fanOut; + private final int fanOut; /** * How much time until an attempt to refresh the materials should be forgotten. */ - private final Integer inFlightTTL; + private final int inFlightTTL; /** * How many milliseconds should a thread sleep if fanOut is exceeded. */ - private final Integer sleepMilli; + private final int sleepMilli; /** * The time unit for gracePeriod, graceInterval, and inFlightTTL. @@ -68,14 +66,14 @@ protected StormTrackingCache(BuilderImpl builder) { /** * @return Maximum number of entries cached. */ - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } /** * @return Number of entries to prune at a time. */ - public Integer entryPruningTailSize() { + public int entryPruningTailSize() { return this.entryPruningTailSize; } @@ -83,35 +81,35 @@ public Integer entryPruningTailSize() { * @return How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - public Integer gracePeriod() { + public int gracePeriod() { return this.gracePeriod; } /** * @return How much time between attempts to refresh the materials. */ - public Integer graceInterval() { + public int graceInterval() { return this.graceInterval; } /** * @return How many simultaneous attempts to refresh the materials. */ - public Integer fanOut() { + public int fanOut() { return this.fanOut; } /** * @return How much time until an attempt to refresh the materials should be forgotten. */ - public Integer inFlightTTL() { + public int inFlightTTL() { return this.inFlightTTL; } /** * @return How many milliseconds should a thread sleep if fanOut is exceeded. */ - public Integer sleepMilli() { + public int sleepMilli() { return this.sleepMilli; } @@ -136,74 +134,74 @@ public interface Builder { /** * @param entryCapacity Maximum number of entries cached. */ - Builder entryCapacity(Integer entryCapacity); + Builder entryCapacity(int entryCapacity); /** * @return Maximum number of entries cached. */ - Integer entryCapacity(); + int entryCapacity(); /** * @param entryPruningTailSize Number of entries to prune at a time. */ - Builder entryPruningTailSize(Integer entryPruningTailSize); + Builder entryPruningTailSize(int entryPruningTailSize); /** * @return Number of entries to prune at a time. */ - Integer entryPruningTailSize(); + int entryPruningTailSize(); /** * @param gracePeriod How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - Builder gracePeriod(Integer gracePeriod); + Builder gracePeriod(int gracePeriod); /** * @return How much time before expiration should an attempt be made to refresh the materials. * If zero, use a simple cache with no storm tracking. */ - Integer gracePeriod(); + int gracePeriod(); /** * @param graceInterval How much time between attempts to refresh the materials. */ - Builder graceInterval(Integer graceInterval); + Builder graceInterval(int graceInterval); /** * @return How much time between attempts to refresh the materials. */ - Integer graceInterval(); + int graceInterval(); /** * @param fanOut How many simultaneous attempts to refresh the materials. */ - Builder fanOut(Integer fanOut); + Builder fanOut(int fanOut); /** * @return How many simultaneous attempts to refresh the materials. */ - Integer fanOut(); + int fanOut(); /** * @param inFlightTTL How much time until an attempt to refresh the materials should be forgotten. */ - Builder inFlightTTL(Integer inFlightTTL); + Builder inFlightTTL(int inFlightTTL); /** * @return How much time until an attempt to refresh the materials should be forgotten. */ - Integer inFlightTTL(); + int inFlightTTL(); /** * @param sleepMilli How many milliseconds should a thread sleep if fanOut is exceeded. */ - Builder sleepMilli(Integer sleepMilli); + Builder sleepMilli(int sleepMilli); /** * @return How many milliseconds should a thread sleep if fanOut is exceeded. */ - Integer sleepMilli(); + int sleepMilli(); /** * @param timeUnits The time unit for gracePeriod, graceInterval, and inFlightTTL. @@ -224,19 +222,33 @@ public interface Builder { static class BuilderImpl implements Builder { - protected Integer entryCapacity; + protected int entryCapacity; + + private boolean _entryCapacitySet = false; + + protected int entryPruningTailSize; + + private boolean _entryPruningTailSizeSet = false; + + protected int gracePeriod; + + private boolean _gracePeriodSet = false; + + protected int graceInterval; + + private boolean _graceIntervalSet = false; - protected Integer entryPruningTailSize; + protected int fanOut; - protected Integer gracePeriod; + private boolean _fanOutSet = false; - protected Integer graceInterval; + protected int inFlightTTL; - protected Integer fanOut; + private boolean _inFlightTTLSet = false; - protected Integer inFlightTTL; + protected int sleepMilli; - protected Integer sleepMilli; + private boolean _sleepMilliSet = false; protected TimeUnits timeUnits; @@ -244,75 +256,89 @@ protected BuilderImpl() {} protected BuilderImpl(StormTrackingCache model) { this.entryCapacity = model.entryCapacity(); + this._entryCapacitySet = true; this.entryPruningTailSize = model.entryPruningTailSize(); + this._entryPruningTailSizeSet = true; this.gracePeriod = model.gracePeriod(); + this._gracePeriodSet = true; this.graceInterval = model.graceInterval(); + this._graceIntervalSet = true; this.fanOut = model.fanOut(); + this._fanOutSet = true; this.inFlightTTL = model.inFlightTTL(); + this._inFlightTTLSet = true; this.sleepMilli = model.sleepMilli(); + this._sleepMilliSet = true; this.timeUnits = model.timeUnits(); } - public Builder entryCapacity(Integer entryCapacity) { + public Builder entryCapacity(int entryCapacity) { this.entryCapacity = entryCapacity; + this._entryCapacitySet = true; return this; } - public Integer entryCapacity() { + public int entryCapacity() { return this.entryCapacity; } - public Builder entryPruningTailSize(Integer entryPruningTailSize) { + public Builder entryPruningTailSize(int entryPruningTailSize) { this.entryPruningTailSize = entryPruningTailSize; + this._entryPruningTailSizeSet = true; return this; } - public Integer entryPruningTailSize() { + public int entryPruningTailSize() { return this.entryPruningTailSize; } - public Builder gracePeriod(Integer gracePeriod) { + public Builder gracePeriod(int gracePeriod) { this.gracePeriod = gracePeriod; + this._gracePeriodSet = true; return this; } - public Integer gracePeriod() { + public int gracePeriod() { return this.gracePeriod; } - public Builder graceInterval(Integer graceInterval) { + public Builder graceInterval(int graceInterval) { this.graceInterval = graceInterval; + this._graceIntervalSet = true; return this; } - public Integer graceInterval() { + public int graceInterval() { return this.graceInterval; } - public Builder fanOut(Integer fanOut) { + public Builder fanOut(int fanOut) { this.fanOut = fanOut; + this._fanOutSet = true; return this; } - public Integer fanOut() { + public int fanOut() { return this.fanOut; } - public Builder inFlightTTL(Integer inFlightTTL) { + public Builder inFlightTTL(int inFlightTTL) { this.inFlightTTL = inFlightTTL; + this._inFlightTTLSet = true; return this; } - public Integer inFlightTTL() { + public int inFlightTTL() { return this.inFlightTTL; } - public Builder sleepMilli(Integer sleepMilli) { + public Builder sleepMilli(int sleepMilli) { this.sleepMilli = sleepMilli; + this._sleepMilliSet = true; return this; } - public Integer sleepMilli() { + public int sleepMilli() { return this.sleepMilli; } @@ -326,70 +352,67 @@ public TimeUnits timeUnits() { } public StormTrackingCache build() { - if (Objects.isNull(this.entryCapacity())) { + if (!this._entryCapacitySet) { throw new IllegalArgumentException( "Missing value for required field `entryCapacity`" ); } - if (Objects.nonNull(this.entryCapacity()) && this.entryCapacity() < 1) { + if (this._entryCapacitySet && this.entryCapacity() < 1) { throw new IllegalArgumentException( "`entryCapacity` must be greater than or equal to 1" ); } - if ( - Objects.nonNull(this.entryPruningTailSize()) && - this.entryPruningTailSize() < 1 - ) { + if (this._entryPruningTailSizeSet && this.entryPruningTailSize() < 1) { throw new IllegalArgumentException( "`entryPruningTailSize` must be greater than or equal to 1" ); } - if (Objects.isNull(this.gracePeriod())) { + if (!this._gracePeriodSet) { throw new IllegalArgumentException( "Missing value for required field `gracePeriod`" ); } - if (Objects.nonNull(this.gracePeriod()) && this.gracePeriod() < 1) { + if (this._gracePeriodSet && this.gracePeriod() < 1) { throw new IllegalArgumentException( "`gracePeriod` must be greater than or equal to 1" ); } - if (Objects.isNull(this.graceInterval())) { + if (!this._graceIntervalSet) { throw new IllegalArgumentException( "Missing value for required field `graceInterval`" ); } - if (Objects.nonNull(this.graceInterval()) && this.graceInterval() < 1) { + if (this._graceIntervalSet && this.graceInterval() < 1) { throw new IllegalArgumentException( "`graceInterval` must be greater than or equal to 1" ); } - if (Objects.isNull(this.fanOut())) { + if (!this._fanOutSet) { throw new IllegalArgumentException( "Missing value for required field `fanOut`" ); } - if (Objects.nonNull(this.fanOut()) && this.fanOut() < 1) { + if (this._fanOutSet && this.fanOut() < 1) { throw new IllegalArgumentException( "`fanOut` must be greater than or equal to 1" ); } - if (Objects.isNull(this.inFlightTTL())) { + if (!this._inFlightTTLSet) { throw new IllegalArgumentException( "Missing value for required field `inFlightTTL`" ); } - if (Objects.nonNull(this.inFlightTTL()) && this.inFlightTTL() < 1) { + if (this._inFlightTTLSet && this.inFlightTTL() < 1) { throw new IllegalArgumentException( "`inFlightTTL` must be greater than or equal to 1" ); } - if (Objects.isNull(this.sleepMilli())) { + if (!this._sleepMilliSet) { throw new IllegalArgumentException( "Missing value for required field `sleepMilli`" ); } - if (Objects.nonNull(this.sleepMilli()) && this.sleepMilli() < 1) { + if (this._sleepMilliSet && this.sleepMilli() < 1) { throw new IllegalArgumentException( "`sleepMilli` must be greater than or equal to 1" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java index c87c488b7f..4752a7cb80 100644 --- a/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java +++ b/AwsCryptographicMaterialProviders/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/materialproviders/model/UpdateUsageMetadataInput.java @@ -10,7 +10,7 @@ public class UpdateUsageMetadataInput { private final ByteBuffer identifier; - private final Integer bytesUsed; + private final int bytesUsed; protected UpdateUsageMetadataInput(BuilderImpl builder) { this.identifier = builder.identifier(); @@ -21,7 +21,7 @@ public ByteBuffer identifier() { return this.identifier; } - public Integer bytesUsed() { + public int bytesUsed() { return this.bytesUsed; } @@ -38,9 +38,9 @@ public interface Builder { ByteBuffer identifier(); - Builder bytesUsed(Integer bytesUsed); + Builder bytesUsed(int bytesUsed); - Integer bytesUsed(); + int bytesUsed(); UpdateUsageMetadataInput build(); } @@ -49,13 +49,16 @@ static class BuilderImpl implements Builder { protected ByteBuffer identifier; - protected Integer bytesUsed; + protected int bytesUsed; + + private boolean _bytesUsedSet = false; protected BuilderImpl() {} protected BuilderImpl(UpdateUsageMetadataInput model) { this.identifier = model.identifier(); this.bytesUsed = model.bytesUsed(); + this._bytesUsedSet = true; } public Builder identifier(ByteBuffer identifier) { @@ -67,12 +70,13 @@ public ByteBuffer identifier() { return this.identifier; } - public Builder bytesUsed(Integer bytesUsed) { + public Builder bytesUsed(int bytesUsed) { this.bytesUsed = bytesUsed; + this._bytesUsedSet = true; return this; } - public Integer bytesUsed() { + public int bytesUsed() { return this.bytesUsed; } @@ -82,12 +86,12 @@ public UpdateUsageMetadataInput build() { "Missing value for required field `identifier`" ); } - if (Objects.isNull(this.bytesUsed())) { + if (!this._bytesUsedSet) { throw new IllegalArgumentException( "Missing value for required field `bytesUsed`" ); } - if (Objects.nonNull(this.bytesUsed()) && this.bytesUsed() < 0) { + if (this._bytesUsedSet && this.bytesUsed() < 0) { throw new IllegalArgumentException( "`bytesUsed` must be greater than or equal to 0" ); diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs index 2db1698f4a..4463652497 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographicMaterialProviders/TypeConversion.cs @@ -30,12 +30,12 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteId concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.AlgorithmSuiteId)value; var converted = new AWS.Cryptography.MaterialProviders.AlgorithmSuiteId(); if (value.is_ESDK) { - converted.ESDK = (AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M4_ESDK(concrete.dtor_ESDK)); + converted.ESDK = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M4_ESDK(concrete.dtor_ESDK); return converted; } if (value.is_DBE) { - converted.DBE = (AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(concrete.dtor_DBE)); + converted.DBE = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(concrete.dtor_DBE); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.AlgorithmSuiteId state"); @@ -88,32 +88,32 @@ public static AWS.Cryptography.MaterialProviders.CacheType FromDafny_N3_aws__N12 software.amazon.cryptography.materialproviders.internaldafny.types.CacheType concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.CacheType)value; var converted = new AWS.Cryptography.MaterialProviders.CacheType(); if (value.is_Default) { - converted.Default = (AWS.Cryptography.MaterialProviders.DefaultCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(concrete.dtor_Default)); + converted.Default = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(concrete.dtor_Default); return converted; } if (value.is_No) { - converted.No = (AWS.Cryptography.MaterialProviders.NoCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(concrete.dtor_No)); + converted.No = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(concrete.dtor_No); return converted; } if (value.is_SingleThreaded) { - converted.SingleThreaded = (AWS.Cryptography.MaterialProviders.SingleThreadedCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(concrete.dtor_SingleThreaded)); + converted.SingleThreaded = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(concrete.dtor_SingleThreaded); return converted; } if (value.is_MultiThreaded) { - converted.MultiThreaded = (AWS.Cryptography.MaterialProviders.MultiThreadedCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(concrete.dtor_MultiThreaded)); + converted.MultiThreaded = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(concrete.dtor_MultiThreaded); return converted; } if (value.is_StormTracking) { - converted.StormTracking = (AWS.Cryptography.MaterialProviders.StormTrackingCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(concrete.dtor_StormTracking)); + converted.StormTracking = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(concrete.dtor_StormTracking); return converted; } if (value.is_Shared) { - converted.Shared = (AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(concrete.dtor_Shared)); + converted.Shared = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(concrete.dtor_Shared); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.CacheType state"); @@ -151,12 +151,12 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a software.amazon.cryptography.materialproviders.internaldafny.types.CommitmentPolicy concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.CommitmentPolicy)value; var converted = new AWS.Cryptography.MaterialProviders.CommitmentPolicy(); if (value.is_ESDK) { - converted.ESDK = (AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(concrete.dtor_ESDK)); + converted.ESDK = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(concrete.dtor_ESDK); return converted; } if (value.is_DBE) { - converted.DBE = (AWS.Cryptography.MaterialProviders.DBECommitmentPolicy)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(concrete.dtor_DBE)); + converted.DBE = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(concrete.dtor_DBE); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.CommitmentPolicy state"); @@ -544,17 +544,17 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.DerivationAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.DerivationAlgorithm(); if (value.is_HKDF) { - converted.HKDF = (AWS.Cryptography.MaterialProviders.HKDF)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(concrete.dtor_HKDF)); + converted.HKDF = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(concrete.dtor_HKDF); return converted; } if (value.is_IDENTITY) { - converted.IDENTITY = (AWS.Cryptography.MaterialProviders.IDENTITY)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(concrete.dtor_IDENTITY)); + converted.IDENTITY = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(concrete.dtor_IDENTITY); return converted; } if (value.is_None) { - converted.None = (AWS.Cryptography.MaterialProviders.None)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(concrete.dtor_None)); + converted.None = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(concrete.dtor_None); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.DerivationAlgorithm state"); @@ -580,12 +580,12 @@ public static AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm FromDafny_ software.amazon.cryptography.materialproviders.internaldafny.types.EdkWrappingAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.EdkWrappingAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm(); if (value.is_DIRECT__KEY__WRAPPING) { - converted.DIRECT__KEY__WRAPPING = (AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(concrete.dtor_DIRECT__KEY__WRAPPING)); + converted.DIRECT__KEY__WRAPPING = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(concrete.dtor_DIRECT__KEY__WRAPPING); return converted; } if (value.is_IntermediateKeyWrapping) { - converted.IntermediateKeyWrapping = (AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(concrete.dtor_IntermediateKeyWrapping)); + converted.IntermediateKeyWrapping = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(concrete.dtor_IntermediateKeyWrapping); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm state"); @@ -607,7 +607,7 @@ public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_c software.amazon.cryptography.materialproviders.internaldafny.types.Encrypt concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.Encrypt)value; var converted = new AWS.Cryptography.MaterialProviders.Encrypt(); if (value.is_AES__GCM) { - converted.AES__GCM = (AWS.Cryptography.Primitives.AES_GCM)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(concrete.dtor_AES__GCM)); + converted.AES__GCM = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(concrete.dtor_AES__GCM); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.Encrypt state"); @@ -941,7 +941,7 @@ public static AWS.Cryptography.MaterialProviders.KeyAgreementScheme FromDafny_N3 software.amazon.cryptography.materialproviders.internaldafny.types.KeyAgreementScheme concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.KeyAgreementScheme)value; var converted = new AWS.Cryptography.MaterialProviders.KeyAgreementScheme(); if (value.is_StaticConfiguration) { - converted.StaticConfiguration = (AWS.Cryptography.MaterialProviders.StaticConfigurations)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(concrete.dtor_StaticConfiguration)); + converted.StaticConfiguration = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(concrete.dtor_StaticConfiguration); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.KeyAgreementScheme state"); @@ -959,12 +959,12 @@ public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations Fro software.amazon.cryptography.materialproviders.internaldafny.types.KmsEcdhStaticConfigurations concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.KmsEcdhStaticConfigurations)value; var converted = new AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations(); if (value.is_KmsPublicKeyDiscovery) { - converted.KmsPublicKeyDiscovery = (AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(concrete.dtor_KmsPublicKeyDiscovery)); + converted.KmsPublicKeyDiscovery = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(concrete.dtor_KmsPublicKeyDiscovery); return converted; } if (value.is_KmsPrivateKeyToStaticPublicKey) { - converted.KmsPrivateKeyToStaticPublicKey = (AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(concrete.dtor_KmsPrivateKeyToStaticPublicKey)); + converted.KmsPrivateKeyToStaticPublicKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(concrete.dtor_KmsPrivateKeyToStaticPublicKey); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations state"); @@ -996,22 +996,22 @@ public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12 software.amazon.cryptography.materialproviders.internaldafny.types.Materials concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.Materials)value; var converted = new AWS.Cryptography.MaterialProviders.Materials(); if (value.is_Encryption) { - converted.Encryption = (AWS.Cryptography.MaterialProviders.EncryptionMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(concrete.dtor_Encryption)); + converted.Encryption = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(concrete.dtor_Encryption); return converted; } if (value.is_Decryption) { - converted.Decryption = (AWS.Cryptography.MaterialProviders.DecryptionMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(concrete.dtor_Decryption)); + converted.Decryption = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(concrete.dtor_Decryption); return converted; } if (value.is_BranchKey) { - converted.BranchKey = (AWS.Cryptography.KeyStore.BranchKeyMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(concrete.dtor_BranchKey)); + converted.BranchKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(concrete.dtor_BranchKey); return converted; } if (value.is_BeaconKey) { - converted.BeaconKey = (AWS.Cryptography.KeyStore.BeaconKeyMaterials)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(concrete.dtor_BeaconKey)); + converted.BeaconKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(concrete.dtor_BeaconKey); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.Materials state"); @@ -1116,17 +1116,17 @@ public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations Fro software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.RawEcdhStaticConfigurations)value; var converted = new AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations(); if (value.is_PublicKeyDiscovery) { - converted.PublicKeyDiscovery = (AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M18_PublicKeyDiscovery(concrete.dtor_PublicKeyDiscovery)); + converted.PublicKeyDiscovery = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M18_PublicKeyDiscovery(concrete.dtor_PublicKeyDiscovery); return converted; } if (value.is_RawPrivateKeyToStaticPublicKey) { - converted.RawPrivateKeyToStaticPublicKey = (AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(concrete.dtor_RawPrivateKeyToStaticPublicKey)); + converted.RawPrivateKeyToStaticPublicKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(concrete.dtor_RawPrivateKeyToStaticPublicKey); return converted; } if (value.is_EphemeralPrivateKeyToStaticPublicKey) { - converted.EphemeralPrivateKeyToStaticPublicKey = (AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(concrete.dtor_EphemeralPrivateKeyToStaticPublicKey)); + converted.EphemeralPrivateKeyToStaticPublicKey = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(concrete.dtor_EphemeralPrivateKeyToStaticPublicKey); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations state"); @@ -1152,12 +1152,12 @@ public static AWS.Cryptography.MaterialProviders.SignatureAlgorithm FromDafny_N3 software.amazon.cryptography.materialproviders.internaldafny.types.SignatureAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.SignatureAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.SignatureAlgorithm(); if (value.is_ECDSA) { - converted.ECDSA = (AWS.Cryptography.MaterialProviders.ECDSA)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(concrete.dtor_ECDSA)); + converted.ECDSA = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(concrete.dtor_ECDSA); return converted; } if (value.is_None) { - converted.None = (AWS.Cryptography.MaterialProviders.None)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(concrete.dtor_None)); + converted.None = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(concrete.dtor_None); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.SignatureAlgorithm state"); @@ -1179,12 +1179,12 @@ public static AWS.Cryptography.MaterialProviders.StaticConfigurations FromDafny_ software.amazon.cryptography.materialproviders.internaldafny.types.StaticConfigurations concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.StaticConfigurations)value; var converted = new AWS.Cryptography.MaterialProviders.StaticConfigurations(); if (value.is_AWS__KMS__ECDH) { - converted.AWS__KMS__ECDH = (AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(concrete.dtor_AWS__KMS__ECDH)); + converted.AWS__KMS__ECDH = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(concrete.dtor_AWS__KMS__ECDH); return converted; } if (value.is_RAW__ECDH) { - converted.RAW__ECDH = (AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(concrete.dtor_RAW__ECDH)); + converted.RAW__ECDH = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(concrete.dtor_RAW__ECDH); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.StaticConfigurations state"); @@ -1206,12 +1206,12 @@ public static AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm Fro software.amazon.cryptography.materialproviders.internaldafny.types.SymmetricSignatureAlgorithm concrete = (software.amazon.cryptography.materialproviders.internaldafny.types.SymmetricSignatureAlgorithm)value; var converted = new AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm(); if (value.is_HMAC) { - converted.HMAC = (AWS.Cryptography.Primitives.DigestAlgorithm)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(concrete.dtor_HMAC)); + converted.HMAC = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(concrete.dtor_HMAC); return converted; } if (value.is_None) { - converted.None = (AWS.Cryptography.MaterialProviders.None)(FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(concrete.dtor_None)); + converted.None = FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(concrete.dtor_None); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm state"); @@ -1301,7 +1301,7 @@ public static AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IESDKAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M4_ESDK(AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKAlgorithmSuiteId((AWS.Cryptography.MaterialProviders.ESDKAlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKAlgorithmSuiteId(value); } public static AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(software.amazon.cryptography.materialproviders.internaldafny.types._IDBEAlgorithmSuiteId value) { @@ -1309,7 +1309,7 @@ public static AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDBEAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId__M3_DBE(AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBEAlgorithmSuiteId((AWS.Cryptography.MaterialProviders.DBEAlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBEAlgorithmSuiteId(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M2_id(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -1317,7 +1317,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M2_id(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M8_binaryId(Dafny.ISequence value) { @@ -1325,15 +1325,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M8_binaryId(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int value) { return FromDafny_N6_smithy__N3_api__S7_Integer(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M14_messageVersion(int value) { - return ToDafny_N6_smithy__N3_api__S7_Integer((int)value); + return ToDafny_N6_smithy__N3_api__S7_Integer(value); } public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M7_encrypt(software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt value) { @@ -1341,7 +1341,7 @@ public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M7_encrypt(AWS.Cryptography.MaterialProviders.Encrypt value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt((AWS.Cryptography.MaterialProviders.Encrypt)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt(value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M3_kdf(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -1349,7 +1349,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M3_kdf(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M10_commitment(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -1357,7 +1357,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M10_commitment(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.SignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M9_signature(software.amazon.cryptography.materialproviders.internaldafny.types._ISignatureAlgorithm value) { @@ -1365,7 +1365,7 @@ public static AWS.Cryptography.MaterialProviders.SignatureAlgorithm FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._ISignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M9_signature(AWS.Cryptography.MaterialProviders.SignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm((AWS.Cryptography.MaterialProviders.SignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M18_symmetricSignature(software.amazon.cryptography.materialproviders.internaldafny.types._ISymmetricSignatureAlgorithm value) { @@ -1373,7 +1373,7 @@ public static AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._ISymmetricSignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M18_symmetricSignature(AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm((AWS.Cryptography.MaterialProviders.SymmetricSignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M11_edkWrapping(software.amazon.cryptography.materialproviders.internaldafny.types._IEdkWrappingAlgorithm value) { @@ -1381,7 +1381,7 @@ public static AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEdkWrappingAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo__M11_edkWrapping(AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm((AWS.Cryptography.MaterialProviders.EdkWrappingAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S42_AwsCryptographicMaterialProvidersException__M7_message(Dafny.ISequence value) { @@ -1389,7 +1389,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S42_AwsCryptographicMaterialProvidersException__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.MaterialProviders.DefaultCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(software.amazon.cryptography.materialproviders.internaldafny.types._IDefaultCache value) { @@ -1397,7 +1397,7 @@ public static AWS.Cryptography.MaterialProviders.DefaultCache FromDafny_N3_aws__ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDefaultCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M7_Default(AWS.Cryptography.MaterialProviders.DefaultCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache((AWS.Cryptography.MaterialProviders.DefaultCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache(value); } public static AWS.Cryptography.MaterialProviders.NoCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(software.amazon.cryptography.materialproviders.internaldafny.types._INoCache value) { @@ -1405,7 +1405,7 @@ public static AWS.Cryptography.MaterialProviders.NoCache FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.materialproviders.internaldafny.types._INoCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M2_No(AWS.Cryptography.MaterialProviders.NoCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_NoCache((AWS.Cryptography.MaterialProviders.NoCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_NoCache(value); } public static AWS.Cryptography.MaterialProviders.SingleThreadedCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(software.amazon.cryptography.materialproviders.internaldafny.types._ISingleThreadedCache value) { @@ -1413,7 +1413,7 @@ public static AWS.Cryptography.MaterialProviders.SingleThreadedCache FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._ISingleThreadedCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M14_SingleThreaded(AWS.Cryptography.MaterialProviders.SingleThreadedCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache((AWS.Cryptography.MaterialProviders.SingleThreadedCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache(value); } public static AWS.Cryptography.MaterialProviders.MultiThreadedCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(software.amazon.cryptography.materialproviders.internaldafny.types._IMultiThreadedCache value) { @@ -1421,7 +1421,7 @@ public static AWS.Cryptography.MaterialProviders.MultiThreadedCache FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IMultiThreadedCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_MultiThreaded(AWS.Cryptography.MaterialProviders.MultiThreadedCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache((AWS.Cryptography.MaterialProviders.MultiThreadedCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache(value); } public static AWS.Cryptography.MaterialProviders.StormTrackingCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(software.amazon.cryptography.materialproviders.internaldafny.types._IStormTrackingCache value) { @@ -1429,7 +1429,7 @@ public static AWS.Cryptography.MaterialProviders.StormTrackingCache FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IStormTrackingCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M13_StormTracking(AWS.Cryptography.MaterialProviders.StormTrackingCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache((AWS.Cryptography.MaterialProviders.StormTrackingCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache(value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache value) { @@ -1437,7 +1437,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache Fr } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType__M6_Shared(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference(value); } public static AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(software.amazon.cryptography.materialproviders.internaldafny.types._IESDKCommitmentPolicy value) { @@ -1445,7 +1445,7 @@ public static AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IESDKCommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M4_ESDK(AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKCommitmentPolicy((AWS.Cryptography.MaterialProviders.ESDKCommitmentPolicy)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_ESDKCommitmentPolicy(value); } public static AWS.Cryptography.MaterialProviders.DBECommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(software.amazon.cryptography.materialproviders.internaldafny.types._IDBECommitmentPolicy value) { @@ -1453,7 +1453,7 @@ public static AWS.Cryptography.MaterialProviders.DBECommitmentPolicy FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDBECommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy__M3_DBE(AWS.Cryptography.MaterialProviders.DBECommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBECommitmentPolicy((AWS.Cryptography.MaterialProviders.DBECommitmentPolicy)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DBECommitmentPolicy(value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateAwsKmsDiscoveryKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1461,7 +1461,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateAwsKmsDiscoveryKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateAwsKmsDiscoveryKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1485,7 +1485,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CreateAwsKmsDiscoveryMultiKeyringInput__M7_regions(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList(value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CreateAwsKmsDiscoveryMultiKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1517,7 +1517,7 @@ public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M18_KeyAgreementScheme(AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_curveSpec(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1525,7 +1525,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_curveSpec(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1533,7 +1533,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_CreateAwsKmsEcdhKeyringInput__M11_grantTokens(Wrappers_Compile._IOption>> value) { @@ -1565,15 +1565,15 @@ public static AWS.Cryptography.KeyStore.KeyStore FromDafny_N3_aws__N12_cryptogra } public static software.amazon.cryptography.keystore.internaldafny.types.IKeyStoreClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M8_keyStore(AWS.Cryptography.KeyStore.KeyStore value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_KeyStoreReference((AWS.Cryptography.KeyStore.KeyStore)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_KeyStoreReference(value); } - public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long value) + public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long? value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M10_ttlSeconds(long value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } public static AWS.Cryptography.MaterialProviders.CacheType FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsHierarchicalKeyringInput__M5_cache(Wrappers_Compile._IOption value) { @@ -1597,7 +1597,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M8_kmsKeyId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1605,7 +1605,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateAwsKmsKeyringInput__M11_grantTokens(Wrappers_Compile._IOption>> value) { @@ -1621,7 +1621,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsMrkDiscoveryKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsMrkDiscoveryKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1645,7 +1645,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CreateAwsKmsMrkDiscoveryKeyringInput__M6_region(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateAwsKmsMrkDiscoveryMultiKeyringInput__M7_regions(Dafny.ISequence> value) { @@ -1653,7 +1653,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateAwsKmsMrkDiscoveryMultiKeyringInput__M7_regions(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList(value); } public static AWS.Cryptography.MaterialProviders.DiscoveryFilter FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateAwsKmsMrkDiscoveryMultiKeyringInput__M15_discoveryFilter(Wrappers_Compile._IOption value) { @@ -1685,7 +1685,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M8_kmsKeyId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M9_kmsClient(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -1693,7 +1693,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M9_kmsClient(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsMrkKeyringInput__M11_grantTokens(Wrappers_Compile._IOption>> value) { @@ -1781,7 +1781,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M8_kmsKeyId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); } public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M19_encryptionAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec value) { @@ -1789,7 +1789,7 @@ public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M19_encryptionAlgorithm(Amazon.KeyManagementService.EncryptionAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec((Amazon.KeyManagementService.EncryptionAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec(value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_CreateAwsKmsRsaKeyringInput__M9_kmsClient(Wrappers_Compile._IOption value) { @@ -1813,7 +1813,7 @@ public static AWS.Cryptography.MaterialProviders.CacheType FromDafny_N3_aws__N12 } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICacheType ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CreateCryptographicMaterialsCacheInput__M5_cache(AWS.Cryptography.MaterialProviders.CacheType value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType((AWS.Cryptography.MaterialProviders.CacheType)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_CacheType(value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_CreateCryptographicMaterialsCacheOutput__M14_materialsCache(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache value) { @@ -1821,7 +1821,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache Fr } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsCache ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_CreateCryptographicMaterialsCacheOutput__M14_materialsCache(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsCache)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_CryptographicMaterialsCacheReference(value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateCryptographicMaterialsManagerOutput__M16_materialsManager(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager value) { @@ -1829,7 +1829,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_CreateCryptographicMaterialsManagerOutput__M16_materialsManager(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference(value); } public static AWS.Cryptography.MaterialProviders.IClientSupplier FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateDefaultClientSupplierOutput__M6_client(software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier value) { @@ -1837,7 +1837,7 @@ public static AWS.Cryptography.MaterialProviders.IClientSupplier FromDafny_N3_aw } public static software.amazon.cryptography.materialproviders.internaldafny.types.IClientSupplier ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S33_CreateDefaultClientSupplierOutput__M6_client(AWS.Cryptography.MaterialProviders.IClientSupplier value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_ClientSupplierReference((AWS.Cryptography.MaterialProviders.IClientSupplier)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_ClientSupplierReference(value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S47_CreateDefaultCryptographicMaterialsManagerInput__M7_keyring(software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring value) { @@ -1845,7 +1845,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S47_CreateDefaultCryptographicMaterialsManagerInput__M7_keyring(AWS.Cryptography.MaterialProviders.IKeyring value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference((AWS.Cryptography.MaterialProviders.IKeyring)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference(value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_CreateKeyringOutput__M7_keyring(software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring value) { @@ -1853,7 +1853,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_CreateKeyringOutput__M7_keyring(AWS.Cryptography.MaterialProviders.IKeyring value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference((AWS.Cryptography.MaterialProviders.IKeyring)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference(value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_CreateMultiKeyringInput__M9_generator(Wrappers_Compile._IOption value) { @@ -1869,7 +1869,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_CreateMultiKeyringInput__M13_childKeyrings(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M12_keyNamespace(Dafny.ISequence value) { @@ -1877,7 +1877,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M12_keyNamespace(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M7_keyName(Dafny.ISequence value) { @@ -1885,7 +1885,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M7_keyName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingKey(Dafny.ISequence value) { @@ -1893,7 +1893,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.MaterialProviders.AesWrappingAlg FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingAlg(software.amazon.cryptography.materialproviders.internaldafny.types._IAesWrappingAlg value) { @@ -1901,7 +1901,7 @@ public static AWS.Cryptography.MaterialProviders.AesWrappingAlg FromDafny_N3_aws } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAesWrappingAlg ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawAesKeyringInput__M11_wrappingAlg(AWS.Cryptography.MaterialProviders.AesWrappingAlg value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_AesWrappingAlg((AWS.Cryptography.MaterialProviders.AesWrappingAlg)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_AesWrappingAlg(value); } public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M18_KeyAgreementScheme(software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations value) { @@ -1909,7 +1909,7 @@ public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M18_KeyAgreementScheme(AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M9_curveSpec(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1917,7 +1917,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_CreateRawEcdhKeyringInput__M9_curveSpec(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M12_keyNamespace(Dafny.ISequence value) { @@ -1925,7 +1925,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M12_keyNamespace(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M7_keyName(Dafny.ISequence value) { @@ -1933,7 +1933,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M7_keyName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.MaterialProviders.PaddingScheme FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M13_paddingScheme(software.amazon.cryptography.materialproviders.internaldafny.types._IPaddingScheme value) { @@ -1941,7 +1941,7 @@ public static AWS.Cryptography.MaterialProviders.PaddingScheme FromDafny_N3_aws_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IPaddingScheme ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M13_paddingScheme(AWS.Cryptography.MaterialProviders.PaddingScheme value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_PaddingScheme((AWS.Cryptography.MaterialProviders.PaddingScheme)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_PaddingScheme(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_CreateRawRsaKeyringInput__M9_publicKey(Wrappers_Compile._IOption> value) { @@ -1981,7 +1981,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_CreateRequiredEncryptionContextCMMInput__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); } public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S40_CreateRequiredEncryptionContextCMMOutput__M16_materialsManager(software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager value) { @@ -1989,7 +1989,7 @@ public static AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager } public static software.amazon.cryptography.materialproviders.internaldafny.types.ICryptographicMaterialsManager ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S40_CreateRequiredEncryptionContextCMMOutput__M16_materialsManager(AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference((AWS.Cryptography.MaterialProviders.ICryptographicMaterialsManager)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_CryptographicMaterialsManagerReference(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M14_algorithmSuite(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo value) { @@ -1997,7 +1997,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M14_algorithmSuite(AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo((AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2005,7 +2005,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2013,7 +2013,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials__M16_plaintextDataKey(Wrappers_Compile._IOption> value) { @@ -2045,7 +2045,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M16_algorithmSuiteId(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2053,7 +2053,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptedDataKeys(Dafny.ISequence value) { @@ -2061,7 +2061,7 @@ public static software.amazon.cryptography.materialproviders.internaldafny.types } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptedDataKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2069,7 +2069,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DecryptMaterialsInput__M27_reproducedEncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -2085,7 +2085,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S22_DecryptMaterialsOutput__M19_decryptionMaterials(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DeleteCacheEntryInput__M10_identifier(Dafny.ISequence value) { @@ -2093,7 +2093,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_DeleteCacheEntryInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.MaterialProviders.HKDF FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(software.amazon.cryptography.materialproviders.internaldafny.types._IHKDF value) { @@ -2101,7 +2101,7 @@ public static AWS.Cryptography.MaterialProviders.HKDF FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._IHKDF ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_HKDF(AWS.Cryptography.MaterialProviders.HKDF value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF((AWS.Cryptography.MaterialProviders.HKDF)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF(value); } public static AWS.Cryptography.MaterialProviders.IDENTITY FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(software.amazon.cryptography.materialproviders.internaldafny.types._IIDENTITY value) { @@ -2109,7 +2109,7 @@ public static AWS.Cryptography.MaterialProviders.IDENTITY FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IIDENTITY ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M8_IDENTITY(AWS.Cryptography.MaterialProviders.IDENTITY value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_IDENTITY((AWS.Cryptography.MaterialProviders.IDENTITY)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_IDENTITY(value); } public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(software.amazon.cryptography.materialproviders.internaldafny.types._INone value) { @@ -2117,7 +2117,7 @@ public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._INone ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm__M4_None(AWS.Cryptography.MaterialProviders.None value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None((AWS.Cryptography.MaterialProviders.None)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None(value); } public static AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(software.amazon.cryptography.materialproviders.internaldafny.types._IDIRECT__KEY__WRAPPING value) { @@ -2125,7 +2125,7 @@ public static AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDIRECT__KEY__WRAPPING ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M19_DIRECT_KEY_WRAPPING(AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DIRECT_KEY_WRAPPING((AWS.Cryptography.MaterialProviders.DIRECT_KEY_WRAPPING)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DIRECT_KEY_WRAPPING(value); } public static AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(software.amazon.cryptography.materialproviders.internaldafny.types._IIntermediateKeyWrapping value) { @@ -2133,7 +2133,7 @@ public static AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping FromDaf } public static software.amazon.cryptography.materialproviders.internaldafny.types._IIntermediateKeyWrapping ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EdkWrappingAlgorithm__M23_IntermediateKeyWrapping(AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping((AWS.Cryptography.MaterialProviders.IntermediateKeyWrapping)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping(value); } public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM value) { @@ -2141,7 +2141,7 @@ public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt__M7_AES_GCM(AWS.Cryptography.Primitives.AES_GCM value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM((AWS.Cryptography.Primitives.AES_GCM)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M14_algorithmSuite(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo value) { @@ -2149,7 +2149,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo FromDafny_N3 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteInfo ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M14_algorithmSuite(AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo((AWS.Cryptography.MaterialProviders.AlgorithmSuiteInfo)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_AlgorithmSuiteInfo(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2157,7 +2157,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptedDataKeys(Dafny.ISequence value) { @@ -2165,7 +2165,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M17_encryptedDataKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2173,7 +2173,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials__M16_plaintextDataKey(Wrappers_Compile._IOption> value) { @@ -2205,7 +2205,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_EntryAlreadyExists__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EntryDoesNotExist__M7_message(Dafny.ISequence value) { @@ -2213,7 +2213,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EntryDoesNotExist__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_GetAlgorithmSuiteInfoInput__M8_binaryId(Dafny.ISequence value) { @@ -2221,7 +2221,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_GetAlgorithmSuiteInfoInput__M8_binaryId(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetBranchKeyIdInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2229,7 +2229,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetBranchKeyIdInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_GetBranchKeyIdOutput__M11_branchKeyId(Dafny.ISequence value) { @@ -2237,7 +2237,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_GetBranchKeyIdOutput__M11_branchKeyId(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_GetCacheEntryInput__M10_identifier(Dafny.ISequence value) { @@ -2245,7 +2245,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_GetCacheEntryInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_GetCacheEntryInput__M9_bytesUsed(Wrappers_Compile._IOption value) { @@ -2261,39 +2261,39 @@ public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_materials(AWS.Cryptography.MaterialProviders.Materials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials((AWS.Cryptography.MaterialProviders.Materials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials(value); } - public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long value) + public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long? value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_creationTime(long value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long value) + public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long? value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M10_expiryTime(long value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M12_messagesUsed(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_GetCacheEntryOutput__M9_bytesUsed(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GetClientInput__M6_region(Dafny.ISequence value) { @@ -2301,7 +2301,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GetClientInput__M6_region(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region(value); } public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_GetClientOutput__M6_client(software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient value) { @@ -2309,7 +2309,7 @@ public static Amazon.KeyManagementService.IAmazonKeyManagementService FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.IKMSClient ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_GetClientOutput__M6_client(Amazon.KeyManagementService.IAmazonKeyManagementService value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference((Amazon.KeyManagementService.IAmazonKeyManagementService)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KmsClientReference(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2317,7 +2317,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2325,7 +2325,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_GetEncryptionMaterialsInput__M16_algorithmSuiteId(Wrappers_Compile._IOption value) { @@ -2357,7 +2357,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S28_GetEncryptionMaterialsOutput__M19_encryptionMaterials(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_InFlightTTLExceeded__M7_message(Dafny.ISequence value) { @@ -2365,7 +2365,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_InFlightTTLExceeded__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M16_algorithmSuiteId(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2373,7 +2373,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M16_algorithmSuiteId(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2381,7 +2381,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2389,7 +2389,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeDecryptionMaterialsInput__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M16_algorithmSuiteId(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2397,7 +2397,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M16_algorithmSuiteId(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -2405,7 +2405,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M29_requiredEncryptionContextKeys(Dafny.ISequence> value) { @@ -2413,7 +2413,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M29_requiredEncryptionContextKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InitializeEncryptionMaterialsInput__M10_signingKey(Wrappers_Compile._IOption> value) { @@ -2437,7 +2437,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S25_InvalidAlgorithmSuiteInfo__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnDecrypt__M7_message(Dafny.ISequence value) { @@ -2445,7 +2445,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnDecrypt__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnEncrypt__M7_message(Dafny.ISequence value) { @@ -2453,7 +2453,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S34_InvalidAlgorithmSuiteInfoOnEncrypt__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidDecryptionMaterials__M7_message(Dafny.ISequence value) { @@ -2461,7 +2461,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidDecryptionMaterials__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidDecryptionMaterialsTransition__M7_message(Dafny.ISequence value) { @@ -2469,7 +2469,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidDecryptionMaterialsTransition__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidEncryptionMaterials__M7_message(Dafny.ISequence value) { @@ -2477,7 +2477,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_InvalidEncryptionMaterials__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidEncryptionMaterialsTransition__M7_message(Dafny.ISequence value) { @@ -2485,7 +2485,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S36_InvalidEncryptionMaterialsTransition__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.MaterialProviders.StaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(software.amazon.cryptography.materialproviders.internaldafny.types._IStaticConfigurations value) { @@ -2493,7 +2493,7 @@ public static AWS.Cryptography.MaterialProviders.StaticConfigurations FromDafny_ } public static software.amazon.cryptography.materialproviders.internaldafny.types._IStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_KeyAgreementScheme__M19_StaticConfiguration(AWS.Cryptography.MaterialProviders.StaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations((AWS.Cryptography.MaterialProviders.StaticConfigurations)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations(value); } public static AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPublicKeyDiscoveryInput value) { @@ -2501,7 +2501,7 @@ public static AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput From } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPublicKeyDiscoveryInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M21_KmsPublicKeyDiscovery(AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput((AWS.Cryptography.MaterialProviders.KmsPublicKeyDiscoveryInput)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput(value); } public static AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPrivateKeyToStaticPublicKeyInput value) { @@ -2509,7 +2509,7 @@ public static AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyI } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsPrivateKeyToStaticPublicKeyInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations__M30_KmsPrivateKeyToStaticPublicKey(AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput((AWS.Cryptography.MaterialProviders.KmsPrivateKeyToStaticPublicKeyInput)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput(value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2517,7 +2517,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Encryption(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2525,7 +2525,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M10_Decryption(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); } public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials value) { @@ -2533,7 +2533,7 @@ public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BranchKey(AWS.Cryptography.KeyStore.BranchKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials((AWS.Cryptography.KeyStore.BranchKeyMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials(value); } public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials value) { @@ -2541,7 +2541,7 @@ public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials__M9_BeaconKey(AWS.Cryptography.KeyStore.BeaconKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials((AWS.Cryptography.KeyStore.BeaconKeyMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials(value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2549,7 +2549,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M9_materials(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M17_encryptedDataKeys(Dafny.ISequence value) { @@ -2557,7 +2557,7 @@ public static software.amazon.cryptography.materialproviders.internaldafny.types } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnDecryptInput__M17_encryptedDataKeys(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList(value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnDecryptOutput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2565,7 +2565,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnDecryptOutput__M9_materials(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnEncryptInput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2573,7 +2573,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_OnEncryptInput__M9_materials(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnEncryptOutput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2581,7 +2581,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_OnEncryptOutput__M9_materials(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_identifier(Dafny.ISequence value) { @@ -2589,7 +2589,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M9_materials(software.amazon.cryptography.materialproviders.internaldafny.types._IMaterials value) { @@ -2597,23 +2597,23 @@ public static AWS.Cryptography.MaterialProviders.Materials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.materialproviders.internaldafny.types._IMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M9_materials(AWS.Cryptography.MaterialProviders.Materials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials((AWS.Cryptography.MaterialProviders.Materials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Materials(value); } - public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long value) + public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long? value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_creationTime(long value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long value) + public static long FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } - public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long? value) + public static long ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M10_expiryTime(long value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong((long)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_PositiveLong(value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_PutCacheEntryInput__M12_messagesUsed(Wrappers_Compile._IOption value) { @@ -2637,7 +2637,7 @@ public static AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput FromDaf } public static software.amazon.cryptography.materialproviders.internaldafny.types._IPublicKeyDiscoveryInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M18_PublicKeyDiscovery(AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_PublicKeyDiscoveryInput((AWS.Cryptography.MaterialProviders.PublicKeyDiscoveryInput)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_PublicKeyDiscoveryInput(value); } public static AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(software.amazon.cryptography.materialproviders.internaldafny.types._IRawPrivateKeyToStaticPublicKeyInput value) { @@ -2645,7 +2645,7 @@ public static AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyI } public static software.amazon.cryptography.materialproviders.internaldafny.types._IRawPrivateKeyToStaticPublicKeyInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M30_RawPrivateKeyToStaticPublicKey(AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput((AWS.Cryptography.MaterialProviders.RawPrivateKeyToStaticPublicKeyInput)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput(value); } public static AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(software.amazon.cryptography.materialproviders.internaldafny.types._IEphemeralPrivateKeyToStaticPublicKeyInput value) { @@ -2653,7 +2653,7 @@ public static AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPubl } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEphemeralPrivateKeyToStaticPublicKeyInput ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations__M36_EphemeralPrivateKeyToStaticPublicKey(AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput((AWS.Cryptography.MaterialProviders.EphemeralPrivateKeyToStaticPublicKeyInput)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput(value); } public static AWS.Cryptography.MaterialProviders.ECDSA FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(software.amazon.cryptography.materialproviders.internaldafny.types._IECDSA value) { @@ -2661,7 +2661,7 @@ public static AWS.Cryptography.MaterialProviders.ECDSA FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.materialproviders.internaldafny.types._IECDSA ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M5_ECDSA(AWS.Cryptography.MaterialProviders.ECDSA value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA((AWS.Cryptography.MaterialProviders.ECDSA)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA(value); } public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(software.amazon.cryptography.materialproviders.internaldafny.types._INone value) { @@ -2669,7 +2669,7 @@ public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._INone ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_SignatureAlgorithm__M4_None(AWS.Cryptography.MaterialProviders.None value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None((AWS.Cryptography.MaterialProviders.None)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None(value); } public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(software.amazon.cryptography.materialproviders.internaldafny.types._IKmsEcdhStaticConfigurations value) { @@ -2677,7 +2677,7 @@ public static AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IKmsEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M12_AWS_KMS_ECDH(AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.KmsEcdhStaticConfigurations)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_KmsEcdhStaticConfigurations(value); } public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations value) { @@ -2685,7 +2685,7 @@ public static AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations Fro } public static software.amazon.cryptography.materialproviders.internaldafny.types._IRawEcdhStaticConfigurations ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_StaticConfigurations__M8_RAW_ECDH(AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations((AWS.Cryptography.MaterialProviders.RawEcdhStaticConfigurations)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_RawEcdhStaticConfigurations(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -2693,7 +2693,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_HMAC(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(software.amazon.cryptography.materialproviders.internaldafny.types._INone value) { @@ -2701,7 +2701,7 @@ public static AWS.Cryptography.MaterialProviders.None FromDafny_N3_aws__N12_cryp } public static software.amazon.cryptography.materialproviders.internaldafny.types._INone ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S27_SymmetricSignatureAlgorithm__M4_None(AWS.Cryptography.MaterialProviders.None value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None((AWS.Cryptography.MaterialProviders.None)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_None(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M10_identifier(Dafny.ISequence value) { @@ -2709,15 +2709,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M10_identifier(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S24_UpdateUsageMetadataInput__M9_bytesUsed(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_PositiveInteger(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M9_algorithm(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2725,7 +2725,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M9_algorithm(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2733,7 +2733,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnDecryptInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); } public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M9_algorithm(software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId value) { @@ -2741,7 +2741,7 @@ public static AWS.Cryptography.MaterialProviders.AlgorithmSuiteId FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IAlgorithmSuiteId ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M9_algorithm(AWS.Cryptography.MaterialProviders.AlgorithmSuiteId value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId((AWS.Cryptography.MaterialProviders.AlgorithmSuiteId)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_AlgorithmSuiteId(value); } public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M16_commitmentPolicy(software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy value) { @@ -2749,7 +2749,7 @@ public static AWS.Cryptography.MaterialProviders.CommitmentPolicy FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._ICommitmentPolicy ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S38_ValidateCommitmentPolicyOnEncryptInput__M16_commitmentPolicy(AWS.Cryptography.MaterialProviders.CommitmentPolicy value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy((AWS.Cryptography.MaterialProviders.CommitmentPolicy)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_CommitmentPolicy(value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M5_start(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2757,7 +2757,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M5_start(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); } public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M4_stop(software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials value) { @@ -2765,7 +2765,7 @@ public static AWS.Cryptography.MaterialProviders.DecryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDecryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidDecryptionMaterialsTransitionInput__M4_stop(AWS.Cryptography.MaterialProviders.DecryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials((AWS.Cryptography.MaterialProviders.DecryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DecryptionMaterials(value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M5_start(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2773,7 +2773,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M5_start(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); } public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M4_stop(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials value) { @@ -2781,7 +2781,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptionMaterials FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptionMaterials ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S39_ValidEncryptionMaterialsTransitionInput__M4_stop(AWS.Cryptography.MaterialProviders.EncryptionMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials((AWS.Cryptography.MaterialProviders.EncryptionMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_EncryptionMaterials(value); } public static System.IO.MemoryStream FromDafny_N6_smithy__N3_api__S4_Blob(Dafny.ISequence value) { @@ -3324,21 +3324,21 @@ public static software.amazon.cryptography.primitives.internaldafny.types._IDige if (AWS.Cryptography.Primitives.DigestAlgorithm.SHA_256.Equals(value)) return software.amazon.cryptography.primitives.internaldafny.types.DigestAlgorithm.create_SHA__256(); throw new System.ArgumentException("Invalid AWS.Cryptography.Primitives.DigestAlgorithm value"); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_DefaultCache__M13_entryCapacity(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M13_entryCapacity(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_SingleThreadedCache__M20_entryPruningTailSize(Wrappers_Compile._IOption value) { @@ -3348,13 +3348,13 @@ public static Wrappers_Compile._IOption ToDafny_N3_aws__N12_cryptography__N { return value == null ? Wrappers_Compile.Option.create_None() : Wrappers_Compile.Option.create_Some(ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value)); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M13_entryCapacity(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_MultiThreadedCache__M20_entryPruningTailSize(Wrappers_Compile._IOption value) { @@ -3364,13 +3364,13 @@ public static Wrappers_Compile._IOption ToDafny_N3_aws__N12_cryptography__N { return value == null ? Wrappers_Compile.Option.create_None() : Wrappers_Compile.Option.create_Some(ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value)); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_entryCapacity(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M20_entryPruningTailSize(Wrappers_Compile._IOption value) { @@ -3380,45 +3380,45 @@ public static Wrappers_Compile._IOption ToDafny_N3_aws__N12_cryptography__N { return value == null ? Wrappers_Compile.Option.create_None() : Wrappers_Compile.Option.create_Some(ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value)); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_gracePeriod(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M13_graceInterval(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M6_fanOut(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M11_inFlightTTL(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int value) { return FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M10_sleepMilli(int value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber((int)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(value); } public static AWS.Cryptography.MaterialProviders.TimeUnits FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S18_StormTrackingCache__M9_timeUnits(Wrappers_Compile._IOption value) { @@ -3434,7 +3434,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_DiscoveryFilter__M10_accountIds(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_AccountIdList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_AccountIdList(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_DiscoveryFilter__M9_partition(Dafny.ISequence value) { @@ -3442,7 +3442,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S15_DiscoveryFilter__M9_partition(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GrantTokenList__M6_member(Dafny.ISequence value) { @@ -3450,7 +3450,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_GrantTokenList__M6_member(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList__M6_member(Dafny.ISequence value) { @@ -3458,7 +3458,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S10_RegionList__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Region(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_KmsKeyIdList__M6_member(Dafny.ISequence value) { @@ -3466,7 +3466,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S12_KmsKeyIdList__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); } public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList__M6_member(software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring value) { @@ -3474,7 +3474,7 @@ public static AWS.Cryptography.MaterialProviders.IKeyring FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.materialproviders.internaldafny.types.IKeyring ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S11_KeyringList__M6_member(AWS.Cryptography.MaterialProviders.IKeyring value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference((AWS.Cryptography.MaterialProviders.IKeyring)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_KeyringReference(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys__M6_member(Dafny.ISequence value) { @@ -3482,7 +3482,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S21_EncryptionContextKeys__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M3_key(Dafny.ISequence value) { @@ -3490,7 +3490,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M3_key(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M5_value(Dafny.ISequence value) { @@ -3498,7 +3498,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S17_EncryptionContext__M5_value(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); } public static AWS.Cryptography.MaterialProviders.EncryptedDataKey FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList__M6_member(software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptedDataKey value) { @@ -3506,7 +3506,7 @@ public static AWS.Cryptography.MaterialProviders.EncryptedDataKey FromDafny_N3_a } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncryptedDataKey ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S20_EncryptedDataKeyList__M6_member(AWS.Cryptography.MaterialProviders.EncryptedDataKey value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey((AWS.Cryptography.MaterialProviders.EncryptedDataKey)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M4_hmac(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -3514,31 +3514,31 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M4_hmac(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M10_saltLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M14_inputKeyLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S4_HKDF__M15_outputKeyLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_keyEncryptionKeyKdf(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -3546,7 +3546,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_keyEncryptionKeyKdf(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M9_macKeyKdf(software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm value) { @@ -3554,7 +3554,7 @@ public static AWS.Cryptography.MaterialProviders.DerivationAlgorithm FromDafny_N } public static software.amazon.cryptography.materialproviders.internaldafny.types._IDerivationAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M9_macKeyKdf(AWS.Cryptography.MaterialProviders.DerivationAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm((AWS.Cryptography.MaterialProviders.DerivationAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S19_DerivationAlgorithm(value); } public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_pdkEncryptAlgorithm(software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt value) { @@ -3562,31 +3562,31 @@ public static AWS.Cryptography.MaterialProviders.Encrypt FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.materialproviders.internaldafny.types._IEncrypt ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_IntermediateKeyWrapping__M19_pdkEncryptAlgorithm(AWS.Cryptography.MaterialProviders.Encrypt value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt((AWS.Cryptography.MaterialProviders.Encrypt)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S7_Encrypt(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_SymmetricSigningKeyList__M6_member(Dafny.ISequence value) { @@ -3594,7 +3594,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_SymmetricSigningKeyList__M6_member(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Secret((System.IO.MemoryStream)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S6_Secret(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput__M22_recipientKmsIdentifier(Dafny.ISequence value) { @@ -3602,7 +3602,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S26_KmsPublicKeyDiscoveryInput__M22_recipientKmsIdentifier(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M19_senderKmsIdentifier(Dafny.ISequence value) { @@ -3610,7 +3610,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M19_senderKmsIdentifier(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S8_KmsKeyId(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M15_senderPublicKey(Wrappers_Compile._IOption> value) { @@ -3626,7 +3626,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_KmsPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -3634,7 +3634,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(Dafny.ISequence value) { @@ -3642,7 +3642,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -3650,7 +3650,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(Dafny.ISequence value) { @@ -3658,7 +3658,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(Dafny.ISequence value) { @@ -3666,7 +3666,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Beacon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -3674,7 +3674,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M9_beaconKey(Wrappers_Compile._IOption> value) { @@ -3698,7 +3698,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S23_PublicKeyDiscoveryInput__M25_recipientStaticPrivateKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M22_senderStaticPrivateKey(Dafny.ISequence value) { @@ -3706,7 +3706,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M22_senderStaticPrivateKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(Dafny.ISequence value) { @@ -3714,7 +3714,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S35_RawPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(Dafny.ISequence value) { @@ -3722,7 +3722,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S41_EphemeralPrivateKeyToStaticPublicKeyInput__M18_recipientPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA__M5_curve(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -3730,7 +3730,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S5_ECDSA__M5_curve(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); } public static int FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S14_CountingNumber(int value) { @@ -3863,7 +3863,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S13_AccountIdList__M6_member(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_AccountId((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_AccountId(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M13_keyProviderId(Dafny.ISequence value) { @@ -3871,7 +3871,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__ } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M13_keyProviderId(string value) { - return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_Utf8Bytes(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M15_keyProviderInfo(Dafny.ISequence value) { @@ -3879,7 +3879,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M15_keyProviderInfo(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M10_ciphertext(Dafny.ISequence value) { @@ -3887,7 +3887,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N17_mat } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N17_materialProviders__S16_EncryptedDataKey__M10_ciphertext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M3_key(Dafny.ISequence value) { @@ -3895,7 +3895,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M3_key(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(Dafny.ISequence value) { @@ -3903,7 +3903,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M3_key(Dafny.ISequence value) { @@ -3911,7 +3911,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKe } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M3_key(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(Dafny.ISequence value) { @@ -3919,7 +3919,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); } public static string FromDafny_N3_aws__N12_cryptography__N17_materialProviders__S9_AccountId(Dafny.ISequence value) { diff --git a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs index 1412d993b6..9c9b351d5e 100644 --- a/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs +++ b/AwsCryptographicMaterialProviders/runtimes/net/Generated/AwsCryptographyKeyStore/TypeConversion.cs @@ -165,22 +165,22 @@ public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_c software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration concrete = (software.amazon.cryptography.keystore.internaldafny.types.KMSConfiguration)value; var converted = new AWS.Cryptography.KeyStore.KMSConfiguration(); if (value.is_kmsKeyArn) { - converted.KmsKeyArn = (string)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(concrete.dtor_kmsKeyArn)); + converted.KmsKeyArn = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(concrete.dtor_kmsKeyArn); return converted; } if (value.is_kmsMRKeyArn) { - converted.KmsMRKeyArn = (string)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(concrete.dtor_kmsMRKeyArn)); + converted.KmsMRKeyArn = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(concrete.dtor_kmsMRKeyArn); return converted; } if (value.is_discovery) { - converted.Discovery = (AWS.Cryptography.KeyStore.Discovery)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(concrete.dtor_discovery)); + converted.Discovery = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(concrete.dtor_discovery); return converted; } if (value.is_mrDiscovery) { - converted.MrDiscovery = (AWS.Cryptography.KeyStore.MRDiscovery)(FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(concrete.dtor_mrDiscovery)); + converted.MrDiscovery = FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(concrete.dtor_mrDiscovery); return converted; } throw new System.ArgumentException("Invalid AWS.Cryptography.KeyStore.KMSConfiguration state"); @@ -247,7 +247,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S15_Create } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S15_CreateKeyOutput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S20_CreateKeyStoreOutput__M8_tableArn(Dafny.ISequence value) { @@ -255,7 +255,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S20_Create } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S20_CreateKeyStoreOutput__M8_tableArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S23_GetActiveBranchKeyInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -263,7 +263,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S23_GetAct } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S23_GetActiveBranchKeyInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetActiveBranchKeyOutput__M18_branchKeyMaterials(software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials value) { @@ -271,7 +271,7 @@ public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials ToDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetActiveBranchKeyOutput__M18_branchKeyMaterials(AWS.Cryptography.KeyStore.BranchKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials((AWS.Cryptography.KeyStore.BranchKeyMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_GetBeaconKeyInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -279,7 +279,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_GetBea } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_GetBeaconKeyInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_GetBeaconKeyOutput__M18_beaconKeyMaterials(software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials value) { @@ -287,7 +287,7 @@ public static AWS.Cryptography.KeyStore.BeaconKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBeaconKeyMaterials ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_GetBeaconKeyOutput__M18_beaconKeyMaterials(AWS.Cryptography.KeyStore.BeaconKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials((AWS.Cryptography.KeyStore.BeaconKeyMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -295,7 +295,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBra } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M16_branchKeyVersion(Dafny.ISequence value) { @@ -303,7 +303,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBra } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S24_GetBranchKeyVersionInput__M16_branchKeyVersion(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12_cryptography__N8_keyStore__S25_GetBranchKeyVersionOutput__M18_branchKeyMaterials(software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials value) { @@ -311,7 +311,7 @@ public static AWS.Cryptography.KeyStore.BranchKeyMaterials FromDafny_N3_aws__N12 } public static software.amazon.cryptography.keystore.internaldafny.types._IBranchKeyMaterials ToDafny_N3_aws__N12_cryptography__N8_keyStore__S25_GetBranchKeyVersionOutput__M18_branchKeyMaterials(AWS.Cryptography.KeyStore.BranchKeyMaterials value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials((AWS.Cryptography.KeyStore.BranchKeyMaterials)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M10_keyStoreId(Dafny.ISequence value) { @@ -319,7 +319,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKey } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M10_keyStoreId(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M12_keyStoreName(Dafny.ISequence value) { @@ -327,7 +327,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKey } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M12_keyStoreName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M19_logicalKeyStoreName(Dafny.ISequence value) { @@ -335,7 +335,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKey } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M19_logicalKeyStoreName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M11_grantTokens(Dafny.ISequence> value) { @@ -343,7 +343,7 @@ public static System.Collections.Generic.List FromDafny_N3_aws__N12_cryp } public static Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M11_grantTokens(System.Collections.Generic.List value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantTokenList((System.Collections.Generic.List)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantTokenList(value); } public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M16_kmsConfiguration(software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration value) { @@ -351,7 +351,7 @@ public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration ToDafny_N3_aws__N12_cryptography__N8_keyStore__S21_GetKeyStoreInfoOutput__M16_kmsConfiguration(AWS.Cryptography.KeyStore.KMSConfiguration value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration((AWS.Cryptography.KeyStore.KMSConfiguration)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M12_ddbTableName(Dafny.ISequence value) { @@ -359,7 +359,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeySto } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M12_ddbTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M16_kmsConfiguration(software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration value) { @@ -367,7 +367,7 @@ public static AWS.Cryptography.KeyStore.KMSConfiguration FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.keystore.internaldafny.types._IKMSConfiguration ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M16_kmsConfiguration(AWS.Cryptography.KeyStore.KMSConfiguration value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration((AWS.Cryptography.KeyStore.KMSConfiguration)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M19_logicalKeyStoreName(Dafny.ISequence value) { @@ -375,7 +375,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeySto } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M19_logicalKeyStoreName(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_KeyStoreConfig__M2_id(Wrappers_Compile._IOption> value) { @@ -415,7 +415,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_KeySto } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_KeyStoreException__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(Dafny.ISequence value) { @@ -423,7 +423,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSCon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_kmsKeyArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(Dafny.ISequence value) { @@ -431,7 +431,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSCon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_kmsMRKeyArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static AWS.Cryptography.KeyStore.Discovery FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(software.amazon.cryptography.keystore.internaldafny.types._IDiscovery value) { @@ -439,7 +439,7 @@ public static AWS.Cryptography.KeyStore.Discovery FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.keystore.internaldafny.types._IDiscovery ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M9_discovery(AWS.Cryptography.KeyStore.Discovery value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Discovery((AWS.Cryptography.KeyStore.Discovery)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Discovery(value); } public static AWS.Cryptography.KeyStore.MRDiscovery FromDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(software.amazon.cryptography.keystore.internaldafny.types._IMRDiscovery value) { @@ -447,7 +447,7 @@ public static AWS.Cryptography.KeyStore.MRDiscovery FromDafny_N3_aws__N12_crypto } public static software.amazon.cryptography.keystore.internaldafny.types._IMRDiscovery ToDafny_N3_aws__N12_cryptography__N8_keyStore__S16_KMSConfiguration__M11_mrDiscovery(AWS.Cryptography.KeyStore.MRDiscovery value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery((AWS.Cryptography.KeyStore.MRDiscovery)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S15_VersionKeyInput__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -455,7 +455,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S15_Versio } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S15_VersionKeyInput__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N6_smithy__N3_api__S6_String(Dafny.ISequence value) { @@ -580,7 +580,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M3_key(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(Dafny.ISequence value) { @@ -588,7 +588,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S17_Encryp } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext__M5_value(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(Dafny.ISequence value) { @@ -596,7 +596,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M19_branchKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(Dafny.ISequence value) { @@ -604,7 +604,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Branch } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M16_branchKeyVersion(string value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes((string)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -612,7 +612,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(Dafny.ISequence value) { @@ -620,7 +620,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BranchKeyMaterials__M9_branchKey(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(Dafny.ISequence value) { @@ -628,7 +628,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_Beacon } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M19_beaconKeyIdentifier(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(Dafny.IMap, Dafny.ISequence> value) { @@ -636,7 +636,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M17_encryptionContext(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S17_EncryptionContext(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S18_BeaconKeyMaterials__M9_beaconKey(Wrappers_Compile._IOption> value) { @@ -660,7 +660,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantT } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S14_GrantTokenList__M6_member(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery__M6_region(Dafny.ISequence value) { @@ -668,7 +668,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDisc } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S11_MRDiscovery__M6_region(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType(value); } public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S9_Utf8Bytes(Dafny.ISequence value) { @@ -717,7 +717,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKe } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M3_key(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(Dafny.ISequence value) { @@ -725,7 +725,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N8_keyS } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N8_keyStore__S10_HmacKeyMap__M5_value(System.IO.MemoryStream value) { - return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret((System.IO.MemoryStream)value); + return ToDafny_N3_aws__N12_cryptography__N8_keyStore__S6_Secret(value); } public static System.Exception FromDafny_CommonError(software.amazon.cryptography.keystore.internaldafny.types._IError value) { diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr index 13809cd289..4ff8791824 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr @@ -66,21 +66,12 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.Keyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MultiKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkAreUnique] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.Constants] +[options_by_module.CanonicalEncryptionContext] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.MaterialWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.CanonicalEncryptionContext] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.IntermediateKeyWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" @@ -90,28 +81,28 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.ErrorMessages] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsKeyring] +[options_by_module.RawAESKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.StrictMultiKeyring] +[options_by_module.Constants] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsDiscoveryKeyring] +[options_by_module.EcdhEdkWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.DiscoveryMultiKeyring] +[options_by_module.RawECDHKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkDiscoveryKeyring] +[options_by_module.RawRSAKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareDiscoveryMultiKeyring] +[options_by_module.AwsKmsKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkKeyring] +[options_by_module.AwsKmsDiscoveryKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareStrictMultiKeyring] +[options_by_module.AwsKmsEcdhKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.LocalCMC] @@ -132,22 +123,31 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.AwsKmsHierarchicalKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.AwsKmsMrkDiscoveryKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.AwsKmsMrkKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.AwsKmsRsaKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.EcdhEdkWrapping] +[options_by_module.MultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawECDHKeyring] +[options_by_module.AwsKmsMrkAreUnique] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsEcdhKeyring] +[options_by_module.StrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawAESKeyring] +[options_by_module.DiscoveryMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawRSAKeyring] +[options_by_module.MrkAwareDiscoveryMultiKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.MrkAwareStrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.CMM] diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java index e4aa5f87c4..febc571321 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_CTR.java @@ -3,24 +3,22 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; -import java.util.Objects; - public class AES_CTR { - private final Integer keyLength; + private final int keyLength; - private final Integer nonceLength; + private final int nonceLength; protected AES_CTR(BuilderImpl builder) { this.keyLength = builder.keyLength(); this.nonceLength = builder.nonceLength(); } - public Integer keyLength() { + public int keyLength() { return this.keyLength; } - public Integer nonceLength() { + public int nonceLength() { return this.nonceLength; } @@ -33,75 +31,83 @@ public static Builder builder() { } public interface Builder { - Builder keyLength(Integer keyLength); + Builder keyLength(int keyLength); - Integer keyLength(); + int keyLength(); - Builder nonceLength(Integer nonceLength); + Builder nonceLength(int nonceLength); - Integer nonceLength(); + int nonceLength(); AES_CTR build(); } static class BuilderImpl implements Builder { - protected Integer keyLength; + protected int keyLength; + + private boolean _keyLengthSet = false; + + protected int nonceLength; - protected Integer nonceLength; + private boolean _nonceLengthSet = false; protected BuilderImpl() {} protected BuilderImpl(AES_CTR model) { this.keyLength = model.keyLength(); + this._keyLengthSet = true; this.nonceLength = model.nonceLength(); + this._nonceLengthSet = true; } - public Builder keyLength(Integer keyLength) { + public Builder keyLength(int keyLength) { this.keyLength = keyLength; + this._keyLengthSet = true; return this; } - public Integer keyLength() { + public int keyLength() { return this.keyLength; } - public Builder nonceLength(Integer nonceLength) { + public Builder nonceLength(int nonceLength) { this.nonceLength = nonceLength; + this._nonceLengthSet = true; return this; } - public Integer nonceLength() { + public int nonceLength() { return this.nonceLength; } public AES_CTR build() { - if (Objects.isNull(this.keyLength())) { + if (!this._keyLengthSet) { throw new IllegalArgumentException( "Missing value for required field `keyLength`" ); } - if (Objects.nonNull(this.keyLength()) && this.keyLength() < 1) { + if (this._keyLengthSet && this.keyLength() < 1) { throw new IllegalArgumentException( "`keyLength` must be greater than or equal to 1" ); } - if (Objects.nonNull(this.keyLength()) && this.keyLength() > 32) { + if (this._keyLengthSet && this.keyLength() > 32) { throw new IllegalArgumentException( "`keyLength` must be less than or equal to 32." ); } - if (Objects.isNull(this.nonceLength())) { + if (!this._nonceLengthSet) { throw new IllegalArgumentException( "Missing value for required field `nonceLength`" ); } - if (Objects.nonNull(this.nonceLength()) && this.nonceLength() < 0) { + if (this._nonceLengthSet && this.nonceLength() < 0) { throw new IllegalArgumentException( "`nonceLength` must be greater than or equal to 0" ); } - if (Objects.nonNull(this.nonceLength()) && this.nonceLength() > 255) { + if (this._nonceLengthSet && this.nonceLength() > 255) { throw new IllegalArgumentException( "`nonceLength` must be less than or equal to 255." ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java index 4bee027cab..9c89d9d4f9 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AES_GCM.java @@ -3,15 +3,13 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; -import java.util.Objects; - public class AES_GCM { - private final Integer keyLength; + private final int keyLength; - private final Integer tagLength; + private final int tagLength; - private final Integer ivLength; + private final int ivLength; protected AES_GCM(BuilderImpl builder) { this.keyLength = builder.keyLength(); @@ -19,15 +17,15 @@ protected AES_GCM(BuilderImpl builder) { this.ivLength = builder.ivLength(); } - public Integer keyLength() { + public int keyLength() { return this.keyLength; } - public Integer tagLength() { + public int tagLength() { return this.tagLength; } - public Integer ivLength() { + public int ivLength() { return this.ivLength; } @@ -40,106 +38,118 @@ public static Builder builder() { } public interface Builder { - Builder keyLength(Integer keyLength); + Builder keyLength(int keyLength); - Integer keyLength(); + int keyLength(); - Builder tagLength(Integer tagLength); + Builder tagLength(int tagLength); - Integer tagLength(); + int tagLength(); - Builder ivLength(Integer ivLength); + Builder ivLength(int ivLength); - Integer ivLength(); + int ivLength(); AES_GCM build(); } static class BuilderImpl implements Builder { - protected Integer keyLength; + protected int keyLength; + + private boolean _keyLengthSet = false; + + protected int tagLength; + + private boolean _tagLengthSet = false; - protected Integer tagLength; + protected int ivLength; - protected Integer ivLength; + private boolean _ivLengthSet = false; protected BuilderImpl() {} protected BuilderImpl(AES_GCM model) { this.keyLength = model.keyLength(); + this._keyLengthSet = true; this.tagLength = model.tagLength(); + this._tagLengthSet = true; this.ivLength = model.ivLength(); + this._ivLengthSet = true; } - public Builder keyLength(Integer keyLength) { + public Builder keyLength(int keyLength) { this.keyLength = keyLength; + this._keyLengthSet = true; return this; } - public Integer keyLength() { + public int keyLength() { return this.keyLength; } - public Builder tagLength(Integer tagLength) { + public Builder tagLength(int tagLength) { this.tagLength = tagLength; + this._tagLengthSet = true; return this; } - public Integer tagLength() { + public int tagLength() { return this.tagLength; } - public Builder ivLength(Integer ivLength) { + public Builder ivLength(int ivLength) { this.ivLength = ivLength; + this._ivLengthSet = true; return this; } - public Integer ivLength() { + public int ivLength() { return this.ivLength; } public AES_GCM build() { - if (Objects.isNull(this.keyLength())) { + if (!this._keyLengthSet) { throw new IllegalArgumentException( "Missing value for required field `keyLength`" ); } - if (Objects.nonNull(this.keyLength()) && this.keyLength() < 1) { + if (this._keyLengthSet && this.keyLength() < 1) { throw new IllegalArgumentException( "`keyLength` must be greater than or equal to 1" ); } - if (Objects.nonNull(this.keyLength()) && this.keyLength() > 32) { + if (this._keyLengthSet && this.keyLength() > 32) { throw new IllegalArgumentException( "`keyLength` must be less than or equal to 32." ); } - if (Objects.isNull(this.tagLength())) { + if (!this._tagLengthSet) { throw new IllegalArgumentException( "Missing value for required field `tagLength`" ); } - if (Objects.nonNull(this.tagLength()) && this.tagLength() < 0) { + if (this._tagLengthSet && this.tagLength() < 0) { throw new IllegalArgumentException( "`tagLength` must be greater than or equal to 0" ); } - if (Objects.nonNull(this.tagLength()) && this.tagLength() > 32) { + if (this._tagLengthSet && this.tagLength() > 32) { throw new IllegalArgumentException( "`tagLength` must be less than or equal to 32." ); } - if (Objects.isNull(this.ivLength())) { + if (!this._ivLengthSet) { throw new IllegalArgumentException( "Missing value for required field `ivLength`" ); } - if (Objects.nonNull(this.ivLength()) && this.ivLength() < 0) { + if (this._ivLengthSet && this.ivLength() < 0) { throw new IllegalArgumentException( "`ivLength` must be greater than or equal to 0" ); } - if (Objects.nonNull(this.ivLength()) && this.ivLength() > 255) { + if (this._ivLengthSet && this.ivLength() > 255) { throw new IllegalArgumentException( "`ivLength` must be less than or equal to 255." ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java index 11e7780ed9..1bb9d4dfb7 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/AesKdfCtrInput.java @@ -10,7 +10,7 @@ public class AesKdfCtrInput { private final ByteBuffer ikm; - private final Integer expectedLength; + private final int expectedLength; private final ByteBuffer nonce; @@ -24,7 +24,7 @@ public ByteBuffer ikm() { return this.ikm; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -45,9 +45,9 @@ public interface Builder { ByteBuffer ikm(); - Builder expectedLength(Integer expectedLength); + Builder expectedLength(int expectedLength); - Integer expectedLength(); + int expectedLength(); Builder nonce(ByteBuffer nonce); @@ -60,7 +60,9 @@ static class BuilderImpl implements Builder { protected ByteBuffer ikm; - protected Integer expectedLength; + protected int expectedLength; + + private boolean _expectedLengthSet = false; protected ByteBuffer nonce; @@ -69,6 +71,7 @@ protected BuilderImpl() {} protected BuilderImpl(AesKdfCtrInput model) { this.ikm = model.ikm(); this.expectedLength = model.expectedLength(); + this._expectedLengthSet = true; this.nonce = model.nonce(); } @@ -81,12 +84,13 @@ public ByteBuffer ikm() { return this.ikm; } - public Builder expectedLength(Integer expectedLength) { + public Builder expectedLength(int expectedLength) { this.expectedLength = expectedLength; + this._expectedLengthSet = true; return this; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -105,12 +109,12 @@ public AesKdfCtrInput build() { "Missing value for required field `ikm`" ); } - if (Objects.isNull(this.expectedLength())) { + if (!this._expectedLengthSet) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { + if (this._expectedLengthSet && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java index 81fe465513..fefd30a6ec 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRSAKeyPairInput.java @@ -3,17 +3,15 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; -import java.util.Objects; - public class GenerateRSAKeyPairInput { - private final Integer lengthBits; + private final int lengthBits; protected GenerateRSAKeyPairInput(BuilderImpl builder) { this.lengthBits = builder.lengthBits(); } - public Integer lengthBits() { + public int lengthBits() { return this.lengthBits; } @@ -26,44 +24,48 @@ public static Builder builder() { } public interface Builder { - Builder lengthBits(Integer lengthBits); + Builder lengthBits(int lengthBits); - Integer lengthBits(); + int lengthBits(); GenerateRSAKeyPairInput build(); } static class BuilderImpl implements Builder { - protected Integer lengthBits; + protected int lengthBits; + + private boolean _lengthBitsSet = false; protected BuilderImpl() {} protected BuilderImpl(GenerateRSAKeyPairInput model) { this.lengthBits = model.lengthBits(); + this._lengthBitsSet = true; } - public Builder lengthBits(Integer lengthBits) { + public Builder lengthBits(int lengthBits) { this.lengthBits = lengthBits; + this._lengthBitsSet = true; return this; } - public Integer lengthBits() { + public int lengthBits() { return this.lengthBits; } public GenerateRSAKeyPairInput build() { - if (Objects.isNull(this.lengthBits())) { + if (!this._lengthBitsSet) { throw new IllegalArgumentException( "Missing value for required field `lengthBits`" ); } - if (Objects.nonNull(this.lengthBits()) && this.lengthBits() < 81) { + if (this._lengthBitsSet && this.lengthBits() < 81) { throw new IllegalArgumentException( "`lengthBits` must be greater than or equal to 81" ); } - if (Objects.nonNull(this.lengthBits()) && this.lengthBits() > 4096) { + if (this._lengthBitsSet && this.lengthBits() > 4096) { throw new IllegalArgumentException( "`lengthBits` must be less than or equal to 4096." ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java index c608275fee..7e1a286ee0 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GenerateRandomBytesInput.java @@ -3,17 +3,15 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; -import java.util.Objects; - public class GenerateRandomBytesInput { - private final Integer length; + private final int length; protected GenerateRandomBytesInput(BuilderImpl builder) { this.length = builder.length(); } - public Integer length() { + public int length() { return this.length; } @@ -26,39 +24,43 @@ public static Builder builder() { } public interface Builder { - Builder length(Integer length); + Builder length(int length); - Integer length(); + int length(); GenerateRandomBytesInput build(); } static class BuilderImpl implements Builder { - protected Integer length; + protected int length; + + private boolean _lengthSet = false; protected BuilderImpl() {} protected BuilderImpl(GenerateRandomBytesInput model) { this.length = model.length(); + this._lengthSet = true; } - public Builder length(Integer length) { + public Builder length(int length) { this.length = length; + this._lengthSet = true; return this; } - public Integer length() { + public int length() { return this.length; } public GenerateRandomBytesInput build() { - if (Objects.isNull(this.length())) { + if (!this._lengthSet) { throw new IllegalArgumentException( "Missing value for required field `length`" ); } - if (Objects.nonNull(this.length()) && this.length() < 0) { + if (this._lengthSet && this.length() < 0) { throw new IllegalArgumentException( "`length` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java index e830e8a141..7834706ede 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/GetRSAKeyModulusLengthOutput.java @@ -3,17 +3,15 @@ // Do not modify this file. This file is machine generated, and any changes to it will be overwritten. package software.amazon.cryptography.primitives.model; -import java.util.Objects; - public class GetRSAKeyModulusLengthOutput { - private final Integer length; + private final int length; protected GetRSAKeyModulusLengthOutput(BuilderImpl builder) { this.length = builder.length(); } - public Integer length() { + public int length() { return this.length; } @@ -26,39 +24,43 @@ public static Builder builder() { } public interface Builder { - Builder length(Integer length); + Builder length(int length); - Integer length(); + int length(); GetRSAKeyModulusLengthOutput build(); } static class BuilderImpl implements Builder { - protected Integer length; + protected int length; + + private boolean _lengthSet = false; protected BuilderImpl() {} protected BuilderImpl(GetRSAKeyModulusLengthOutput model) { this.length = model.length(); + this._lengthSet = true; } - public Builder length(Integer length) { + public Builder length(int length) { this.length = length; + this._lengthSet = true; return this; } - public Integer length() { + public int length() { return this.length; } public GetRSAKeyModulusLengthOutput build() { - if (Objects.isNull(this.length())) { + if (!this._lengthSet) { throw new IllegalArgumentException( "Missing value for required field `length`" ); } - if (Objects.nonNull(this.length()) && this.length() < 81) { + if (this._lengthSet && this.length() < 81) { throw new IllegalArgumentException( "`length` must be greater than or equal to 81" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java index 3c2a1a120f..b9e521089a 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfExpandInput.java @@ -14,7 +14,7 @@ public class HkdfExpandInput { private final ByteBuffer info; - private final Integer expectedLength; + private final int expectedLength; protected HkdfExpandInput(BuilderImpl builder) { this.digestAlgorithm = builder.digestAlgorithm(); @@ -35,7 +35,7 @@ public ByteBuffer info() { return this.info; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -60,9 +60,9 @@ public interface Builder { ByteBuffer info(); - Builder expectedLength(Integer expectedLength); + Builder expectedLength(int expectedLength); - Integer expectedLength(); + int expectedLength(); HkdfExpandInput build(); } @@ -75,7 +75,9 @@ static class BuilderImpl implements Builder { protected ByteBuffer info; - protected Integer expectedLength; + protected int expectedLength; + + private boolean _expectedLengthSet = false; protected BuilderImpl() {} @@ -84,6 +86,7 @@ protected BuilderImpl(HkdfExpandInput model) { this.prk = model.prk(); this.info = model.info(); this.expectedLength = model.expectedLength(); + this._expectedLengthSet = true; } public Builder digestAlgorithm(DigestAlgorithm digestAlgorithm) { @@ -113,12 +116,13 @@ public ByteBuffer info() { return this.info; } - public Builder expectedLength(Integer expectedLength) { + public Builder expectedLength(int expectedLength) { this.expectedLength = expectedLength; + this._expectedLengthSet = true; return this; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -138,12 +142,12 @@ public HkdfExpandInput build() { "Missing value for required field `info`" ); } - if (Objects.isNull(this.expectedLength())) { + if (!this._expectedLengthSet) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { + if (this._expectedLengthSet && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java index 722bd9d00f..6273a179fe 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/HkdfInput.java @@ -16,7 +16,7 @@ public class HkdfInput { private final ByteBuffer info; - private final Integer expectedLength; + private final int expectedLength; protected HkdfInput(BuilderImpl builder) { this.digestAlgorithm = builder.digestAlgorithm(); @@ -42,7 +42,7 @@ public ByteBuffer info() { return this.info; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -71,9 +71,9 @@ public interface Builder { ByteBuffer info(); - Builder expectedLength(Integer expectedLength); + Builder expectedLength(int expectedLength); - Integer expectedLength(); + int expectedLength(); HkdfInput build(); } @@ -88,7 +88,9 @@ static class BuilderImpl implements Builder { protected ByteBuffer info; - protected Integer expectedLength; + protected int expectedLength; + + private boolean _expectedLengthSet = false; protected BuilderImpl() {} @@ -98,6 +100,7 @@ protected BuilderImpl(HkdfInput model) { this.ikm = model.ikm(); this.info = model.info(); this.expectedLength = model.expectedLength(); + this._expectedLengthSet = true; } public Builder digestAlgorithm(DigestAlgorithm digestAlgorithm) { @@ -136,12 +139,13 @@ public ByteBuffer info() { return this.info; } - public Builder expectedLength(Integer expectedLength) { + public Builder expectedLength(int expectedLength) { this.expectedLength = expectedLength; + this._expectedLengthSet = true; return this; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -161,12 +165,12 @@ public HkdfInput build() { "Missing value for required field `info`" ); } - if (Objects.isNull(this.expectedLength())) { + if (!this._expectedLengthSet) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { + if (this._expectedLengthSet && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java index 22ab7da5b2..a6769b03b2 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/KdfCtrInput.java @@ -12,7 +12,7 @@ public class KdfCtrInput { private final ByteBuffer ikm; - private final Integer expectedLength; + private final int expectedLength; private final ByteBuffer purpose; @@ -34,7 +34,7 @@ public ByteBuffer ikm() { return this.ikm; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -63,9 +63,9 @@ public interface Builder { ByteBuffer ikm(); - Builder expectedLength(Integer expectedLength); + Builder expectedLength(int expectedLength); - Integer expectedLength(); + int expectedLength(); Builder purpose(ByteBuffer purpose); @@ -84,7 +84,9 @@ static class BuilderImpl implements Builder { protected ByteBuffer ikm; - protected Integer expectedLength; + protected int expectedLength; + + private boolean _expectedLengthSet = false; protected ByteBuffer purpose; @@ -96,6 +98,7 @@ protected BuilderImpl(KdfCtrInput model) { this.digestAlgorithm = model.digestAlgorithm(); this.ikm = model.ikm(); this.expectedLength = model.expectedLength(); + this._expectedLengthSet = true; this.purpose = model.purpose(); this.nonce = model.nonce(); } @@ -118,12 +121,13 @@ public ByteBuffer ikm() { return this.ikm; } - public Builder expectedLength(Integer expectedLength) { + public Builder expectedLength(int expectedLength) { this.expectedLength = expectedLength; + this._expectedLengthSet = true; return this; } - public Integer expectedLength() { + public int expectedLength() { return this.expectedLength; } @@ -156,12 +160,12 @@ public KdfCtrInput build() { "Missing value for required field `ikm`" ); } - if (Objects.isNull(this.expectedLength())) { + if (!this._expectedLengthSet) { throw new IllegalArgumentException( "Missing value for required field `expectedLength`" ); } - if (Objects.nonNull(this.expectedLength()) && this.expectedLength() < 0) { + if (this._expectedLengthSet && this.expectedLength() < 0) { throw new IllegalArgumentException( "`expectedLength` must be greater than or equal to 0" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java index 4a4aab25ab..de127e1b72 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPrivateKey.java @@ -8,7 +8,7 @@ public class RSAPrivateKey { - private final Integer lengthBits; + private final int lengthBits; private final ByteBuffer pem; @@ -17,7 +17,7 @@ protected RSAPrivateKey(BuilderImpl builder) { this.pem = builder.pem(); } - public Integer lengthBits() { + public int lengthBits() { return this.lengthBits; } @@ -34,9 +34,9 @@ public static Builder builder() { } public interface Builder { - Builder lengthBits(Integer lengthBits); + Builder lengthBits(int lengthBits); - Integer lengthBits(); + int lengthBits(); Builder pem(ByteBuffer pem); @@ -47,7 +47,9 @@ public interface Builder { static class BuilderImpl implements Builder { - protected Integer lengthBits; + protected int lengthBits; + + private boolean _lengthBitsSet = false; protected ByteBuffer pem; @@ -55,15 +57,17 @@ protected BuilderImpl() {} protected BuilderImpl(RSAPrivateKey model) { this.lengthBits = model.lengthBits(); + this._lengthBitsSet = true; this.pem = model.pem(); } - public Builder lengthBits(Integer lengthBits) { + public Builder lengthBits(int lengthBits) { this.lengthBits = lengthBits; + this._lengthBitsSet = true; return this; } - public Integer lengthBits() { + public int lengthBits() { return this.lengthBits; } @@ -77,12 +81,12 @@ public ByteBuffer pem() { } public RSAPrivateKey build() { - if (Objects.isNull(this.lengthBits())) { + if (!this._lengthBitsSet) { throw new IllegalArgumentException( "Missing value for required field `lengthBits`" ); } - if (Objects.nonNull(this.lengthBits()) && this.lengthBits() < 81) { + if (this._lengthBitsSet && this.lengthBits() < 81) { throw new IllegalArgumentException( "`lengthBits` must be greater than or equal to 81" ); diff --git a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java index 2b7656920e..1879f4dc95 100644 --- a/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java +++ b/AwsCryptographyPrimitives/runtimes/java/src/main/smithy-generated/software/amazon/cryptography/primitives/model/RSAPublicKey.java @@ -8,7 +8,7 @@ public class RSAPublicKey { - private final Integer lengthBits; + private final int lengthBits; private final ByteBuffer pem; @@ -17,7 +17,7 @@ protected RSAPublicKey(BuilderImpl builder) { this.pem = builder.pem(); } - public Integer lengthBits() { + public int lengthBits() { return this.lengthBits; } @@ -34,9 +34,9 @@ public static Builder builder() { } public interface Builder { - Builder lengthBits(Integer lengthBits); + Builder lengthBits(int lengthBits); - Integer lengthBits(); + int lengthBits(); Builder pem(ByteBuffer pem); @@ -47,7 +47,9 @@ public interface Builder { static class BuilderImpl implements Builder { - protected Integer lengthBits; + protected int lengthBits; + + private boolean _lengthBitsSet = false; protected ByteBuffer pem; @@ -55,15 +57,17 @@ protected BuilderImpl() {} protected BuilderImpl(RSAPublicKey model) { this.lengthBits = model.lengthBits(); + this._lengthBitsSet = true; this.pem = model.pem(); } - public Builder lengthBits(Integer lengthBits) { + public Builder lengthBits(int lengthBits) { this.lengthBits = lengthBits; + this._lengthBitsSet = true; return this; } - public Integer lengthBits() { + public int lengthBits() { return this.lengthBits; } @@ -77,12 +81,12 @@ public ByteBuffer pem() { } public RSAPublicKey build() { - if (Objects.isNull(this.lengthBits())) { + if (!this._lengthBitsSet) { throw new IllegalArgumentException( "Missing value for required field `lengthBits`" ); } - if (Objects.nonNull(this.lengthBits()) && this.lengthBits() < 81) { + if (this._lengthBitsSet && this.lengthBits() < 81) { throw new IllegalArgumentException( "`lengthBits` must be greater than or equal to 81" ); diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs index dd7dd6b752..b217f19a5b 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Generated/AtomicPrimitives.cs @@ -138,7 +138,7 @@ public System.IO.MemoryStream ECDSASign(AWS.Cryptography.Primitives.ECDSASignInp if (result.is_Failure) throw TypeConversion.FromDafny_CommonError(result.dtor_error); return TypeConversion.FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_ECDSASignOutput(result.dtor_value); } - public bool? ECDSAVerify(AWS.Cryptography.Primitives.ECDSAVerifyInput input) + public bool ECDSAVerify(AWS.Cryptography.Primitives.ECDSAVerifyInput input) { software.amazon.cryptography.primitives.internaldafny.types._IECDSAVerifyInput internalInput = TypeConversion.ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput(input); Wrappers_Compile._IResult result = _impl.ECDSAVerify(internalInput); diff --git a/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs b/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs index ab262dc31a..83071c6b61 100644 --- a/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs +++ b/AwsCryptographyPrimitives/runtimes/net/Generated/TypeConversion.cs @@ -260,11 +260,11 @@ public static software.amazon.cryptography.primitives.internaldafny.types._IECDS return new software.amazon.cryptography.primitives.internaldafny.types.ECDSAVerifyInput(ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M18_signatureAlgorithm(value.SignatureAlgorithm), ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M15_verificationKey(value.VerificationKey), ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M7_message(value.Message), ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M9_signature(value.Signature)); } - public static bool? FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool value) + public static bool FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(value); } - public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool? value) + public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput(bool value) { return ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(value); } @@ -605,7 +605,7 @@ public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M6_encAlg(AWS.Cryptography.Primitives.AES_GCM value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM((AWS.Cryptography.Primitives.AES_GCM)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_key(Dafny.ISequence value) { @@ -613,7 +613,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_key(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M9_cipherTxt(Dafny.ISequence value) { @@ -621,7 +621,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M9_cipherTxt(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M7_authTag(Dafny.ISequence value) { @@ -629,7 +629,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M7_authTag(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M2_iv(Dafny.ISequence value) { @@ -637,7 +637,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M2_iv(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_aad(Dafny.ISequence value) { @@ -645,7 +645,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESDecryptInput__M3_aad(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESDecryptOutput__M9_plaintext(Dafny.ISequence value) { @@ -653,7 +653,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESDecryptOutput__M9_plaintext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M6_encAlg(software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM value) { @@ -661,7 +661,7 @@ public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptogr } public static software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M6_encAlg(AWS.Cryptography.Primitives.AES_GCM value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM((AWS.Cryptography.Primitives.AES_GCM)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M2_iv(Dafny.ISequence value) { @@ -669,7 +669,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M2_iv(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_key(Dafny.ISequence value) { @@ -677,7 +677,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_key(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_msg(Dafny.ISequence value) { @@ -685,7 +685,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_msg(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_aad(Dafny.ISequence value) { @@ -693,7 +693,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AESEncryptInput__M3_aad(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M10_cipherText(Dafny.ISequence value) { @@ -701,7 +701,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M10_cipherText(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M7_authTag(Dafny.ISequence value) { @@ -709,7 +709,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_AESEncryptOutput__M7_authTag(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M3_ikm(Dafny.ISequence value) { @@ -717,15 +717,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M14_expectedLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_AesKdfCtrInput__M5_nonce(Wrappers_Compile._IOption> value) { @@ -741,7 +741,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_AesKdfCtrOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static string FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_AwsCryptographicPrimitivesError__M7_message(Dafny.ISequence value) { @@ -749,7 +749,7 @@ public static string FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_Aws } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_AwsCryptographicPrimitivesError__M7_message(string value) { - return ToDafny_N6_smithy__N3_api__S6_String((string)value); + return ToDafny_N6_smithy__N3_api__S6_String(value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -757,7 +757,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -765,7 +765,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_CompressPublicKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_CompressPublicKeyOutput__M19_compressedPublicKey(Dafny.ISequence value) { @@ -773,7 +773,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_CompressPublicKeyOutput__M19_compressedPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M19_compressedPublicKey(Dafny.ISequence value) { @@ -781,7 +781,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M19_compressedPublicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -789,7 +789,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_DecompressPublicKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S25_DecompressPublicKeyOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -797,7 +797,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S25_DecompressPublicKeyOutput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -805,7 +805,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -813,7 +813,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -821,7 +821,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_DeriveSharedSecretInput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_DeriveSharedSecretOutput__M12_sharedSecret(Dafny.ISequence value) { @@ -829,7 +829,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_DeriveSharedSecretOutput__M12_sharedSecret(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -837,7 +837,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M7_message(Dafny.ISequence value) { @@ -845,7 +845,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_DigestInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_DigestOutput__M6_digest(Dafny.ISequence value) { @@ -853,7 +853,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_DigestOutput__M6_digest(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -861,7 +861,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M10_signingKey(Dafny.ISequence value) { @@ -869,7 +869,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M10_signingKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M7_message(Dafny.ISequence value) { @@ -877,7 +877,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_ECDSASignInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_ECDSASignOutput__M9_signature(Dafny.ISequence value) { @@ -885,7 +885,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_ECDSASignOutput__M9_signature(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -893,7 +893,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M15_verificationKey(Dafny.ISequence value) { @@ -901,7 +901,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M15_verificationKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M7_message(Dafny.ISequence value) { @@ -909,7 +909,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M9_signature(Dafny.ISequence value) { @@ -917,15 +917,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_ECDSAVerifyInput__M9_signature(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static bool? FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool value) + public static bool FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool value) { return FromDafny_N6_smithy__N3_api__S7_Boolean(value); } - public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool? value) + public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_ECDSAVerifyOutput__M7_success(bool value) { - return ToDafny_N6_smithy__N3_api__S7_Boolean((bool)value); + return ToDafny_N6_smithy__N3_api__S7_Boolean(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateECCKeyPairInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -933,7 +933,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateECCKeyPairInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -941,7 +941,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -949,7 +949,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -957,7 +957,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateECCKeyPairOutput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S30_GenerateECDSASignatureKeyInput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -965,7 +965,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S30_GenerateECDSASignatureKeyInput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); } public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M18_signatureAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm value) { @@ -973,7 +973,7 @@ public static AWS.Cryptography.Primitives.ECDSASignatureAlgorithm FromDafny_N3_a } public static software.amazon.cryptography.primitives.internaldafny.types._IECDSASignatureAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M18_signatureAlgorithm(AWS.Cryptography.Primitives.ECDSASignatureAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm((AWS.Cryptography.Primitives.ECDSASignatureAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ECDSASignatureAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M15_verificationKey(Dafny.ISequence value) { @@ -981,7 +981,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M15_verificationKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M10_signingKey(Dafny.ISequence value) { @@ -989,15 +989,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GenerateECDSASignatureKeyOutput__M10_signingKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRandomBytesInput__M6_length(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S25_GenerateRandomBytesOutput__M4_data(Dafny.ISequence value) { @@ -1005,15 +1005,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S25_GenerateRandomBytesOutput__M4_data(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S30_RSAModulusLengthBitsToGenerate(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_GenerateRSAKeyPairInput__M10_lengthBits(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S30_RSAModulusLengthBitsToGenerate((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S30_RSAModulusLengthBitsToGenerate(value); } public static AWS.Cryptography.Primitives.RSAPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IRSAPublicKey value) { @@ -1021,7 +1021,7 @@ public static AWS.Cryptography.Primitives.RSAPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M9_publicKey(AWS.Cryptography.Primitives.RSAPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey((AWS.Cryptography.Primitives.RSAPublicKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey(value); } public static AWS.Cryptography.Primitives.RSAPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IRSAPrivateKey value) { @@ -1029,7 +1029,7 @@ public static AWS.Cryptography.Primitives.RSAPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S24_GenerateRSAKeyPairOutput__M10_privateKey(AWS.Cryptography.Primitives.RSAPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey((AWS.Cryptography.Primitives.RSAPrivateKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1037,7 +1037,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -1045,7 +1045,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S31_GetPublicKeyFromPrivateKeyInput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1053,7 +1053,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M10_privateKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey value) { @@ -1061,7 +1061,7 @@ public static AWS.Cryptography.Primitives.ECCPrivateKey FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPrivateKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M10_privateKey(AWS.Cryptography.Primitives.ECCPrivateKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey((AWS.Cryptography.Primitives.ECCPrivateKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M9_publicKey(Dafny.ISequence value) { @@ -1069,7 +1069,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S32_GetPublicKeyFromPrivateKeyOutput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S27_GetRSAKeyModulusLengthInput__M9_publicKey(Dafny.ISequence value) { @@ -1077,15 +1077,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S27_GetRSAKeyModulusLengthInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S28_GetRSAKeyModulusLengthOutput__M6_length(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1093,7 +1093,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M3_prk(Dafny.ISequence value) { @@ -1101,7 +1101,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M3_prk(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M4_info(Dafny.ISequence value) { @@ -1109,15 +1109,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M4_info(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_HkdfExpandInput__M14_expectedLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExpandOutput__M3_okm(Dafny.ISequence value) { @@ -1125,7 +1125,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExpandOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1133,7 +1133,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M4_salt(Wrappers_Compile._IOption> value) { @@ -1149,7 +1149,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_HkdfExtractInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S17_HkdfExtractOutput__M3_prk(Dafny.ISequence value) { @@ -1157,7 +1157,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S17_HkdfExtractOutput__M3_prk(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1165,7 +1165,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M4_salt(Wrappers_Compile._IOption> value) { @@ -1181,7 +1181,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M4_info(Dafny.ISequence value) { @@ -1189,15 +1189,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M4_info(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HkdfInput__M14_expectedLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_HkdfOutput__M3_okm(Dafny.ISequence value) { @@ -1205,7 +1205,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_HkdfOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1213,7 +1213,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M3_key(Dafny.ISequence value) { @@ -1221,7 +1221,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M3_key(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M7_message(Dafny.ISequence value) { @@ -1229,7 +1229,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_HMacInput__M7_message(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_HMacOutput__M6_digest(Dafny.ISequence value) { @@ -1237,7 +1237,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_HMacOutput__M6_digest(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M15_digestAlgorithm(software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm value) { @@ -1245,7 +1245,7 @@ public static AWS.Cryptography.Primitives.DigestAlgorithm FromDafny_N3_aws__N12_ } public static software.amazon.cryptography.primitives.internaldafny.types._IDigestAlgorithm ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M15_digestAlgorithm(AWS.Cryptography.Primitives.DigestAlgorithm value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm((AWS.Cryptography.Primitives.DigestAlgorithm)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_DigestAlgorithm(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M3_ikm(Dafny.ISequence value) { @@ -1253,15 +1253,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M3_ikm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M14_expectedLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_PositiveInteger(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S11_KdfCtrInput__M7_purpose(Wrappers_Compile._IOption> value) { @@ -1285,7 +1285,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_KdfCtrOutput__M3_okm(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S19_ParsePublicKeyInput__M9_publicKey(Dafny.ISequence value) { @@ -1293,7 +1293,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S19_ParsePublicKeyInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_ParsePublicKeyOutput__M9_publicKey(software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey value) { @@ -1301,7 +1301,7 @@ public static AWS.Cryptography.Primitives.ECCPublicKey FromDafny_N3_aws__N12_cry } public static software.amazon.cryptography.primitives.internaldafny.types._IECCPublicKey ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_ParsePublicKeyOutput__M9_publicKey(AWS.Cryptography.Primitives.ECCPublicKey value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey((AWS.Cryptography.Primitives.ECCPublicKey)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey(value); } public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M7_padding(software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode value) { @@ -1309,7 +1309,7 @@ public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M7_padding(AWS.Cryptography.Primitives.RSAPaddingMode value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode((AWS.Cryptography.Primitives.RSAPaddingMode)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_privateKey(Dafny.ISequence value) { @@ -1317,7 +1317,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_privateKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_cipherText(Dafny.ISequence value) { @@ -1325,7 +1325,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSADecryptInput__M10_cipherText(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSADecryptOutput__M9_plaintext(Dafny.ISequence value) { @@ -1333,7 +1333,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSADecryptOutput__M9_plaintext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M7_padding(software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode value) { @@ -1341,7 +1341,7 @@ public static AWS.Cryptography.Primitives.RSAPaddingMode FromDafny_N3_aws__N12_c } public static software.amazon.cryptography.primitives.internaldafny.types._IRSAPaddingMode ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M7_padding(AWS.Cryptography.Primitives.RSAPaddingMode value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode((AWS.Cryptography.Primitives.RSAPaddingMode)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S14_RSAPaddingMode(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_publicKey(Dafny.ISequence value) { @@ -1349,7 +1349,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_plaintext(Dafny.ISequence value) { @@ -1357,7 +1357,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S15_RSAEncryptInput__M9_plaintext(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSAEncryptOutput__M10_cipherText(Dafny.ISequence value) { @@ -1365,7 +1365,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S16_RSAEncryptOutput__M10_cipherText(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M8_eccCurve(software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec value) { @@ -1373,7 +1373,7 @@ public static AWS.Cryptography.Primitives.ECDHCurveSpec FromDafny_N3_aws__N12_cr } public static software.amazon.cryptography.primitives.internaldafny.types._IECDHCurveSpec ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M8_eccCurve(AWS.Cryptography.Primitives.ECDHCurveSpec value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec((AWS.Cryptography.Primitives.ECDHCurveSpec)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECDHCurveSpec(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M9_publicKey(Dafny.ISequence value) { @@ -1381,15 +1381,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S22_ValidatePublicKeyInput__M9_publicKey(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static bool? FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool value) + public static bool FromDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool value) { return FromDafny_N6_smithy__N3_api__S7_Boolean(value); } - public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool? value) + public static bool ToDafny_N3_aws__N12_cryptography__N10_primitives__S23_ValidatePublicKeyOutput__M7_success(bool value) { - return ToDafny_N6_smithy__N3_api__S7_Boolean((bool)value); + return ToDafny_N6_smithy__N3_api__S7_Boolean(value); } public static AWS.Cryptography.Primitives.AES_GCM FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM(software.amazon.cryptography.primitives.internaldafny.types._IAES__GCM value) { @@ -1498,29 +1498,29 @@ public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModul { return value; } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_keyLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M9_tagLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S10_Uint8Bytes(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S7_AES_GCM__M8_ivLength(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S9_Uint8Bits(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey__M3_der(Dafny.ISequence value) { @@ -1528,7 +1528,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_ECCPublicKey__M3_der(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey__M3_pem(Dafny.ISequence value) { @@ -1536,15 +1536,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_ECCPrivateKey__M3_pem(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M10_lengthBits(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M3_pem(Dafny.ISequence value) { @@ -1552,15 +1552,15 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S12_RSAPublicKey__M3_pem(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } - public static int? FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int value) + public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int value) { return FromDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } - public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int? value) + public static int ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M10_lengthBits(int value) { - return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits((int)value); + return ToDafny_N3_aws__N12_cryptography__N10_primitives__S20_RSAModulusLengthBits(value); } public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M3_pem(Dafny.ISequence value) { @@ -1568,7 +1568,7 @@ public static System.IO.MemoryStream FromDafny_N3_aws__N12_cryptography__N10_pri } public static Dafny.ISequence ToDafny_N3_aws__N12_cryptography__N10_primitives__S13_RSAPrivateKey__M3_pem(System.IO.MemoryStream value) { - return ToDafny_N6_smithy__N3_api__S4_Blob((System.IO.MemoryStream)value); + return ToDafny_N6_smithy__N3_api__S4_Blob(value); } public static int FromDafny_N3_aws__N12_cryptography__N10_primitives__S18_SymmetricKeyLength(int value) { diff --git a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs index 48dbc0ce6d..88d3d4fa2c 100644 --- a/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs +++ b/ComAmazonawsDynamodb/runtimes/net/Generated/TypeConversion.cs @@ -16,52 +16,52 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue concrete = (software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValue)value; var converted = new Amazon.DynamoDBv2.Model.AttributeValue(); if (value.is_S) { - converted.S = (string)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(concrete.dtor_S)); + converted.S = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(concrete.dtor_S); return converted; } if (value.is_N) { - converted.N = (string)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(concrete.dtor_N)); + converted.N = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(concrete.dtor_N); return converted; } if (value.is_B) { - converted.B = (System.IO.MemoryStream)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(concrete.dtor_B)); + converted.B = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(concrete.dtor_B); return converted; } if (value.is_SS) { - converted.SS = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(concrete.dtor_SS)); + converted.SS = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(concrete.dtor_SS); return converted; } if (value.is_NS) { - converted.NS = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(concrete.dtor_NS)); + converted.NS = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(concrete.dtor_NS); return converted; } if (value.is_BS) { - converted.BS = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(concrete.dtor_BS)); + converted.BS = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(concrete.dtor_BS); return converted; } if (value.is_M) { - converted.M = (System.Collections.Generic.Dictionary)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(concrete.dtor_M)); + converted.M = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(concrete.dtor_M); return converted; } if (value.is_L) { - converted.L = (System.Collections.Generic.List)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(concrete.dtor_L)); + converted.L = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(concrete.dtor_L); return converted; } if (value.is_NULL) { - converted.NULL = (bool)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(concrete.dtor_NULL)); + converted.NULL = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(concrete.dtor_NULL); return converted; } if (value.is_BOOL) { - converted.BOOL = (bool)(FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(concrete.dtor_BOOL)); + converted.BOOL = FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(concrete.dtor_BOOL); return converted; } throw new System.ArgumentException("Invalid Amazon.DynamoDBv2.Model.AttributeValue state"); @@ -118,7 +118,7 @@ public static Amazon.DynamoDBv2.Model.BackupInUseException FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupInUseException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BackupInUseException(Amazon.DynamoDBv2.Model.BackupInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupInUseException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BackupInUseException__M7_message(var_message) ); @@ -131,7 +131,7 @@ public static Amazon.DynamoDBv2.Model.BackupNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BackupNotFoundException(Amazon.DynamoDBv2.Model.BackupNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_BackupNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BackupNotFoundException__M7_message(var_message) ); @@ -144,7 +144,7 @@ public static Amazon.DynamoDBv2.Model.BatchExecuteStatementRequest FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchExecuteStatementInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput(Amazon.DynamoDBv2.Model.BatchExecuteStatementRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchExecuteStatementInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M10_Statements(value.Statements), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchExecuteStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchExecuteStatementOutput value) @@ -155,8 +155,8 @@ public static Amazon.DynamoDBv2.Model.BatchExecuteStatementResponse FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchExecuteStatementOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput(Amazon.DynamoDBv2.Model.BatchExecuteStatementResponse value) { - System.Collections.Generic.List var_responses = (System.Collections.Generic.List)value.Responses; - System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; + System.Collections.Generic.List var_responses = value.Responses; + System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchExecuteStatementOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput__M9_Responses(var_responses), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchExecuteStatementOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchGetItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemInput value) @@ -167,7 +167,7 @@ public static Amazon.DynamoDBv2.Model.BatchGetItemRequest FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput(Amazon.DynamoDBv2.Model.BatchGetItemRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchGetItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M12_RequestItems(value.RequestItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchGetItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemOutput value) @@ -179,9 +179,9 @@ public static Amazon.DynamoDBv2.Model.BatchGetItemResponse FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchGetItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput(Amazon.DynamoDBv2.Model.BatchGetItemResponse value) { - System.Collections.Generic.Dictionary>> var_responses = (System.Collections.Generic.Dictionary>>)value.Responses; - System.Collections.Generic.Dictionary var_unprocessedKeys = (System.Collections.Generic.Dictionary)value.UnprocessedKeys; - System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; + System.Collections.Generic.Dictionary>> var_responses = value.Responses; + System.Collections.Generic.Dictionary var_unprocessedKeys = value.UnprocessedKeys; + System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchGetItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput__M9_Responses(var_responses), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput__M15_UnprocessedKeys(var_unprocessedKeys), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetItemOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.BatchWriteItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemInput value) @@ -193,8 +193,8 @@ public static Amazon.DynamoDBv2.Model.BatchWriteItemRequest FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput(Amazon.DynamoDBv2.Model.BatchWriteItemRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchWriteItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M12_RequestItems(value.RequestItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.BatchWriteItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemOutput value) @@ -206,9 +206,9 @@ public static Amazon.DynamoDBv2.Model.BatchWriteItemResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchWriteItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput(Amazon.DynamoDBv2.Model.BatchWriteItemResponse value) { - System.Collections.Generic.Dictionary> var_unprocessedItems = (System.Collections.Generic.Dictionary>)value.UnprocessedItems; - System.Collections.Generic.Dictionary> var_itemCollectionMetrics = (System.Collections.Generic.Dictionary>)value.ItemCollectionMetrics; - System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; + System.Collections.Generic.Dictionary> var_unprocessedItems = value.UnprocessedItems; + System.Collections.Generic.Dictionary> var_itemCollectionMetrics = value.ItemCollectionMetrics; + System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchWriteItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput__M16_UnprocessedItems(var_unprocessedItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BatchWriteItemOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.ConditionalCheckFailedException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ConditionalCheckFailedException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ConditionalCheckFailedException value) @@ -222,8 +222,8 @@ public static Amazon.DynamoDBv2.Model.ConditionalCheckFailedException FromDafny_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ConditionalCheckFailedException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ConditionalCheckFailedException(Amazon.DynamoDBv2.Model.ConditionalCheckFailedException value) { - string var_message = (string)value.Message; - System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; + string var_message = value.Message; + System.Collections.Generic.Dictionary var_item = value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ConditionalCheckFailedException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ConditionalCheckFailedException__M7_message(var_message) , @@ -238,7 +238,7 @@ public static Amazon.DynamoDBv2.Model.ContinuousBackupsUnavailableException From } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ContinuousBackupsUnavailableException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_ContinuousBackupsUnavailableException(Amazon.DynamoDBv2.Model.ContinuousBackupsUnavailableException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ContinuousBackupsUnavailableException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_ContinuousBackupsUnavailableException__M7_message(var_message) ); @@ -261,7 +261,7 @@ public static Amazon.DynamoDBv2.Model.CreateBackupResponse FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CreateBackupOutput(Amazon.DynamoDBv2.Model.CreateBackupResponse value) { - Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = (Amazon.DynamoDBv2.Model.BackupDetails)value.BackupDetails; + Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = value.BackupDetails; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CreateBackupOutput__M13_BackupDetails(var_backupDetails)); } public static Amazon.DynamoDBv2.Model.CreateGlobalTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalTableInput value) @@ -282,7 +282,7 @@ public static Amazon.DynamoDBv2.Model.CreateGlobalTableResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_CreateGlobalTableOutput(Amazon.DynamoDBv2.Model.CreateGlobalTableResponse value) { - Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = (Amazon.DynamoDBv2.Model.GlobalTableDescription)value.GlobalTableDescription; + Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = value.GlobalTableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_CreateGlobalTableOutput__M22_GlobalTableDescription(var_globalTableDescription)); } public static Amazon.DynamoDBv2.Model.CreateTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableInput value) @@ -305,17 +305,17 @@ public static Amazon.DynamoDBv2.Model.CreateTableRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput(Amazon.DynamoDBv2.Model.CreateTableRequest value) { - System.Collections.Generic.List var_localSecondaryIndexes = (System.Collections.Generic.List)value.LocalSecondaryIndexes; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamSpecification; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecification; - System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; - Amazon.DynamoDBv2.TableClass var_tableClass = (Amazon.DynamoDBv2.TableClass)value.TableClass; - bool? var_deletionProtectionEnabled = (bool?)value.DeletionProtectionEnabled; - string var_resourcePolicy = (string)value.ResourcePolicy; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + System.Collections.Generic.List var_localSecondaryIndexes = value.LocalSecondaryIndexes; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = value.StreamSpecification; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = value.SSESpecification; + System.Collections.Generic.List var_tags = value.Tags; + Amazon.DynamoDBv2.TableClass var_tableClass = value.TableClass; + bool? var_deletionProtectionEnabled = value.DeletionProtectionEnabled; + string var_resourcePolicy = value.ResourcePolicy; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateTableInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M20_AttributeDefinitions(value.AttributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M19_StreamSpecification(var_streamSpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M16_SSESpecification(var_sSESpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M10_TableClass(var_tableClass), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M25_DeletionProtectionEnabled(var_deletionProtectionEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M14_ResourcePolicy(var_resourcePolicy), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.CreateTableResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateTableOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableOutput value) @@ -325,7 +325,7 @@ public static Amazon.DynamoDBv2.Model.CreateTableResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateTableOutput(Amazon.DynamoDBv2.Model.CreateTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateTableOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.DeleteBackupRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteBackupInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteBackupInput value) @@ -345,7 +345,7 @@ public static Amazon.DynamoDBv2.Model.DeleteBackupResponse FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DeleteBackupOutput(Amazon.DynamoDBv2.Model.DeleteBackupResponse value) { - Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = (Amazon.DynamoDBv2.Model.BackupDescription)value.BackupDescription; + Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = value.BackupDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DeleteBackupOutput__M17_BackupDescription(var_backupDescription)); } public static Amazon.DynamoDBv2.Model.DeleteItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemInput value) @@ -365,15 +365,15 @@ public static Amazon.DynamoDBv2.Model.DeleteItemRequest FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput(Amazon.DynamoDBv2.Model.DeleteItemRequest value) { - System.Collections.Generic.Dictionary var_expected = (System.Collections.Generic.Dictionary)value.Expected; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; - Amazon.DynamoDBv2.ReturnValue var_returnValues = (Amazon.DynamoDBv2.ReturnValue)value.ReturnValues; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; - string var_conditionExpression = (string)value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_expected = value.Expected; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; + Amazon.DynamoDBv2.ReturnValue var_returnValues = value.ReturnValues; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; + string var_conditionExpression = value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M8_Expected(var_expected), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M12_ReturnValues(var_returnValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.DeleteItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemOutput value) @@ -385,9 +385,9 @@ public static Amazon.DynamoDBv2.Model.DeleteItemResponse FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput(Amazon.DynamoDBv2.Model.DeleteItemResponse value) { - System.Collections.Generic.Dictionary var_attributes = (System.Collections.Generic.Dictionary)value.Attributes; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; - Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = (Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value.ItemCollectionMetrics; + System.Collections.Generic.Dictionary var_attributes = value.Attributes; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput__M10_Attributes(var_attributes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyInput value) @@ -398,7 +398,7 @@ public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyRequest FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput(Amazon.DynamoDBv2.Model.DeleteResourcePolicyRequest value) { - string var_expectedRevisionId = (string)value.ExpectedRevisionId; + string var_expectedRevisionId = value.ExpectedRevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M11_ResourceArn(value.ResourceArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M18_ExpectedRevisionId(var_expectedRevisionId)); } public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_DeleteResourcePolicyOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyOutput value) @@ -408,7 +408,7 @@ public static Amazon.DynamoDBv2.Model.DeleteResourcePolicyResponse FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteResourcePolicyOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_DeleteResourcePolicyOutput(Amazon.DynamoDBv2.Model.DeleteResourcePolicyResponse value) { - string var_revisionId = (string)value.RevisionId; + string var_revisionId = value.RevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteResourcePolicyOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_DeleteResourcePolicyOutput__M10_RevisionId(var_revisionId)); } public static Amazon.DynamoDBv2.Model.DeleteTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteTableInput value) @@ -428,7 +428,7 @@ public static Amazon.DynamoDBv2.Model.DeleteTableResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteTableOutput(Amazon.DynamoDBv2.Model.DeleteTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DeleteTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteTableOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.DescribeBackupRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeBackupInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeBackupInput value) @@ -448,7 +448,7 @@ public static Amazon.DynamoDBv2.Model.DescribeBackupResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeBackupOutput(Amazon.DynamoDBv2.Model.DescribeBackupResponse value) { - Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = (Amazon.DynamoDBv2.Model.BackupDescription)value.BackupDescription; + Amazon.DynamoDBv2.Model.BackupDescription var_backupDescription = value.BackupDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeBackupOutput__M17_BackupDescription(var_backupDescription)); } public static Amazon.DynamoDBv2.Model.DescribeContinuousBackupsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_DescribeContinuousBackupsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContinuousBackupsInput value) @@ -468,7 +468,7 @@ public static Amazon.DynamoDBv2.Model.DescribeContinuousBackupsResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContinuousBackupsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_DescribeContinuousBackupsOutput(Amazon.DynamoDBv2.Model.DescribeContinuousBackupsResponse value) { - Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = (Amazon.DynamoDBv2.Model.ContinuousBackupsDescription)value.ContinuousBackupsDescription; + Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = value.ContinuousBackupsDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContinuousBackupsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_DescribeContinuousBackupsOutput__M28_ContinuousBackupsDescription(var_continuousBackupsDescription)); } public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsInput value) @@ -479,7 +479,7 @@ public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsRequest FromDaf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput(Amazon.DynamoDBv2.Model.DescribeContributorInsightsRequest value) { - string var_indexName = (string)value.IndexName; + string var_indexName = value.IndexName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContributorInsightsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_IndexName(var_indexName)); } public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsOutput value) @@ -494,12 +494,12 @@ public static Amazon.DynamoDBv2.Model.DescribeContributorInsightsResponse FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeContributorInsightsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput(Amazon.DynamoDBv2.Model.DescribeContributorInsightsResponse value) { - string var_tableName = (string)value.TableName; - string var_indexName = (string)value.IndexName; - System.Collections.Generic.List var_contributorInsightsRuleList = (System.Collections.Generic.List)value.ContributorInsightsRuleList; - Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = (Amazon.DynamoDBv2.ContributorInsightsStatus)value.ContributorInsightsStatus; - System.DateTime? var_lastUpdateDateTime = (System.DateTime?)value.LastUpdateDateTime; - Amazon.DynamoDBv2.Model.FailureException var_failureException = (Amazon.DynamoDBv2.Model.FailureException)value.FailureException; + string var_tableName = value.TableName; + string var_indexName = value.IndexName; + System.Collections.Generic.List var_contributorInsightsRuleList = value.ContributorInsightsRuleList; + Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = value.ContributorInsightsStatus; + System.DateTime? var_lastUpdateDateTime = value.LastUpdateDateTime; + Amazon.DynamoDBv2.Model.FailureException var_failureException = value.FailureException; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeContributorInsightsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M27_ContributorInsightsRuleList(var_contributorInsightsRuleList), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M25_ContributorInsightsStatus(var_contributorInsightsStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M18_LastUpdateDateTime(var_lastUpdateDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeContributorInsightsOutput__M16_FailureException(var_failureException)); } public static Amazon.DynamoDBv2.Model.DescribeEndpointsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeEndpointsRequest(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeEndpointsRequest value) @@ -539,7 +539,7 @@ public static Amazon.DynamoDBv2.Model.DescribeExportResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeExportOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeExportOutput(Amazon.DynamoDBv2.Model.DescribeExportResponse value) { - Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = (Amazon.DynamoDBv2.Model.ExportDescription)value.ExportDescription; + Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = value.ExportDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeExportOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeExportOutput__M17_ExportDescription(var_exportDescription)); } public static Amazon.DynamoDBv2.Model.DescribeGlobalTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeGlobalTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableInput value) @@ -559,7 +559,7 @@ public static Amazon.DynamoDBv2.Model.DescribeGlobalTableResponse FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeGlobalTableOutput(Amazon.DynamoDBv2.Model.DescribeGlobalTableResponse value) { - Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = (Amazon.DynamoDBv2.Model.GlobalTableDescription)value.GlobalTableDescription; + Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = value.GlobalTableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeGlobalTableOutput__M22_GlobalTableDescription(var_globalTableDescription)); } public static Amazon.DynamoDBv2.Model.DescribeGlobalTableSettingsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeGlobalTableSettingsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableSettingsInput value) @@ -580,8 +580,8 @@ public static Amazon.DynamoDBv2.Model.DescribeGlobalTableSettingsResponse FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeGlobalTableSettingsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput(Amazon.DynamoDBv2.Model.DescribeGlobalTableSettingsResponse value) { - string var_globalTableName = (string)value.GlobalTableName; - System.Collections.Generic.List var_replicaSettings = (System.Collections.Generic.List)value.ReplicaSettings; + string var_globalTableName = value.GlobalTableName; + System.Collections.Generic.List var_replicaSettings = value.ReplicaSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeGlobalTableSettingsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput__M15_GlobalTableName(var_globalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput__M15_ReplicaSettings(var_replicaSettings)); } public static Amazon.DynamoDBv2.Model.DescribeImportRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeImportInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeImportInput value) @@ -622,8 +622,8 @@ public static Amazon.DynamoDBv2.Model.DescribeKinesisStreamingDestinationRespons public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.DescribeKinesisStreamingDestinationResponse value) { - string var_tableName = (string)value.TableName; - System.Collections.Generic.List var_kinesisDataStreamDestinations = (System.Collections.Generic.List)value.KinesisDataStreamDestinations; + string var_tableName = value.TableName; + System.Collections.Generic.List var_kinesisDataStreamDestinations = value.KinesisDataStreamDestinations; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput__M29_KinesisDataStreamDestinations(var_kinesisDataStreamDestinations)); } public static Amazon.DynamoDBv2.Model.DescribeLimitsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeLimitsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeLimitsInput value) @@ -646,10 +646,10 @@ public static Amazon.DynamoDBv2.Model.DescribeLimitsResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeLimitsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput(Amazon.DynamoDBv2.Model.DescribeLimitsResponse value) { - long? var_accountMaxReadCapacityUnits = (long?)value.AccountMaxReadCapacityUnits; - long? var_accountMaxWriteCapacityUnits = (long?)value.AccountMaxWriteCapacityUnits; - long? var_tableMaxReadCapacityUnits = (long?)value.TableMaxReadCapacityUnits; - long? var_tableMaxWriteCapacityUnits = (long?)value.TableMaxWriteCapacityUnits; + long? var_accountMaxReadCapacityUnits = value.AccountMaxReadCapacityUnits; + long? var_accountMaxWriteCapacityUnits = value.AccountMaxWriteCapacityUnits; + long? var_tableMaxReadCapacityUnits = value.TableMaxReadCapacityUnits; + long? var_tableMaxWriteCapacityUnits = value.TableMaxWriteCapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeLimitsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M27_AccountMaxReadCapacityUnits(var_accountMaxReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M28_AccountMaxWriteCapacityUnits(var_accountMaxWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M25_TableMaxReadCapacityUnits(var_tableMaxReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeLimitsOutput__M26_TableMaxWriteCapacityUnits(var_tableMaxWriteCapacityUnits)); } public static Amazon.DynamoDBv2.Model.DescribeTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DescribeTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableInput value) @@ -669,7 +669,7 @@ public static Amazon.DynamoDBv2.Model.DescribeTableResponse FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeTableOutput(Amazon.DynamoDBv2.Model.DescribeTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_table = (Amazon.DynamoDBv2.Model.TableDescription)value.Table; + Amazon.DynamoDBv2.Model.TableDescription var_table = value.Table; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeTableOutput__M5_Table(var_table)); } public static Amazon.DynamoDBv2.Model.DescribeTableReplicaAutoScalingRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_DescribeTableReplicaAutoScalingInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableReplicaAutoScalingInput value) @@ -689,7 +689,7 @@ public static Amazon.DynamoDBv2.Model.DescribeTableReplicaAutoScalingResponse Fr public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTableReplicaAutoScalingOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_DescribeTableReplicaAutoScalingOutput(Amazon.DynamoDBv2.Model.DescribeTableReplicaAutoScalingResponse value) { - Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = (Amazon.DynamoDBv2.Model.TableAutoScalingDescription)value.TableAutoScalingDescription; + Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = value.TableAutoScalingDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTableReplicaAutoScalingOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_DescribeTableReplicaAutoScalingOutput__M27_TableAutoScalingDescription(var_tableAutoScalingDescription)); } public static Amazon.DynamoDBv2.Model.DescribeTimeToLiveRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_DescribeTimeToLiveInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTimeToLiveInput value) @@ -709,7 +709,7 @@ public static Amazon.DynamoDBv2.Model.DescribeTimeToLiveResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDescribeTimeToLiveOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeTimeToLiveOutput(Amazon.DynamoDBv2.Model.DescribeTimeToLiveResponse value) { - Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = (Amazon.DynamoDBv2.Model.TimeToLiveDescription)value.TimeToLiveDescription; + Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = value.TimeToLiveDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DescribeTimeToLiveOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeTimeToLiveOutput__M21_TimeToLiveDescription(var_timeToLiveDescription)); } public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationInput value) @@ -721,7 +721,7 @@ public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationRequest public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput(Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationRequest value) { - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_StreamArn(value.StreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationOutput value) @@ -734,10 +734,10 @@ public static Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationResponse public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDisableKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.DisableKinesisStreamingDestinationResponse value) { - string var_tableName = (string)value.TableName; - string var_streamArn = (string)value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; + string var_tableName = value.TableName; + string var_streamArn = value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.DisableKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DisableKinesisStreamingDestinationOutput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.DuplicateItemException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_DuplicateItemException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_DuplicateItemException value) @@ -748,7 +748,7 @@ public static Amazon.DynamoDBv2.Model.DuplicateItemException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_DuplicateItemException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_DuplicateItemException(Amazon.DynamoDBv2.Model.DuplicateItemException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_DuplicateItemException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_DuplicateItemException__M7_message(var_message) ); @@ -762,7 +762,7 @@ public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationRequest F public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingDestinationInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput(Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationRequest value) { - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_StreamArn(value.StreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingDestinationOutput value) @@ -775,10 +775,10 @@ public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationResponse public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.EnableKinesisStreamingDestinationResponse value) { - string var_tableName = (string)value.TableName; - string var_streamArn = (string)value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; - Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration)value.EnableKinesisStreamingConfiguration; + string var_tableName = value.TableName; + string var_streamArn = value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; + Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration var_enableKinesisStreamingConfiguration = value.EnableKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_EnableKinesisStreamingDestinationOutput__M35_EnableKinesisStreamingConfiguration(var_enableKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.ExecuteStatementRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementInput value) @@ -794,12 +794,12 @@ public static Amazon.DynamoDBv2.Model.ExecuteStatementRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput(Amazon.DynamoDBv2.Model.ExecuteStatementRequest value) { - System.Collections.Generic.List var_parameters = (System.Collections.Generic.List)value.Parameters; - bool? var_consistentRead = (bool?)value.ConsistentRead; - string var_nextToken = (string)value.NextToken; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - int? var_limit = (int?)value.Limit; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.List var_parameters = value.Parameters; + bool? var_consistentRead = value.ConsistentRead; + string var_nextToken = value.NextToken; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + int? var_limit = value.Limit; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteStatementInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M9_Statement(value.Statement), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M10_Parameters(var_parameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M9_NextToken(var_nextToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.ExecuteStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementOutput value) @@ -812,10 +812,10 @@ public static Amazon.DynamoDBv2.Model.ExecuteStatementResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteStatementOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput(Amazon.DynamoDBv2.Model.ExecuteStatementResponse value) { - System.Collections.Generic.List> var_items = (System.Collections.Generic.List>)value.Items; - string var_nextToken = (string)value.NextToken; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; - System.Collections.Generic.Dictionary var_lastEvaluatedKey = (System.Collections.Generic.Dictionary)value.LastEvaluatedKey; + System.Collections.Generic.List> var_items = value.Items; + string var_nextToken = value.NextToken; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.Dictionary var_lastEvaluatedKey = value.LastEvaluatedKey; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteStatementOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M5_Items(var_items), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M9_NextToken(var_nextToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExecuteStatementOutput__M16_LastEvaluatedKey(var_lastEvaluatedKey)); } public static Amazon.DynamoDBv2.Model.ExecuteTransactionRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionInput value) @@ -827,8 +827,8 @@ public static Amazon.DynamoDBv2.Model.ExecuteTransactionRequest FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput(Amazon.DynamoDBv2.Model.ExecuteTransactionRequest value) { - string var_clientRequestToken = (string)value.ClientRequestToken; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + string var_clientRequestToken = value.ClientRequestToken; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteTransactionInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_TransactStatements(value.TransactStatements), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_ClientRequestToken(var_clientRequestToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.ExecuteTransactionResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionOutput value) @@ -839,8 +839,8 @@ public static Amazon.DynamoDBv2.Model.ExecuteTransactionResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExecuteTransactionOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput(Amazon.DynamoDBv2.Model.ExecuteTransactionResponse value) { - System.Collections.Generic.List var_responses = (System.Collections.Generic.List)value.Responses; - System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; + System.Collections.Generic.List var_responses = value.Responses; + System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExecuteTransactionOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput__M9_Responses(var_responses), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ExecuteTransactionOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.ExportConflictException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportConflictException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportConflictException value) @@ -851,7 +851,7 @@ public static Amazon.DynamoDBv2.Model.ExportConflictException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportConflictException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportConflictException(Amazon.DynamoDBv2.Model.ExportConflictException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportConflictException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportConflictException__M7_message(var_message) ); @@ -864,7 +864,7 @@ public static Amazon.DynamoDBv2.Model.ExportNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportNotFoundException(Amazon.DynamoDBv2.Model.ExportNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ExportNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExportNotFoundException__M7_message(var_message) ); @@ -886,15 +886,15 @@ public static Amazon.DynamoDBv2.Model.ExportTableToPointInTimeRequest FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportTableToPointInTimeInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput(Amazon.DynamoDBv2.Model.ExportTableToPointInTimeRequest value) { - System.DateTime? var_exportTime = (System.DateTime?)value.ExportTime; - string var_clientToken = (string)value.ClientToken; - string var_s3BucketOwner = (string)value.S3BucketOwner; - string var_s3Prefix = (string)value.S3Prefix; - Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = (Amazon.DynamoDBv2.S3SseAlgorithm)value.S3SseAlgorithm; - string var_s3SseKmsKeyId = (string)value.S3SseKmsKeyId; - Amazon.DynamoDBv2.ExportFormat var_exportFormat = (Amazon.DynamoDBv2.ExportFormat)value.ExportFormat; - Amazon.DynamoDBv2.ExportType var_exportType = (Amazon.DynamoDBv2.ExportType)value.ExportType; - Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = (Amazon.DynamoDBv2.Model.IncrementalExportSpecification)value.IncrementalExportSpecification; + System.DateTime? var_exportTime = value.ExportTime; + string var_clientToken = value.ClientToken; + string var_s3BucketOwner = value.S3BucketOwner; + string var_s3Prefix = value.S3Prefix; + Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = value.S3SseAlgorithm; + string var_s3SseKmsKeyId = value.S3SseKmsKeyId; + Amazon.DynamoDBv2.ExportFormat var_exportFormat = value.ExportFormat; + Amazon.DynamoDBv2.ExportType var_exportType = value.ExportType; + Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = value.IncrementalExportSpecification; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_TableArn(value.TableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M10_ExportTime(var_exportTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_S3Bucket(value.S3Bucket), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M13_S3BucketOwner(var_s3BucketOwner), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_S3Prefix(var_s3Prefix), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M14_S3SseAlgorithm(var_s3SseAlgorithm), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M13_S3SseKmsKeyId(var_s3SseKmsKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M12_ExportFormat(var_exportFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M10_ExportType(var_exportType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M30_IncrementalExportSpecification(var_incrementalExportSpecification)); } public static Amazon.DynamoDBv2.Model.ExportTableToPointInTimeResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ExportTableToPointInTimeOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportTableToPointInTimeOutput value) @@ -904,7 +904,7 @@ public static Amazon.DynamoDBv2.Model.ExportTableToPointInTimeResponse FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportTableToPointInTimeOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ExportTableToPointInTimeOutput(Amazon.DynamoDBv2.Model.ExportTableToPointInTimeResponse value) { - Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = (Amazon.DynamoDBv2.Model.ExportDescription)value.ExportDescription; + Amazon.DynamoDBv2.Model.ExportDescription var_exportDescription = value.ExportDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportTableToPointInTimeOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ExportTableToPointInTimeOutput__M17_ExportDescription(var_exportDescription)); } public static Amazon.DynamoDBv2.Model.GetItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemInput value) @@ -920,11 +920,11 @@ public static Amazon.DynamoDBv2.Model.GetItemRequest FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput(Amazon.DynamoDBv2.Model.GetItemRequest value) { - System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; - bool? var_consistentRead = (bool?)value.ConsistentRead; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - string var_projectionExpression = (string)value.ProjectionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; + bool? var_consistentRead = value.ConsistentRead; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + string var_projectionExpression = value.ProjectionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames)); } public static Amazon.DynamoDBv2.Model.GetItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemOutput value) @@ -935,8 +935,8 @@ public static Amazon.DynamoDBv2.Model.GetItemResponse FromDafny_N3_com__N9_amazo public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput(Amazon.DynamoDBv2.Model.GetItemResponse value) { - System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + System.Collections.Generic.Dictionary var_item = value.Item; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GetItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput__M4_Item(var_item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_GetItemOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.GetResourcePolicyRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GetResourcePolicyInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetResourcePolicyInput value) @@ -957,8 +957,8 @@ public static Amazon.DynamoDBv2.Model.GetResourcePolicyResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGetResourcePolicyOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput(Amazon.DynamoDBv2.Model.GetResourcePolicyResponse value) { - string var_policy = (string)value.Policy; - string var_revisionId = (string)value.RevisionId; + string var_policy = value.Policy; + string var_revisionId = value.RevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GetResourcePolicyOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput__M10_RevisionId(var_revisionId)); } public static Amazon.DynamoDBv2.Model.GlobalTableAlreadyExistsException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_GlobalTableAlreadyExistsException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableAlreadyExistsException value) @@ -969,7 +969,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableAlreadyExistsException FromDafn } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableAlreadyExistsException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_GlobalTableAlreadyExistsException(Amazon.DynamoDBv2.Model.GlobalTableAlreadyExistsException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableAlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_GlobalTableAlreadyExistsException__M7_message(var_message) ); @@ -982,7 +982,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableNotFoundException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_GlobalTableNotFoundException(Amazon.DynamoDBv2.Model.GlobalTableNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_GlobalTableNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_GlobalTableNotFoundException__M7_message(var_message) ); @@ -995,7 +995,7 @@ public static Amazon.DynamoDBv2.Model.IdempotentParameterMismatchException FromD } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IdempotentParameterMismatchException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_IdempotentParameterMismatchException(Amazon.DynamoDBv2.Model.IdempotentParameterMismatchException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IdempotentParameterMismatchException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_IdempotentParameterMismatchException__M7_Message(var_message) ); @@ -1008,7 +1008,7 @@ public static Amazon.DynamoDBv2.Model.ImportConflictException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportConflictException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportConflictException(Amazon.DynamoDBv2.Model.ImportConflictException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportConflictException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportConflictException__M7_message(var_message) ); @@ -1021,7 +1021,7 @@ public static Amazon.DynamoDBv2.Model.ImportNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportNotFoundException(Amazon.DynamoDBv2.Model.ImportNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ImportNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ImportNotFoundException__M7_message(var_message) ); @@ -1038,9 +1038,9 @@ public static Amazon.DynamoDBv2.Model.ImportTableRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput(Amazon.DynamoDBv2.Model.ImportTableRequest value) { - string var_clientToken = (string)value.ClientToken; - Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = (Amazon.DynamoDBv2.Model.InputFormatOptions)value.InputFormatOptions; - Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = (Amazon.DynamoDBv2.InputCompressionType)value.InputCompressionType; + string var_clientToken = value.ClientToken; + Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = value.InputFormatOptions; + Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = value.InputCompressionType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M14_S3BucketSource(value.S3BucketSource), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_InputFormat(value.InputFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M18_InputFormatOptions(var_inputFormatOptions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M20_InputCompressionType(var_inputCompressionType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M23_TableCreationParameters(value.TableCreationParameters)); } public static Amazon.DynamoDBv2.Model.ImportTableResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportTableOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableOutput value) @@ -1061,7 +1061,7 @@ public static Amazon.DynamoDBv2.Model.IndexNotFoundException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IndexNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_IndexNotFoundException(Amazon.DynamoDBv2.Model.IndexNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_IndexNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_IndexNotFoundException__M7_message(var_message) ); @@ -1074,7 +1074,7 @@ public static Amazon.DynamoDBv2.Model.InternalServerErrorException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InternalServerError ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_InternalServerError(Amazon.DynamoDBv2.Model.InternalServerErrorException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InternalServerError( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_InternalServerError__M7_message(var_message) ); @@ -1087,7 +1087,7 @@ public static Amazon.DynamoDBv2.Model.InvalidExportTimeException FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidExportTimeException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_InvalidExportTimeException(Amazon.DynamoDBv2.Model.InvalidExportTimeException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidExportTimeException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_InvalidExportTimeException__M7_message(var_message) ); @@ -1100,7 +1100,7 @@ public static Amazon.DynamoDBv2.Model.InvalidRestoreTimeException FromDafny_N3_c } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_InvalidRestoreTimeException(Amazon.DynamoDBv2.Model.InvalidRestoreTimeException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_InvalidRestoreTimeException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_InvalidRestoreTimeException__M7_message(var_message) ); @@ -1113,7 +1113,7 @@ public static Amazon.DynamoDBv2.Model.ItemCollectionSizeLimitExceededException F } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_ItemCollectionSizeLimitExceededException(Amazon.DynamoDBv2.Model.ItemCollectionSizeLimitExceededException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ItemCollectionSizeLimitExceededException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_ItemCollectionSizeLimitExceededException__M7_message(var_message) ); @@ -1126,7 +1126,7 @@ public static Amazon.DynamoDBv2.Model.LimitExceededException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_LimitExceededException(Amazon.DynamoDBv2.Model.LimitExceededException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_LimitExceededException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_LimitExceededException__M7_message(var_message) ); @@ -1143,12 +1143,12 @@ public static Amazon.DynamoDBv2.Model.ListBackupsRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListBackupsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput(Amazon.DynamoDBv2.Model.ListBackupsRequest value) { - string var_tableName = (string)value.TableName; - int? var_limit = (int?)value.Limit; - System.DateTime? var_timeRangeLowerBound = (System.DateTime?)value.TimeRangeLowerBound; - System.DateTime? var_timeRangeUpperBound = (System.DateTime?)value.TimeRangeUpperBound; - string var_exclusiveStartBackupArn = (string)value.ExclusiveStartBackupArn; - Amazon.DynamoDBv2.BackupTypeFilter var_backupType = (Amazon.DynamoDBv2.BackupTypeFilter)value.BackupType; + string var_tableName = value.TableName; + int? var_limit = value.Limit; + System.DateTime? var_timeRangeLowerBound = value.TimeRangeLowerBound; + System.DateTime? var_timeRangeUpperBound = value.TimeRangeUpperBound; + string var_exclusiveStartBackupArn = value.ExclusiveStartBackupArn; + Amazon.DynamoDBv2.BackupTypeFilter var_backupType = value.BackupType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListBackupsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M19_TimeRangeLowerBound(var_timeRangeLowerBound), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M19_TimeRangeUpperBound(var_timeRangeUpperBound), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M23_ExclusiveStartBackupArn(var_exclusiveStartBackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListBackupsInput__M10_BackupType(var_backupType)); } public static Amazon.DynamoDBv2.Model.ListBackupsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListBackupsOutput value) @@ -1159,8 +1159,8 @@ public static Amazon.DynamoDBv2.Model.ListBackupsResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListBackupsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput(Amazon.DynamoDBv2.Model.ListBackupsResponse value) { - System.Collections.Generic.List var_backupSummaries = (System.Collections.Generic.List)value.BackupSummaries; - string var_lastEvaluatedBackupArn = (string)value.LastEvaluatedBackupArn; + System.Collections.Generic.List var_backupSummaries = value.BackupSummaries; + string var_lastEvaluatedBackupArn = value.LastEvaluatedBackupArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListBackupsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput__M15_BackupSummaries(var_backupSummaries), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListBackupsOutput__M22_LastEvaluatedBackupArn(var_lastEvaluatedBackupArn)); } public static Amazon.DynamoDBv2.Model.ListContributorInsightsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsInput value) @@ -1172,9 +1172,9 @@ public static Amazon.DynamoDBv2.Model.ListContributorInsightsRequest FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput(Amazon.DynamoDBv2.Model.ListContributorInsightsRequest value) { - string var_tableName = (string)value.TableName; - string var_nextToken = (string)value.NextToken; - int? var_maxResults = (int?)value.MaxResults; + string var_tableName = value.TableName; + string var_nextToken = value.NextToken; + int? var_maxResults = value.MaxResults; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListContributorInsightsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput__M9_NextToken(var_nextToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ListContributorInsightsInput__M10_MaxResults(var_maxResults)); } public static Amazon.DynamoDBv2.Model.ListContributorInsightsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsOutput value) @@ -1185,8 +1185,8 @@ public static Amazon.DynamoDBv2.Model.ListContributorInsightsResponse FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListContributorInsightsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput(Amazon.DynamoDBv2.Model.ListContributorInsightsResponse value) { - System.Collections.Generic.List var_contributorInsightsSummaries = (System.Collections.Generic.List)value.ContributorInsightsSummaries; - string var_nextToken = (string)value.NextToken; + System.Collections.Generic.List var_contributorInsightsSummaries = value.ContributorInsightsSummaries; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListContributorInsightsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput__M28_ContributorInsightsSummaries(var_contributorInsightsSummaries), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ListContributorInsightsOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListExportsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsInput value) @@ -1198,9 +1198,9 @@ public static Amazon.DynamoDBv2.Model.ListExportsRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput(Amazon.DynamoDBv2.Model.ListExportsRequest value) { - string var_tableArn = (string)value.TableArn; - int? var_maxResults = (int?)value.MaxResults; - string var_nextToken = (string)value.NextToken; + string var_tableArn = value.TableArn; + int? var_maxResults = value.MaxResults; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListExportsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput__M10_MaxResults(var_maxResults), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListExportsInput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListExportsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsOutput value) @@ -1211,8 +1211,8 @@ public static Amazon.DynamoDBv2.Model.ListExportsResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListExportsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput(Amazon.DynamoDBv2.Model.ListExportsResponse value) { - System.Collections.Generic.List var_exportSummaries = (System.Collections.Generic.List)value.ExportSummaries; - string var_nextToken = (string)value.NextToken; + System.Collections.Generic.List var_exportSummaries = value.ExportSummaries; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListExportsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput__M15_ExportSummaries(var_exportSummaries), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListExportsOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListGlobalTablesRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesInput value) @@ -1224,9 +1224,9 @@ public static Amazon.DynamoDBv2.Model.ListGlobalTablesRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput(Amazon.DynamoDBv2.Model.ListGlobalTablesRequest value) { - string var_exclusiveStartGlobalTableName = (string)value.ExclusiveStartGlobalTableName; - int? var_limit = (int?)value.Limit; - string var_regionName = (string)value.RegionName; + string var_exclusiveStartGlobalTableName = value.ExclusiveStartGlobalTableName; + int? var_limit = value.Limit; + string var_regionName = value.RegionName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListGlobalTablesInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput__M29_ExclusiveStartGlobalTableName(var_exclusiveStartGlobalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ListGlobalTablesInput__M10_RegionName(var_regionName)); } public static Amazon.DynamoDBv2.Model.ListGlobalTablesResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesOutput value) @@ -1237,8 +1237,8 @@ public static Amazon.DynamoDBv2.Model.ListGlobalTablesResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListGlobalTablesOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput(Amazon.DynamoDBv2.Model.ListGlobalTablesResponse value) { - System.Collections.Generic.List var_globalTables = (System.Collections.Generic.List)value.GlobalTables; - string var_lastEvaluatedGlobalTableName = (string)value.LastEvaluatedGlobalTableName; + System.Collections.Generic.List var_globalTables = value.GlobalTables; + string var_lastEvaluatedGlobalTableName = value.LastEvaluatedGlobalTableName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListGlobalTablesOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput__M12_GlobalTables(var_globalTables), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ListGlobalTablesOutput__M28_LastEvaluatedGlobalTableName(var_lastEvaluatedGlobalTableName)); } public static Amazon.DynamoDBv2.Model.ListImportsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsInput value) @@ -1250,9 +1250,9 @@ public static Amazon.DynamoDBv2.Model.ListImportsRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput(Amazon.DynamoDBv2.Model.ListImportsRequest value) { - string var_tableArn = (string)value.TableArn; - int? var_pageSize = (int?)value.PageSize; - string var_nextToken = (string)value.NextToken; + string var_tableArn = value.TableArn; + int? var_pageSize = value.PageSize; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListImportsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput__M8_PageSize(var_pageSize), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListImportsInput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListImportsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsOutput value) @@ -1263,8 +1263,8 @@ public static Amazon.DynamoDBv2.Model.ListImportsResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListImportsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput(Amazon.DynamoDBv2.Model.ListImportsResponse value) { - System.Collections.Generic.List var_importSummaryList = (System.Collections.Generic.List)value.ImportSummaryList; - string var_nextToken = (string)value.NextToken; + System.Collections.Generic.List var_importSummaryList = value.ImportSummaryList; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListImportsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput__M17_ImportSummaryList(var_importSummaryList), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ListImportsOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListTablesRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesInput value) @@ -1275,8 +1275,8 @@ public static Amazon.DynamoDBv2.Model.ListTablesRequest FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput(Amazon.DynamoDBv2.Model.ListTablesRequest value) { - string var_exclusiveStartTableName = (string)value.ExclusiveStartTableName; - int? var_limit = (int?)value.Limit; + string var_exclusiveStartTableName = value.ExclusiveStartTableName; + int? var_limit = value.Limit; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTablesInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput__M23_ExclusiveStartTableName(var_exclusiveStartTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ListTablesInput__M5_Limit(var_limit)); } public static Amazon.DynamoDBv2.Model.ListTablesResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesOutput value) @@ -1287,8 +1287,8 @@ public static Amazon.DynamoDBv2.Model.ListTablesResponse FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTablesOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput(Amazon.DynamoDBv2.Model.ListTablesResponse value) { - System.Collections.Generic.List var_tableNames = (System.Collections.Generic.List)value.TableNames; - string var_lastEvaluatedTableName = (string)value.LastEvaluatedTableName; + System.Collections.Generic.List var_tableNames = value.TableNames; + string var_lastEvaluatedTableName = value.LastEvaluatedTableName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTablesOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput__M10_TableNames(var_tableNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ListTablesOutput__M22_LastEvaluatedTableName(var_lastEvaluatedTableName)); } public static Amazon.DynamoDBv2.Model.ListTagsOfResourceRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceInput value) @@ -1299,7 +1299,7 @@ public static Amazon.DynamoDBv2.Model.ListTagsOfResourceRequest FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput(Amazon.DynamoDBv2.Model.ListTagsOfResourceRequest value) { - string var_nextToken = (string)value.NextToken; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M11_ResourceArn(value.ResourceArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.ListTagsOfResourceResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceOutput value) @@ -1310,8 +1310,8 @@ public static Amazon.DynamoDBv2.Model.ListTagsOfResourceResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IListTagsOfResourceOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput(Amazon.DynamoDBv2.Model.ListTagsOfResourceResponse value) { - System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; - string var_nextToken = (string)value.NextToken; + System.Collections.Generic.List var_tags = value.Tags; + string var_nextToken = value.NextToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ListTagsOfResourceOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ListTagsOfResourceOutput__M9_NextToken(var_nextToken)); } public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryUnavailableException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_PointInTimeRecoveryUnavailableException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException value) @@ -1322,7 +1322,7 @@ public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryUnavailableException Fr } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_PointInTimeRecoveryUnavailableException(Amazon.DynamoDBv2.Model.PointInTimeRecoveryUnavailableException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PointInTimeRecoveryUnavailableException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_PointInTimeRecoveryUnavailableException__M7_message(var_message) ); @@ -1335,7 +1335,7 @@ public static Amazon.DynamoDBv2.Model.PolicyNotFoundException FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PolicyNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PolicyNotFoundException(Amazon.DynamoDBv2.Model.PolicyNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_PolicyNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PolicyNotFoundException__M7_message(var_message) ); @@ -1348,7 +1348,7 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughputExceededException Fro } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ProvisionedThroughputExceededException(Amazon.DynamoDBv2.Model.ProvisionedThroughputExceededException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ProvisionedThroughputExceededException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ProvisionedThroughputExceededException__M7_message(var_message) ); @@ -1370,15 +1370,15 @@ public static Amazon.DynamoDBv2.Model.PutItemRequest FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput(Amazon.DynamoDBv2.Model.PutItemRequest value) { - System.Collections.Generic.Dictionary var_expected = (System.Collections.Generic.Dictionary)value.Expected; - Amazon.DynamoDBv2.ReturnValue var_returnValues = (Amazon.DynamoDBv2.ReturnValue)value.ReturnValues; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; - string var_conditionExpression = (string)value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_expected = value.Expected; + Amazon.DynamoDBv2.ReturnValue var_returnValues = value.ReturnValues; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; + string var_conditionExpression = value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M4_Item(value.Item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M8_Expected(var_expected), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M12_ReturnValues(var_returnValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.PutItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutItemOutput value) @@ -1390,9 +1390,9 @@ public static Amazon.DynamoDBv2.Model.PutItemResponse FromDafny_N3_com__N9_amazo public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput(Amazon.DynamoDBv2.Model.PutItemResponse value) { - System.Collections.Generic.Dictionary var_attributes = (System.Collections.Generic.Dictionary)value.Attributes; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; - Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = (Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value.ItemCollectionMetrics; + System.Collections.Generic.Dictionary var_attributes = value.Attributes; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput__M10_Attributes(var_attributes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_PutItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.PutResourcePolicyRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyInput value) @@ -1405,8 +1405,8 @@ public static Amazon.DynamoDBv2.Model.PutResourcePolicyRequest FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput(Amazon.DynamoDBv2.Model.PutResourcePolicyRequest value) { - string var_expectedRevisionId = (string)value.ExpectedRevisionId; - bool? var_confirmRemoveSelfResourceAccess = (bool?)value.ConfirmRemoveSelfResourceAccess; + string var_expectedRevisionId = value.ExpectedRevisionId; + bool? var_confirmRemoveSelfResourceAccess = value.ConfirmRemoveSelfResourceAccess; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M11_ResourceArn(value.ResourceArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M6_Policy(value.Policy), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M18_ExpectedRevisionId(var_expectedRevisionId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M31_ConfirmRemoveSelfResourceAccess(var_confirmRemoveSelfResourceAccess)); } public static Amazon.DynamoDBv2.Model.PutResourcePolicyResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PutResourcePolicyOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyOutput value) @@ -1416,7 +1416,7 @@ public static Amazon.DynamoDBv2.Model.PutResourcePolicyResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPutResourcePolicyOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PutResourcePolicyOutput(Amazon.DynamoDBv2.Model.PutResourcePolicyResponse value) { - string var_revisionId = (string)value.RevisionId; + string var_revisionId = value.RevisionId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PutResourcePolicyOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_PutResourcePolicyOutput__M10_RevisionId(var_revisionId)); } public static Amazon.DynamoDBv2.Model.QueryRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryInput value) @@ -1442,22 +1442,22 @@ public static Amazon.DynamoDBv2.Model.QueryRequest FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput(Amazon.DynamoDBv2.Model.QueryRequest value) { - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.Select var_select = (Amazon.DynamoDBv2.Select)value.Select; - System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; - int? var_limit = (int?)value.Limit; - bool? var_consistentRead = (bool?)value.ConsistentRead; - System.Collections.Generic.Dictionary var_keyConditions = (System.Collections.Generic.Dictionary)value.KeyConditions; - System.Collections.Generic.Dictionary var_queryFilter = (System.Collections.Generic.Dictionary)value.QueryFilter; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; - bool? var_scanIndexForward = (bool?)value.ScanIndexForward; - System.Collections.Generic.Dictionary var_exclusiveStartKey = (System.Collections.Generic.Dictionary)value.ExclusiveStartKey; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - string var_projectionExpression = (string)value.ProjectionExpression; - string var_filterExpression = (string)value.FilterExpression; - string var_keyConditionExpression = (string)value.KeyConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.Select var_select = value.Select; + System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; + int? var_limit = value.Limit; + bool? var_consistentRead = value.ConsistentRead; + System.Collections.Generic.Dictionary var_keyConditions = value.KeyConditions; + System.Collections.Generic.Dictionary var_queryFilter = value.QueryFilter; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; + bool? var_scanIndexForward = value.ScanIndexForward; + System.Collections.Generic.Dictionary var_exclusiveStartKey = value.ExclusiveStartKey; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + string var_projectionExpression = value.ProjectionExpression; + string var_filterExpression = value.FilterExpression; + string var_keyConditionExpression = value.KeyConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M6_Select(var_select), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M13_KeyConditions(var_keyConditions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M11_QueryFilter(var_queryFilter), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M16_ScanIndexForward(var_scanIndexForward), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M17_ExclusiveStartKey(var_exclusiveStartKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M16_FilterExpression(var_filterExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M22_KeyConditionExpression(var_keyConditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M25_ExpressionAttributeValues(var_expressionAttributeValues)); } public static Amazon.DynamoDBv2.Model.QueryResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryOutput value) @@ -1471,11 +1471,11 @@ public static Amazon.DynamoDBv2.Model.QueryResponse FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IQueryOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput(Amazon.DynamoDBv2.Model.QueryResponse value) { - System.Collections.Generic.List> var_items = (System.Collections.Generic.List>)value.Items; - int? var_count = (int?)value.Count; - int? var_scannedCount = (int?)value.ScannedCount; - System.Collections.Generic.Dictionary var_lastEvaluatedKey = (System.Collections.Generic.Dictionary)value.LastEvaluatedKey; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + System.Collections.Generic.List> var_items = value.Items; + int? var_count = value.Count; + int? var_scannedCount = value.ScannedCount; + System.Collections.Generic.Dictionary var_lastEvaluatedKey = value.LastEvaluatedKey; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.QueryOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M5_Items(var_items), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M5_Count(var_count), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M12_ScannedCount(var_scannedCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M16_LastEvaluatedKey(var_lastEvaluatedKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_QueryOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.ReplicaAlreadyExistsException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAlreadyExistsException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException value) @@ -1486,7 +1486,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaAlreadyExistsException FromDafny_N3 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAlreadyExistsException(Amazon.DynamoDBv2.Model.ReplicaAlreadyExistsException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaAlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAlreadyExistsException__M7_message(var_message) ); @@ -1499,7 +1499,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaNotFoundException FromDafny_N3_com_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaNotFoundException(Amazon.DynamoDBv2.Model.ReplicaNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ReplicaNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaNotFoundException__M7_message(var_message) ); @@ -1512,7 +1512,7 @@ public static Amazon.DynamoDBv2.Model.RequestLimitExceededException FromDafny_N3 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_RequestLimitExceeded ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_RequestLimitExceeded(Amazon.DynamoDBv2.Model.RequestLimitExceededException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_RequestLimitExceeded( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_RequestLimitExceeded__M7_message(var_message) ); @@ -1525,7 +1525,7 @@ public static Amazon.DynamoDBv2.Model.ResourceInUseException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceInUseException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ResourceInUseException(Amazon.DynamoDBv2.Model.ResourceInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceInUseException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ResourceInUseException__M7_message(var_message) ); @@ -1538,7 +1538,7 @@ public static Amazon.DynamoDBv2.Model.ResourceNotFoundException FromDafny_N3_com } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ResourceNotFoundException(Amazon.DynamoDBv2.Model.ResourceNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_ResourceNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ResourceNotFoundException__M7_message(var_message) ); @@ -1557,12 +1557,12 @@ public static Amazon.DynamoDBv2.Model.RestoreTableFromBackupRequest FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableFromBackupInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput(Amazon.DynamoDBv2.Model.RestoreTableFromBackupRequest value) { - Amazon.DynamoDBv2.BillingMode var_billingModeOverride = (Amazon.DynamoDBv2.BillingMode)value.BillingModeOverride; - System.Collections.Generic.List var_globalSecondaryIndexOverride = (System.Collections.Generic.List)value.GlobalSecondaryIndexOverride; - System.Collections.Generic.List var_localSecondaryIndexOverride = (System.Collections.Generic.List)value.LocalSecondaryIndexOverride; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughputOverride; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecificationOverride; + Amazon.DynamoDBv2.BillingMode var_billingModeOverride = value.BillingModeOverride; + System.Collections.Generic.List var_globalSecondaryIndexOverride = value.GlobalSecondaryIndexOverride; + System.Collections.Generic.List var_localSecondaryIndexOverride = value.LocalSecondaryIndexOverride; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = value.SSESpecificationOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M15_TargetTableName(value.TargetTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M9_BackupArn(value.BackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M19_BillingModeOverride(var_billingModeOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M28_GlobalSecondaryIndexOverride(var_globalSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M27_LocalSecondaryIndexOverride(var_localSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M24_SSESpecificationOverride(var_sSESpecificationOverride)); } public static Amazon.DynamoDBv2.Model.RestoreTableFromBackupResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_RestoreTableFromBackupOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableFromBackupOutput value) @@ -1572,7 +1572,7 @@ public static Amazon.DynamoDBv2.Model.RestoreTableFromBackupResponse FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableFromBackupOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_RestoreTableFromBackupOutput(Amazon.DynamoDBv2.Model.RestoreTableFromBackupResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableFromBackupOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_RestoreTableFromBackupOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeInput value) @@ -1592,16 +1592,16 @@ public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeRequest FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput(Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeRequest value) { - string var_sourceTableArn = (string)value.SourceTableArn; - string var_sourceTableName = (string)value.SourceTableName; - bool? var_useLatestRestorableTime = (bool?)value.UseLatestRestorableTime; - System.DateTime? var_restoreDateTime = (System.DateTime?)value.RestoreDateTime; - Amazon.DynamoDBv2.BillingMode var_billingModeOverride = (Amazon.DynamoDBv2.BillingMode)value.BillingModeOverride; - System.Collections.Generic.List var_globalSecondaryIndexOverride = (System.Collections.Generic.List)value.GlobalSecondaryIndexOverride; - System.Collections.Generic.List var_localSecondaryIndexOverride = (System.Collections.Generic.List)value.LocalSecondaryIndexOverride; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughputOverride; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecificationOverride; + string var_sourceTableArn = value.SourceTableArn; + string var_sourceTableName = value.SourceTableName; + bool? var_useLatestRestorableTime = value.UseLatestRestorableTime; + System.DateTime? var_restoreDateTime = value.RestoreDateTime; + Amazon.DynamoDBv2.BillingMode var_billingModeOverride = value.BillingModeOverride; + System.Collections.Generic.List var_globalSecondaryIndexOverride = value.GlobalSecondaryIndexOverride; + System.Collections.Generic.List var_localSecondaryIndexOverride = value.LocalSecondaryIndexOverride; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecificationOverride = value.SSESpecificationOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableToPointInTimeInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M14_SourceTableArn(var_sourceTableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_SourceTableName(var_sourceTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_TargetTableName(value.TargetTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M23_UseLatestRestorableTime(var_useLatestRestorableTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_RestoreDateTime(var_restoreDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M19_BillingModeOverride(var_billingModeOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M28_GlobalSecondaryIndexOverride(var_globalSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M27_LocalSecondaryIndexOverride(var_localSecondaryIndexOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M24_SSESpecificationOverride(var_sSESpecificationOverride)); } public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_RestoreTableToPointInTimeOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeOutput value) @@ -1611,7 +1611,7 @@ public static Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreTableToPointInTimeOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_RestoreTableToPointInTimeOutput(Amazon.DynamoDBv2.Model.RestoreTableToPointInTimeResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreTableToPointInTimeOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_RestoreTableToPointInTimeOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.ScanRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanInput value) @@ -1636,21 +1636,21 @@ public static Amazon.DynamoDBv2.Model.ScanRequest FromDafny_N3_com__N9_amazonaws public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput(Amazon.DynamoDBv2.Model.ScanRequest value) { - string var_indexName = (string)value.IndexName; - System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; - int? var_limit = (int?)value.Limit; - Amazon.DynamoDBv2.Select var_select = (Amazon.DynamoDBv2.Select)value.Select; - System.Collections.Generic.Dictionary var_scanFilter = (System.Collections.Generic.Dictionary)value.ScanFilter; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; - System.Collections.Generic.Dictionary var_exclusiveStartKey = (System.Collections.Generic.Dictionary)value.ExclusiveStartKey; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - int? var_totalSegments = (int?)value.TotalSegments; - int? var_segment = (int?)value.Segment; - string var_projectionExpression = (string)value.ProjectionExpression; - string var_filterExpression = (string)value.FilterExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - bool? var_consistentRead = (bool?)value.ConsistentRead; + string var_indexName = value.IndexName; + System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; + int? var_limit = value.Limit; + Amazon.DynamoDBv2.Select var_select = value.Select; + System.Collections.Generic.Dictionary var_scanFilter = value.ScanFilter; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; + System.Collections.Generic.Dictionary var_exclusiveStartKey = value.ExclusiveStartKey; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + int? var_totalSegments = value.TotalSegments; + int? var_segment = value.Segment; + string var_projectionExpression = value.ProjectionExpression; + string var_filterExpression = value.FilterExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + bool? var_consistentRead = value.ConsistentRead; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ScanInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M6_Select(var_select), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M10_ScanFilter(var_scanFilter), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M17_ExclusiveStartKey(var_exclusiveStartKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M13_TotalSegments(var_totalSegments), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M7_Segment(var_segment), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M16_FilterExpression(var_filterExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M14_ConsistentRead(var_consistentRead)); } public static Amazon.DynamoDBv2.Model.ScanResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanOutput value) @@ -1664,11 +1664,11 @@ public static Amazon.DynamoDBv2.Model.ScanResponse FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IScanOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput(Amazon.DynamoDBv2.Model.ScanResponse value) { - System.Collections.Generic.List> var_items = (System.Collections.Generic.List>)value.Items; - int? var_count = (int?)value.Count; - int? var_scannedCount = (int?)value.ScannedCount; - System.Collections.Generic.Dictionary var_lastEvaluatedKey = (System.Collections.Generic.Dictionary)value.LastEvaluatedKey; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; + System.Collections.Generic.List> var_items = value.Items; + int? var_count = value.Count; + int? var_scannedCount = value.ScannedCount; + System.Collections.Generic.Dictionary var_lastEvaluatedKey = value.LastEvaluatedKey; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ScanOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M5_Items(var_items), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M5_Count(var_count), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M12_ScannedCount(var_scannedCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M16_LastEvaluatedKey(var_lastEvaluatedKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_ScanOutput__M16_ConsumedCapacity(var_consumedCapacity)); } public static Amazon.DynamoDBv2.Model.TableAlreadyExistsException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAlreadyExistsException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableAlreadyExistsException value) @@ -1679,7 +1679,7 @@ public static Amazon.DynamoDBv2.Model.TableAlreadyExistsException FromDafny_N3_c } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableAlreadyExistsException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAlreadyExistsException(Amazon.DynamoDBv2.Model.TableAlreadyExistsException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableAlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAlreadyExistsException__M7_message(var_message) ); @@ -1692,7 +1692,7 @@ public static Amazon.DynamoDBv2.Model.TableInUseException FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableInUseException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TableInUseException(Amazon.DynamoDBv2.Model.TableInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableInUseException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TableInUseException__M7_message(var_message) ); @@ -1705,7 +1705,7 @@ public static Amazon.DynamoDBv2.Model.TableNotFoundException FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableNotFoundException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TableNotFoundException(Amazon.DynamoDBv2.Model.TableNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TableNotFoundException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TableNotFoundException__M7_message(var_message) ); @@ -1729,7 +1729,7 @@ public static Amazon.DynamoDBv2.Model.TransactGetItemsRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItemsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput(Amazon.DynamoDBv2.Model.TransactGetItemsRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactGetItemsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M13_TransactItems(value.TransactItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity)); } public static Amazon.DynamoDBv2.Model.TransactGetItemsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItemsOutput value) @@ -1740,8 +1740,8 @@ public static Amazon.DynamoDBv2.Model.TransactGetItemsResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItemsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput(Amazon.DynamoDBv2.Model.TransactGetItemsResponse value) { - System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; - System.Collections.Generic.List var_responses = (System.Collections.Generic.List)value.Responses; + System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.List var_responses = value.Responses; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactGetItemsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_TransactGetItemsOutput__M9_Responses(var_responses)); } public static Amazon.DynamoDBv2.Model.TransactionCanceledException FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionCanceledException(software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionCanceledException value) @@ -1754,8 +1754,8 @@ public static Amazon.DynamoDBv2.Model.TransactionCanceledException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionCanceledException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionCanceledException(Amazon.DynamoDBv2.Model.TransactionCanceledException value) { - string var_message = (string)value.Message; - System.Collections.Generic.List var_cancellationReasons = (System.Collections.Generic.List)value.CancellationReasons; + string var_message = value.Message; + System.Collections.Generic.List var_cancellationReasons = value.CancellationReasons; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionCanceledException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionCanceledException__M7_Message(var_message) , @@ -1770,7 +1770,7 @@ public static Amazon.DynamoDBv2.Model.TransactionConflictException FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionConflictException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionConflictException(Amazon.DynamoDBv2.Model.TransactionConflictException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionConflictException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_TransactionConflictException__M7_message(var_message) ); @@ -1783,7 +1783,7 @@ public static Amazon.DynamoDBv2.Model.TransactionInProgressException FromDafny_N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionInProgressException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_TransactionInProgressException(Amazon.DynamoDBv2.Model.TransactionInProgressException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Error_TransactionInProgressException( ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_TransactionInProgressException__M7_Message(var_message) ); @@ -1798,9 +1798,9 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItemsRequest FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItemsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput(Amazon.DynamoDBv2.Model.TransactWriteItemsRequest value) { - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; - string var_clientRequestToken = (string)value.ClientRequestToken; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; + string var_clientRequestToken = value.ClientRequestToken; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactWriteItemsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M13_TransactItems(value.TransactItems), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M18_ClientRequestToken(var_clientRequestToken)); } public static Amazon.DynamoDBv2.Model.TransactWriteItemsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItemsOutput value) @@ -1811,8 +1811,8 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItemsResponse FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItemsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput(Amazon.DynamoDBv2.Model.TransactWriteItemsResponse value) { - System.Collections.Generic.List var_consumedCapacity = (System.Collections.Generic.List)value.ConsumedCapacity; - System.Collections.Generic.Dictionary> var_itemCollectionMetrics = (System.Collections.Generic.Dictionary>)value.ItemCollectionMetrics; + System.Collections.Generic.List var_consumedCapacity = value.ConsumedCapacity; + System.Collections.Generic.Dictionary> var_itemCollectionMetrics = value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactWriteItemsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_TransactWriteItemsOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.UntagResourceRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUntagResourceInput value) @@ -1844,7 +1844,7 @@ public static Amazon.DynamoDBv2.Model.UpdateContinuousBackupsResponse FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContinuousBackupsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_UpdateContinuousBackupsOutput(Amazon.DynamoDBv2.Model.UpdateContinuousBackupsResponse value) { - Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = (Amazon.DynamoDBv2.Model.ContinuousBackupsDescription)value.ContinuousBackupsDescription; + Amazon.DynamoDBv2.Model.ContinuousBackupsDescription var_continuousBackupsDescription = value.ContinuousBackupsDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateContinuousBackupsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_UpdateContinuousBackupsOutput__M28_ContinuousBackupsDescription(var_continuousBackupsDescription)); } public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsInput value) @@ -1856,7 +1856,7 @@ public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsRequest FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput(Amazon.DynamoDBv2.Model.UpdateContributorInsightsRequest value) { - string var_indexName = (string)value.IndexName; + string var_indexName = value.IndexName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateContributorInsightsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M25_ContributorInsightsAction(value.ContributorInsightsAction)); } public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsOutput value) @@ -1868,9 +1868,9 @@ public static Amazon.DynamoDBv2.Model.UpdateContributorInsightsResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateContributorInsightsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput(Amazon.DynamoDBv2.Model.UpdateContributorInsightsResponse value) { - string var_tableName = (string)value.TableName; - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = (Amazon.DynamoDBv2.ContributorInsightsStatus)value.ContributorInsightsStatus; + string var_tableName = value.TableName; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = value.ContributorInsightsStatus; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateContributorInsightsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M25_ContributorInsightsStatus(var_contributorInsightsStatus)); } public static Amazon.DynamoDBv2.Model.UpdateGlobalTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableInput value) @@ -1891,7 +1891,7 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalTableResponse FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_UpdateGlobalTableOutput(Amazon.DynamoDBv2.Model.UpdateGlobalTableResponse value) { - Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = (Amazon.DynamoDBv2.Model.GlobalTableDescription)value.GlobalTableDescription; + Amazon.DynamoDBv2.Model.GlobalTableDescription var_globalTableDescription = value.GlobalTableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_UpdateGlobalTableOutput__M22_GlobalTableDescription(var_globalTableDescription)); } public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsInput value) @@ -1906,11 +1906,11 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsRequest FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput(Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsRequest value) { - Amazon.DynamoDBv2.BillingMode var_globalTableBillingMode = (Amazon.DynamoDBv2.BillingMode)value.GlobalTableBillingMode; - long? var_globalTableProvisionedWriteCapacityUnits = (long?)value.GlobalTableProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate; - System.Collections.Generic.List var_globalTableGlobalSecondaryIndexSettingsUpdate = (System.Collections.Generic.List)value.GlobalTableGlobalSecondaryIndexSettingsUpdate; - System.Collections.Generic.List var_replicaSettingsUpdate = (System.Collections.Generic.List)value.ReplicaSettingsUpdate; + Amazon.DynamoDBv2.BillingMode var_globalTableBillingMode = value.GlobalTableBillingMode; + long? var_globalTableProvisionedWriteCapacityUnits = value.GlobalTableProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate = value.GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate; + System.Collections.Generic.List var_globalTableGlobalSecondaryIndexSettingsUpdate = value.GlobalTableGlobalSecondaryIndexSettingsUpdate; + System.Collections.Generic.List var_replicaSettingsUpdate = value.ReplicaSettingsUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M15_GlobalTableName(value.GlobalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M22_GlobalTableBillingMode(var_globalTableBillingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M40_GlobalTableProvisionedWriteCapacityUnits(var_globalTableProvisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M60_GlobalTableProvisionedWriteCapacityAutoScalingSettingsUpdate(var_globalTableProvisionedWriteCapacityAutoScalingSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M45_GlobalTableGlobalSecondaryIndexSettingsUpdate(var_globalTableGlobalSecondaryIndexSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M21_ReplicaSettingsUpdate(var_replicaSettingsUpdate)); } public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsOutput value) @@ -1921,8 +1921,8 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsResponse FromDafn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalTableSettingsOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput(Amazon.DynamoDBv2.Model.UpdateGlobalTableSettingsResponse value) { - string var_globalTableName = (string)value.GlobalTableName; - System.Collections.Generic.List var_replicaSettings = (System.Collections.Generic.List)value.ReplicaSettings; + string var_globalTableName = value.GlobalTableName; + System.Collections.Generic.List var_replicaSettings = value.ReplicaSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalTableSettingsOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput__M15_GlobalTableName(var_globalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateGlobalTableSettingsOutput__M15_ReplicaSettings(var_replicaSettings)); } public static Amazon.DynamoDBv2.Model.UpdateItemRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemInput value) @@ -1944,17 +1944,17 @@ public static Amazon.DynamoDBv2.Model.UpdateItemRequest FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput(Amazon.DynamoDBv2.Model.UpdateItemRequest value) { - System.Collections.Generic.Dictionary var_attributeUpdates = (System.Collections.Generic.Dictionary)value.AttributeUpdates; - System.Collections.Generic.Dictionary var_expected = (System.Collections.Generic.Dictionary)value.Expected; - Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = (Amazon.DynamoDBv2.ConditionalOperator)value.ConditionalOperator; - Amazon.DynamoDBv2.ReturnValue var_returnValues = (Amazon.DynamoDBv2.ReturnValue)value.ReturnValues; - Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = (Amazon.DynamoDBv2.ReturnConsumedCapacity)value.ReturnConsumedCapacity; - Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = (Amazon.DynamoDBv2.ReturnItemCollectionMetrics)value.ReturnItemCollectionMetrics; - string var_updateExpression = (string)value.UpdateExpression; - string var_conditionExpression = (string)value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_attributeUpdates = value.AttributeUpdates; + System.Collections.Generic.Dictionary var_expected = value.Expected; + Amazon.DynamoDBv2.ConditionalOperator var_conditionalOperator = value.ConditionalOperator; + Amazon.DynamoDBv2.ReturnValue var_returnValues = value.ReturnValues; + Amazon.DynamoDBv2.ReturnConsumedCapacity var_returnConsumedCapacity = value.ReturnConsumedCapacity; + Amazon.DynamoDBv2.ReturnItemCollectionMetrics var_returnItemCollectionMetrics = value.ReturnItemCollectionMetrics; + string var_updateExpression = value.UpdateExpression; + string var_conditionExpression = value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M16_AttributeUpdates(var_attributeUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M8_Expected(var_expected), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M19_ConditionalOperator(var_conditionalOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M12_ReturnValues(var_returnValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M22_ReturnConsumedCapacity(var_returnConsumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M27_ReturnItemCollectionMetrics(var_returnItemCollectionMetrics), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M16_UpdateExpression(var_updateExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.UpdateItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemOutput value) @@ -1966,9 +1966,9 @@ public static Amazon.DynamoDBv2.Model.UpdateItemResponse FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateItemOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput(Amazon.DynamoDBv2.Model.UpdateItemResponse value) { - System.Collections.Generic.Dictionary var_attributes = (System.Collections.Generic.Dictionary)value.Attributes; - Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = (Amazon.DynamoDBv2.Model.ConsumedCapacity)value.ConsumedCapacity; - Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = (Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value.ItemCollectionMetrics; + System.Collections.Generic.Dictionary var_attributes = value.Attributes; + Amazon.DynamoDBv2.Model.ConsumedCapacity var_consumedCapacity = value.ConsumedCapacity; + Amazon.DynamoDBv2.Model.ItemCollectionMetrics var_itemCollectionMetrics = value.ItemCollectionMetrics; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateItemOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput__M10_Attributes(var_attributes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput__M16_ConsumedCapacity(var_consumedCapacity), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateItemOutput__M21_ItemCollectionMetrics(var_itemCollectionMetrics)); } public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationInput value) @@ -1980,7 +1980,7 @@ public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationRequest F public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput(Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationRequest value) { - Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration)value.UpdateKinesisStreamingConfiguration; + Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = value.UpdateKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_StreamArn(value.StreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M35_UpdateKinesisStreamingConfiguration(var_updateKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationOutput value) @@ -1993,10 +1993,10 @@ public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationResponse public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingDestinationOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput(Amazon.DynamoDBv2.Model.UpdateKinesisStreamingDestinationResponse value) { - string var_tableName = (string)value.TableName; - string var_streamArn = (string)value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; - Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = (Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration)value.UpdateKinesisStreamingConfiguration; + string var_tableName = value.TableName; + string var_streamArn = value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; + Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration var_updateKinesisStreamingConfiguration = value.UpdateKinesisStreamingConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingDestinationOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_UpdateKinesisStreamingDestinationOutput__M35_UpdateKinesisStreamingConfiguration(var_updateKinesisStreamingConfiguration)); } public static Amazon.DynamoDBv2.Model.UpdateTableRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableInput value) @@ -2016,16 +2016,16 @@ public static Amazon.DynamoDBv2.Model.UpdateTableRequest FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput(Amazon.DynamoDBv2.Model.UpdateTableRequest value) { - System.Collections.Generic.List var_attributeDefinitions = (System.Collections.Generic.List)value.AttributeDefinitions; - Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - System.Collections.Generic.List var_globalSecondaryIndexUpdates = (System.Collections.Generic.List)value.GlobalSecondaryIndexUpdates; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamSpecification; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecification; - System.Collections.Generic.List var_replicaUpdates = (System.Collections.Generic.List)value.ReplicaUpdates; - Amazon.DynamoDBv2.TableClass var_tableClass = (Amazon.DynamoDBv2.TableClass)value.TableClass; - bool? var_deletionProtectionEnabled = (bool?)value.DeletionProtectionEnabled; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + System.Collections.Generic.List var_attributeDefinitions = value.AttributeDefinitions; + Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + System.Collections.Generic.List var_globalSecondaryIndexUpdates = value.GlobalSecondaryIndexUpdates; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = value.StreamSpecification; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = value.SSESpecification; + System.Collections.Generic.List var_replicaUpdates = value.ReplicaUpdates; + Amazon.DynamoDBv2.TableClass var_tableClass = value.TableClass; + bool? var_deletionProtectionEnabled = value.DeletionProtectionEnabled; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M20_AttributeDefinitions(var_attributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M27_GlobalSecondaryIndexUpdates(var_globalSecondaryIndexUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M19_StreamSpecification(var_streamSpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M16_SSESpecification(var_sSESpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M14_ReplicaUpdates(var_replicaUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M10_TableClass(var_tableClass), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M25_DeletionProtectionEnabled(var_deletionProtectionEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.UpdateTableResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_UpdateTableOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableOutput value) @@ -2035,7 +2035,7 @@ public static Amazon.DynamoDBv2.Model.UpdateTableResponse FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_UpdateTableOutput(Amazon.DynamoDBv2.Model.UpdateTableResponse value) { - Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = (Amazon.DynamoDBv2.Model.TableDescription)value.TableDescription; + Amazon.DynamoDBv2.Model.TableDescription var_tableDescription = value.TableDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_UpdateTableOutput__M16_TableDescription(var_tableDescription)); } public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingInput value) @@ -2048,9 +2048,9 @@ public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingRequest FromD public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingInput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput(Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingRequest value) { - System.Collections.Generic.List var_globalSecondaryIndexUpdates = (System.Collections.Generic.List)value.GlobalSecondaryIndexUpdates; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedWriteCapacityAutoScalingUpdate; - System.Collections.Generic.List var_replicaUpdates = (System.Collections.Generic.List)value.ReplicaUpdates; + System.Collections.Generic.List var_globalSecondaryIndexUpdates = value.GlobalSecondaryIndexUpdates; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = value.ProvisionedWriteCapacityAutoScalingUpdate; + System.Collections.Generic.List var_replicaUpdates = value.ReplicaUpdates; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableReplicaAutoScalingInput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M27_GlobalSecondaryIndexUpdates(var_globalSecondaryIndexUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M41_ProvisionedWriteCapacityAutoScalingUpdate(var_provisionedWriteCapacityAutoScalingUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M14_ReplicaUpdates(var_replicaUpdates)); } public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateTableReplicaAutoScalingOutput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingOutput value) @@ -2060,7 +2060,7 @@ public static Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingResponse From public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTableReplicaAutoScalingOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateTableReplicaAutoScalingOutput(Amazon.DynamoDBv2.Model.UpdateTableReplicaAutoScalingResponse value) { - Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = (Amazon.DynamoDBv2.Model.TableAutoScalingDescription)value.TableAutoScalingDescription; + Amazon.DynamoDBv2.Model.TableAutoScalingDescription var_tableAutoScalingDescription = value.TableAutoScalingDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTableReplicaAutoScalingOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateTableReplicaAutoScalingOutput__M27_TableAutoScalingDescription(var_tableAutoScalingDescription)); } public static Amazon.DynamoDBv2.Model.UpdateTimeToLiveRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTimeToLiveInput value) @@ -2081,7 +2081,7 @@ public static Amazon.DynamoDBv2.Model.UpdateTimeToLiveResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateTimeToLiveOutput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateTimeToLiveOutput(Amazon.DynamoDBv2.Model.UpdateTimeToLiveResponse value) { - Amazon.DynamoDBv2.Model.TimeToLiveSpecification var_timeToLiveSpecification = (Amazon.DynamoDBv2.Model.TimeToLiveSpecification)value.TimeToLiveSpecification; + Amazon.DynamoDBv2.Model.TimeToLiveSpecification var_timeToLiveSpecification = value.TimeToLiveSpecification; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateTimeToLiveOutput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateTimeToLiveOutput__M23_TimeToLiveSpecification(var_timeToLiveSpecification)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(Dafny.ISequence value) @@ -2090,7 +2090,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeV } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_S(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(Dafny.ISequence value) { @@ -2098,7 +2098,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeV } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_N(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(Dafny.ISequence value) { @@ -2106,7 +2106,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_B(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(Dafny.ISequence> value) { @@ -2114,7 +2114,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_SS(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetAttributeValue((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetAttributeValue(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(Dafny.ISequence> value) { @@ -2122,7 +2122,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_NS(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(Dafny.ISequence> value) { @@ -2130,7 +2130,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M2_BS(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -2138,7 +2138,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_M(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(Dafny.ISequence value) { @@ -2146,7 +2146,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M1_L(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue(value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(bool value) { @@ -2154,7 +2154,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeVal } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_NULL(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_NullAttributeValue((bool)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_NullAttributeValue(value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(bool value) { @@ -2162,7 +2162,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeVal } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue__M4_BOOL(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BooleanAttributeValue((bool)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BooleanAttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BackupInUseException__M7_message(Wrappers_Compile._IOption> value) { @@ -2186,7 +2186,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BackupNotF } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M10_Statements(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest(value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_BatchExecuteStatementInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -2218,7 +2218,7 @@ public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amaz } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M12_RequestItems(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap(value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BatchGetItemInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -2258,7 +2258,7 @@ public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amaz } public static Dafny.IMap, Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M12_RequestItems(System.Collections.Generic.Dictionary> value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap((System.Collections.Generic.Dictionary>)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap(value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchWriteItemInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -2330,7 +2330,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBack } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBackupInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBackupInput__M10_BackupName(Dafny.ISequence value) { @@ -2338,7 +2338,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBack } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_CreateBackupInput__M10_BackupName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName(value); } public static Amazon.DynamoDBv2.Model.BackupDetails FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CreateBackupOutput__M13_BackupDetails(Wrappers_Compile._IOption value) { @@ -2354,7 +2354,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput__M16_ReplicationGroup(Dafny.ISequence value) { @@ -2362,7 +2362,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CreateGlobalTableInput__M16_ReplicationGroup(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_ReplicaList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_ReplicaList(value); } public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_CreateGlobalTableOutput__M22_GlobalTableDescription(Wrappers_Compile._IOption value) { @@ -2378,7 +2378,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M20_AttributeDefinitions(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_TableName(Dafny.ISequence value) { @@ -2386,7 +2386,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_KeySchema(Dafny.ISequence value) { @@ -2394,7 +2394,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_CreateTableInput__M21_LocalSecondaryIndexes(Wrappers_Compile._IOption> value) { @@ -2498,7 +2498,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteBack } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteBackupInput__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); } public static Amazon.DynamoDBv2.Model.BackupDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DeleteBackupOutput__M17_BackupDescription(Wrappers_Compile._IOption value) { @@ -2514,7 +2514,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItem } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -2522,7 +2522,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_DeleteItemInput__M8_Expected(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue>> value) { @@ -2626,7 +2626,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteReso } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DeleteResourcePolicyInput__M18_ExpectedRevisionId(Wrappers_Compile._IOption> value) { @@ -2650,7 +2650,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_DeleteTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DeleteTableOutput__M16_TableDescription(Wrappers_Compile._IOption value) { @@ -2666,7 +2666,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeBa } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeBackupInput__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); } public static Amazon.DynamoDBv2.Model.BackupDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeBackupOutput__M17_BackupDescription(Wrappers_Compile._IOption value) { @@ -2682,7 +2682,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_DescribeCo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_DescribeContinuousBackupsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.ContinuousBackupsDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_DescribeContinuousBackupsOutput__M28_ContinuousBackupsDescription(Wrappers_Compile._IOption value) { @@ -2698,7 +2698,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeCo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeContributorInsightsInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -2762,7 +2762,7 @@ public static Amazon.DynamoDBv2.Model.FailureException FromDafny_N3_com__N9_amaz } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeEndpointsResponse__M9_Endpoints(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeExportInput__M9_ExportArn(Dafny.ISequence value) { @@ -2770,7 +2770,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeEx } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeExportInput__M9_ExportArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ExportArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ExportArn(value); } public static Amazon.DynamoDBv2.Model.ExportDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeExportOutput__M17_ExportDescription(Wrappers_Compile._IOption value) { @@ -2786,7 +2786,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeGl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeGlobalTableInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_DescribeGlobalTableOutput__M22_GlobalTableDescription(Wrappers_Compile._IOption value) { @@ -2802,7 +2802,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeGl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DescribeGlobalTableSettingsInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_DescribeGlobalTableSettingsOutput__M15_GlobalTableName(Wrappers_Compile._IOption> value) { @@ -2826,7 +2826,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeIm } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeImportInput__M9_ImportArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ImportArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ImportArn(value); } public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeImportOutput__M22_ImportTableDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription value) { @@ -2834,7 +2834,7 @@ public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_DescribeImportOutput__M22_ImportTableDescription(Amazon.DynamoDBv2.Model.ImportTableDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription((Amazon.DynamoDBv2.Model.ImportTableDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DescribeKinesisStreamingDestinationInput__M9_TableName(Dafny.ISequence value) { @@ -2842,7 +2842,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DescribeKi } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S40_DescribeKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_DescribeKinesisStreamingDestinationOutput__M9_TableName(Wrappers_Compile._IOption> value) { @@ -2898,7 +2898,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DescribeTa } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_DescribeTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DescribeTableOutput__M5_Table(Wrappers_Compile._IOption value) { @@ -2914,7 +2914,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_DescribeTa } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S36_DescribeTableReplicaAutoScalingInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.TableAutoScalingDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_DescribeTableReplicaAutoScalingOutput__M27_TableAutoScalingDescription(Wrappers_Compile._IOption value) { @@ -2930,7 +2930,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_DescribeTi } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_DescribeTimeToLiveInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.TimeToLiveDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_DescribeTimeToLiveOutput__M21_TimeToLiveDescription(Wrappers_Compile._IOption value) { @@ -2946,7 +2946,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_StreamArn(Dafny.ISequence value) { @@ -2954,7 +2954,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M9_StreamArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(value); } public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S39_DisableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(Wrappers_Compile._IOption value) { @@ -3010,7 +3010,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_StreamArn(Dafny.ISequence value) { @@ -3018,7 +3018,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M9_StreamArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(value); } public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_EnableKinesisStreamingDestinationInput__M35_EnableKinesisStreamingConfiguration(Wrappers_Compile._IOption value) { @@ -3066,7 +3066,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteSta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M9_Statement(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ExecuteStatementInput__M10_Parameters(Wrappers_Compile._IOption> value) { @@ -3154,7 +3154,7 @@ public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amaz } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_TransactStatements(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ExecuteTransactionInput__M18_ClientRequestToken(Wrappers_Compile._IOption> value) { @@ -3210,7 +3210,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_TableArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M10_ExportTime(Wrappers_Compile._IOption> value) { @@ -3234,7 +3234,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M8_S3Bucket(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ExportTableToPointInTimeInput__M13_S3BucketOwner(Wrappers_Compile._IOption> value) { @@ -3306,7 +3306,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInp } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -3314,7 +3314,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_GetItemInput__M15_AttributesToGet(Wrappers_Compile._IOption>> value) { @@ -3378,7 +3378,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GetResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GetResourcePolicyInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_GetResourcePolicyOutput__M6_Policy(Wrappers_Compile._IOption> value) { @@ -3450,7 +3450,7 @@ public static Amazon.DynamoDBv2.Model.S3BucketSource FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IS3BucketSource ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M14_S3BucketSource(Amazon.DynamoDBv2.Model.S3BucketSource value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource((Amazon.DynamoDBv2.Model.S3BucketSource)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource(value); } public static Amazon.DynamoDBv2.InputFormat FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_InputFormat(software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormat value) { @@ -3458,7 +3458,7 @@ public static Amazon.DynamoDBv2.InputFormat FromDafny_N3_com__N9_amazonaws__N8_d } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormat ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M11_InputFormat(Amazon.DynamoDBv2.InputFormat value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_InputFormat((Amazon.DynamoDBv2.InputFormat)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_InputFormat(value); } public static Amazon.DynamoDBv2.Model.InputFormatOptions FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M18_InputFormatOptions(Wrappers_Compile._IOption value) { @@ -3482,7 +3482,7 @@ public static Amazon.DynamoDBv2.Model.TableCreationParameters FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableCreationParameters ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ImportTableInput__M23_TableCreationParameters(Amazon.DynamoDBv2.Model.TableCreationParameters value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters((Amazon.DynamoDBv2.Model.TableCreationParameters)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters(value); } public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportTableOutput__M22_ImportTableDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription value) { @@ -3490,7 +3490,7 @@ public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportTableOutput__M22_ImportTableDescription(Amazon.DynamoDBv2.Model.ImportTableDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription((Amazon.DynamoDBv2.Model.ImportTableDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_IndexNotFoundException__M7_message(Wrappers_Compile._IOption> value) { @@ -3810,7 +3810,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOf } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ListTagsOfResourceInput__M9_NextToken(Wrappers_Compile._IOption> value) { @@ -3866,7 +3866,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInp } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M4_Item(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -3874,7 +3874,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M4_Item(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_PutItemInput__M8_Expected(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue>> value) { @@ -3978,7 +3978,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M6_Policy(Dafny.ISequence value) { @@ -3986,7 +3986,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M6_Policy(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ResourcePolicy((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ResourcePolicy(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_PutResourcePolicyInput__M18_ExpectedRevisionId(Wrappers_Compile._IOption> value) { @@ -4018,7 +4018,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_QueryInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -4234,7 +4234,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M15_TargetTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M9_BackupArn(Dafny.ISequence value) { @@ -4242,7 +4242,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_RestoreTableFromBackupInput__M19_BillingModeOverride(Wrappers_Compile._IOption value) { @@ -4322,7 +4322,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M15_TargetTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static bool? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_RestoreTableToPointInTimeInput__M23_UseLatestRestorableTime(Wrappers_Compile._IOption value) { @@ -4402,7 +4402,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_ScanInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -4594,7 +4594,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourc } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourceInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourceInput__M4_Tags(Dafny.ISequence value) { @@ -4602,7 +4602,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TagResourceInput__M4_Tags(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M13_TransactItems(Dafny.ISequence value) { @@ -4610,7 +4610,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M13_TransactItems(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList(value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactGetItemsInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -4674,7 +4674,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_Transactio } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M13_TransactItems(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList(value); } public static Amazon.DynamoDBv2.ReturnConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TransactWriteItemsInput__M22_ReturnConsumedCapacity(Wrappers_Compile._IOption value) { @@ -4722,7 +4722,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResou } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput__M11_ResourceArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput__M7_TagKeys(Dafny.ISequence> value) { @@ -4730,7 +4730,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_UntagResourceInput__M7_TagKeys(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M9_TableName(Dafny.ISequence value) { @@ -4738,7 +4738,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateCont } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M32_PointInTimeRecoverySpecification(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPointInTimeRecoverySpecification value) { @@ -4746,7 +4746,7 @@ public static Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification FromDafny } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPointInTimeRecoverySpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_UpdateContinuousBackupsInput__M32_PointInTimeRecoverySpecification(Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification((Amazon.DynamoDBv2.Model.PointInTimeRecoverySpecification)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification(value); } public static Amazon.DynamoDBv2.Model.ContinuousBackupsDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_UpdateContinuousBackupsOutput__M28_ContinuousBackupsDescription(Wrappers_Compile._IOption value) { @@ -4762,7 +4762,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateCont } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -4778,7 +4778,7 @@ public static Amazon.DynamoDBv2.ContributorInsightsAction FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateContributorInsightsInput__M25_ContributorInsightsAction(Amazon.DynamoDBv2.ContributorInsightsAction value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ContributorInsightsAction((Amazon.DynamoDBv2.ContributorInsightsAction)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ContributorInsightsAction(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_UpdateContributorInsightsOutput__M9_TableName(Wrappers_Compile._IOption> value) { @@ -4810,7 +4810,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput__M14_ReplicaUpdates(Dafny.ISequence value) { @@ -4818,7 +4818,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateGlobalTableInput__M14_ReplicaUpdates(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList(value); } public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_UpdateGlobalTableOutput__M22_GlobalTableDescription(Wrappers_Compile._IOption value) { @@ -4834,7 +4834,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M15_GlobalTableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_UpdateGlobalTableSettingsInput__M22_GlobalTableBillingMode(Wrappers_Compile._IOption value) { @@ -4898,7 +4898,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItem } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -4906,7 +4906,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_UpdateItemInput__M16_AttributeUpdates(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate>> value) { @@ -5026,7 +5026,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_StreamArn(Dafny.ISequence value) { @@ -5034,7 +5034,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKine } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M9_StreamArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(value); } public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_UpdateKinesisStreamingDestinationInput__M35_UpdateKinesisStreamingConfiguration(Wrappers_Compile._IOption value) { @@ -5090,7 +5090,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateTableInput__M11_BillingMode(Wrappers_Compile._IOption value) { @@ -5186,7 +5186,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateTableReplicaAutoScalingInput__M41_ProvisionedWriteCapacityAutoScalingUpdate(Wrappers_Compile._IOption value) { @@ -5218,7 +5218,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTime } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.TimeToLiveSpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput__M23_TimeToLiveSpecification(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveSpecification value) { @@ -5226,7 +5226,7 @@ public static Amazon.DynamoDBv2.Model.TimeToLiveSpecification FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveSpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_UpdateTimeToLiveInput__M23_TimeToLiveSpecification(Amazon.DynamoDBv2.Model.TimeToLiveSpecification value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification((Amazon.DynamoDBv2.Model.TimeToLiveSpecification)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification(value); } public static Amazon.DynamoDBv2.Model.TimeToLiveSpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_UpdateTimeToLiveOutput__M23_TimeToLiveSpecification(Wrappers_Compile._IOption value) { @@ -5460,8 +5460,8 @@ public static Amazon.DynamoDBv2.Model.BackupDetails FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupDetails ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails(Amazon.DynamoDBv2.Model.BackupDetails value) { - long? var_backupSizeBytes = (long?)value.BackupSizeBytes; - System.DateTime? var_backupExpiryDateTime = (System.DateTime?)value.BackupExpiryDateTime; + long? var_backupSizeBytes = value.BackupSizeBytes; + System.DateTime? var_backupExpiryDateTime = value.BackupExpiryDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupDetails(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M9_BackupArn(value.BackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupName(value.BackupName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M15_BackupSizeBytes(var_backupSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M12_BackupStatus(value.BackupStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupType(value.BackupType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M22_BackupCreationDateTime(value.BackupCreationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M20_BackupExpiryDateTime(var_backupExpiryDateTime)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(Dafny.ISequence value) @@ -5491,11 +5491,11 @@ public static Amazon.DynamoDBv2.Model.GlobalTableDescription FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription(Amazon.DynamoDBv2.Model.GlobalTableDescription value) { - System.Collections.Generic.List var_replicationGroup = (System.Collections.Generic.List)value.ReplicationGroup; - string var_globalTableArn = (string)value.GlobalTableArn; - System.DateTime? var_creationDateTime = (System.DateTime?)value.CreationDateTime; - Amazon.DynamoDBv2.GlobalTableStatus var_globalTableStatus = (Amazon.DynamoDBv2.GlobalTableStatus)value.GlobalTableStatus; - string var_globalTableName = (string)value.GlobalTableName; + System.Collections.Generic.List var_replicationGroup = value.ReplicationGroup; + string var_globalTableArn = value.GlobalTableArn; + System.DateTime? var_creationDateTime = value.CreationDateTime; + Amazon.DynamoDBv2.GlobalTableStatus var_globalTableStatus = value.GlobalTableStatus; + string var_globalTableName = value.GlobalTableName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M16_ReplicationGroup(var_replicationGroup), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M14_GlobalTableArn(var_globalTableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M16_CreationDateTime(var_creationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M17_GlobalTableStatus(var_globalTableStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M15_GlobalTableName(var_globalTableName)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions(Dafny.ISequence value) @@ -5561,7 +5561,7 @@ public static Amazon.DynamoDBv2.Model.StreamSpecification FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IStreamSpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification(Amazon.DynamoDBv2.Model.StreamSpecification value) { - Amazon.DynamoDBv2.StreamViewType var_streamViewType = (Amazon.DynamoDBv2.StreamViewType)value.StreamViewType; + Amazon.DynamoDBv2.StreamViewType var_streamViewType = value.StreamViewType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.StreamSpecification(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M13_StreamEnabled(value.StreamEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M14_StreamViewType(var_streamViewType)); } public static Amazon.DynamoDBv2.Model.SSESpecification FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSESpecification value) @@ -5573,9 +5573,9 @@ public static Amazon.DynamoDBv2.Model.SSESpecification FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSESpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification(Amazon.DynamoDBv2.Model.SSESpecification value) { - bool? var_enabled = (bool?)value.Enabled; - Amazon.DynamoDBv2.SSEType var_sSEType = (Amazon.DynamoDBv2.SSEType)value.SSEType; - string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; + bool? var_enabled = value.Enabled; + Amazon.DynamoDBv2.SSEType var_sSEType = value.SSEType; + string var_kMSMasterKeyId = value.KMSMasterKeyId; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SSESpecification(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification__M7_Enabled(var_enabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification__M7_SSEType(var_sSEType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_SSESpecification__M14_KMSMasterKeyId(var_kMSMasterKeyId)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList(Dafny.ISequence value) @@ -5622,8 +5622,8 @@ public static Amazon.DynamoDBv2.Model.OnDemandThroughput FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IOnDemandThroughput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput(Amazon.DynamoDBv2.Model.OnDemandThroughput value) { - long? var_maxReadRequestUnits = (long?)value.MaxReadRequestUnits; - long? var_maxWriteRequestUnits = (long?)value.MaxWriteRequestUnits; + long? var_maxReadRequestUnits = value.MaxReadRequestUnits; + long? var_maxWriteRequestUnits = value.MaxWriteRequestUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughput(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput__M19_MaxReadRequestUnits(var_maxReadRequestUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput__M20_MaxWriteRequestUnits(var_maxWriteRequestUnits)); } public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableDescription value) @@ -5656,30 +5656,30 @@ public static Amazon.DynamoDBv2.Model.TableDescription FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription(Amazon.DynamoDBv2.Model.TableDescription value) { - System.Collections.Generic.List var_attributeDefinitions = (System.Collections.Generic.List)value.AttributeDefinitions; - string var_tableName = (string)value.TableName; - System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; - Amazon.DynamoDBv2.TableStatus var_tableStatus = (Amazon.DynamoDBv2.TableStatus)value.TableStatus; - System.DateTime? var_creationDateTime = (System.DateTime?)value.CreationDateTime; - Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription)value.ProvisionedThroughput; - long? var_tableSizeBytes = (long?)value.TableSizeBytes; - long? var_itemCount = (long?)value.ItemCount; - string var_tableArn = (string)value.TableArn; - string var_tableId = (string)value.TableId; - Amazon.DynamoDBv2.Model.BillingModeSummary var_billingModeSummary = (Amazon.DynamoDBv2.Model.BillingModeSummary)value.BillingModeSummary; - System.Collections.Generic.List var_localSecondaryIndexes = (System.Collections.Generic.List)value.LocalSecondaryIndexes; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamSpecification; - string var_latestStreamLabel = (string)value.LatestStreamLabel; - string var_latestStreamArn = (string)value.LatestStreamArn; - string var_globalTableVersion = (string)value.GlobalTableVersion; - System.Collections.Generic.List var_replicas = (System.Collections.Generic.List)value.Replicas; - Amazon.DynamoDBv2.Model.RestoreSummary var_restoreSummary = (Amazon.DynamoDBv2.Model.RestoreSummary)value.RestoreSummary; - Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = (Amazon.DynamoDBv2.Model.SSEDescription)value.SSEDescription; - Amazon.DynamoDBv2.Model.ArchivalSummary var_archivalSummary = (Amazon.DynamoDBv2.Model.ArchivalSummary)value.ArchivalSummary; - Amazon.DynamoDBv2.Model.TableClassSummary var_tableClassSummary = (Amazon.DynamoDBv2.Model.TableClassSummary)value.TableClassSummary; - bool? var_deletionProtectionEnabled = (bool?)value.DeletionProtectionEnabled; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + System.Collections.Generic.List var_attributeDefinitions = value.AttributeDefinitions; + string var_tableName = value.TableName; + System.Collections.Generic.List var_keySchema = value.KeySchema; + Amazon.DynamoDBv2.TableStatus var_tableStatus = value.TableStatus; + System.DateTime? var_creationDateTime = value.CreationDateTime; + Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = value.ProvisionedThroughput; + long? var_tableSizeBytes = value.TableSizeBytes; + long? var_itemCount = value.ItemCount; + string var_tableArn = value.TableArn; + string var_tableId = value.TableId; + Amazon.DynamoDBv2.Model.BillingModeSummary var_billingModeSummary = value.BillingModeSummary; + System.Collections.Generic.List var_localSecondaryIndexes = value.LocalSecondaryIndexes; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamSpecification = value.StreamSpecification; + string var_latestStreamLabel = value.LatestStreamLabel; + string var_latestStreamArn = value.LatestStreamArn; + string var_globalTableVersion = value.GlobalTableVersion; + System.Collections.Generic.List var_replicas = value.Replicas; + Amazon.DynamoDBv2.Model.RestoreSummary var_restoreSummary = value.RestoreSummary; + Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = value.SSEDescription; + Amazon.DynamoDBv2.Model.ArchivalSummary var_archivalSummary = value.ArchivalSummary; + Amazon.DynamoDBv2.Model.TableClassSummary var_tableClassSummary = value.TableClassSummary; + bool? var_deletionProtectionEnabled = value.DeletionProtectionEnabled; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M20_AttributeDefinitions(var_attributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M11_TableStatus(var_tableStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M16_CreationDateTime(var_creationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M14_TableSizeBytes(var_tableSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M18_BillingModeSummary(var_billingModeSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M19_StreamSpecification(var_streamSpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M17_LatestStreamLabel(var_latestStreamLabel), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M15_LatestStreamArn(var_latestStreamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M18_GlobalTableVersion(var_globalTableVersion), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M8_Replicas(var_replicas), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M14_RestoreSummary(var_restoreSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M14_SSEDescription(var_sSEDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M15_ArchivalSummary(var_archivalSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M17_TableClassSummary(var_tableClassSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M25_DeletionProtectionEnabled(var_deletionProtectionEnabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_TableDescription__M18_OnDemandThroughput(var_onDemandThroughput)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(Dafny.ISequence value) @@ -5699,9 +5699,9 @@ public static Amazon.DynamoDBv2.Model.BackupDescription FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription(Amazon.DynamoDBv2.Model.BackupDescription value) { - Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = (Amazon.DynamoDBv2.Model.BackupDetails)value.BackupDetails; - Amazon.DynamoDBv2.Model.SourceTableDetails var_sourceTableDetails = (Amazon.DynamoDBv2.Model.SourceTableDetails)value.SourceTableDetails; - Amazon.DynamoDBv2.Model.SourceTableFeatureDetails var_sourceTableFeatureDetails = (Amazon.DynamoDBv2.Model.SourceTableFeatureDetails)value.SourceTableFeatureDetails; + Amazon.DynamoDBv2.Model.BackupDetails var_backupDetails = value.BackupDetails; + Amazon.DynamoDBv2.Model.SourceTableDetails var_sourceTableDetails = value.SourceTableDetails; + Amazon.DynamoDBv2.Model.SourceTableFeatureDetails var_sourceTableFeatureDetails = value.SourceTableFeatureDetails; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription__M13_BackupDetails(var_backupDetails), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription__M18_SourceTableDetails(var_sourceTableDetails), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_BackupDescription__M25_SourceTableFeatureDetails(var_sourceTableFeatureDetails)); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) @@ -5807,13 +5807,13 @@ public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IConsumedCapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity(Amazon.DynamoDBv2.Model.ConsumedCapacity value) { - string var_tableName = (string)value.TableName; - double? var_capacityUnits = (double?)value.CapacityUnits; - double? var_readCapacityUnits = (double?)value.ReadCapacityUnits; - double? var_writeCapacityUnits = (double?)value.WriteCapacityUnits; - Amazon.DynamoDBv2.Model.Capacity var_table = (Amazon.DynamoDBv2.Model.Capacity)value.Table; - System.Collections.Generic.Dictionary var_localSecondaryIndexes = (System.Collections.Generic.Dictionary)value.LocalSecondaryIndexes; - System.Collections.Generic.Dictionary var_globalSecondaryIndexes = (System.Collections.Generic.Dictionary)value.GlobalSecondaryIndexes; + string var_tableName = value.TableName; + double? var_capacityUnits = value.CapacityUnits; + double? var_readCapacityUnits = value.ReadCapacityUnits; + double? var_writeCapacityUnits = value.WriteCapacityUnits; + Amazon.DynamoDBv2.Model.Capacity var_table = value.Table; + System.Collections.Generic.Dictionary var_localSecondaryIndexes = value.LocalSecondaryIndexes; + System.Collections.Generic.Dictionary var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ConsumedCapacity(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M13_CapacityUnits(var_capacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M17_ReadCapacityUnits(var_readCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M18_WriteCapacityUnits(var_writeCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M5_Table(var_table), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes)); } public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics value) @@ -5824,8 +5824,8 @@ public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics(Amazon.DynamoDBv2.Model.ItemCollectionMetrics value) { - System.Collections.Generic.Dictionary var_itemCollectionKey = (System.Collections.Generic.Dictionary)value.ItemCollectionKey; - System.Collections.Generic.List var_sizeEstimateRangeGB = (System.Collections.Generic.List)value.SizeEstimateRangeGB; + System.Collections.Generic.Dictionary var_itemCollectionKey = value.ItemCollectionKey; + System.Collections.Generic.List var_sizeEstimateRangeGB = value.SizeEstimateRangeGB; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ItemCollectionMetrics(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics__M17_ItemCollectionKey(var_itemCollectionKey), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics__M19_SizeEstimateRangeGB(var_sizeEstimateRangeGB)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ResourceArnString(Dafny.ISequence value) @@ -5852,7 +5852,7 @@ public static Amazon.DynamoDBv2.Model.ContinuousBackupsDescription FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContinuousBackupsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription(Amazon.DynamoDBv2.Model.ContinuousBackupsDescription value) { - Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription var_pointInTimeRecoveryDescription = (Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription)value.PointInTimeRecoveryDescription; + Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription var_pointInTimeRecoveryDescription = value.PointInTimeRecoveryDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ContinuousBackupsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M23_ContinuousBackupsStatus(value.ContinuousBackupsStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M30_PointInTimeRecoveryDescription(var_pointInTimeRecoveryDescription)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(Dafny.ISequence value) @@ -5909,8 +5909,8 @@ public static Amazon.DynamoDBv2.Model.FailureException FromDafny_N3_com__N9_amaz public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IFailureException ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException(Amazon.DynamoDBv2.Model.FailureException value) { - string var_exceptionName = (string)value.ExceptionName; - string var_exceptionDescription = (string)value.ExceptionDescription; + string var_exceptionName = value.ExceptionName; + string var_exceptionDescription = value.ExceptionDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.FailureException(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException__M13_ExceptionName(var_exceptionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException__M20_ExceptionDescription(var_exceptionDescription)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints(Dafny.ISequence value) @@ -5956,27 +5956,27 @@ public static Amazon.DynamoDBv2.Model.ExportDescription FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription(Amazon.DynamoDBv2.Model.ExportDescription value) { - string var_exportArn = (string)value.ExportArn; - Amazon.DynamoDBv2.ExportStatus var_exportStatus = (Amazon.DynamoDBv2.ExportStatus)value.ExportStatus; - System.DateTime? var_startTime = (System.DateTime?)value.StartTime; - System.DateTime? var_endTime = (System.DateTime?)value.EndTime; - string var_exportManifest = (string)value.ExportManifest; - string var_tableArn = (string)value.TableArn; - string var_tableId = (string)value.TableId; - System.DateTime? var_exportTime = (System.DateTime?)value.ExportTime; - string var_clientToken = (string)value.ClientToken; - string var_s3Bucket = (string)value.S3Bucket; - string var_s3BucketOwner = (string)value.S3BucketOwner; - string var_s3Prefix = (string)value.S3Prefix; - Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = (Amazon.DynamoDBv2.S3SseAlgorithm)value.S3SseAlgorithm; - string var_s3SseKmsKeyId = (string)value.S3SseKmsKeyId; - string var_failureCode = (string)value.FailureCode; - string var_failureMessage = (string)value.FailureMessage; - Amazon.DynamoDBv2.ExportFormat var_exportFormat = (Amazon.DynamoDBv2.ExportFormat)value.ExportFormat; - long? var_billedSizeBytes = (long?)value.BilledSizeBytes; - long? var_itemCount = (long?)value.ItemCount; - Amazon.DynamoDBv2.ExportType var_exportType = (Amazon.DynamoDBv2.ExportType)value.ExportType; - Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = (Amazon.DynamoDBv2.Model.IncrementalExportSpecification)value.IncrementalExportSpecification; + string var_exportArn = value.ExportArn; + Amazon.DynamoDBv2.ExportStatus var_exportStatus = value.ExportStatus; + System.DateTime? var_startTime = value.StartTime; + System.DateTime? var_endTime = value.EndTime; + string var_exportManifest = value.ExportManifest; + string var_tableArn = value.TableArn; + string var_tableId = value.TableId; + System.DateTime? var_exportTime = value.ExportTime; + string var_clientToken = value.ClientToken; + string var_s3Bucket = value.S3Bucket; + string var_s3BucketOwner = value.S3BucketOwner; + string var_s3Prefix = value.S3Prefix; + Amazon.DynamoDBv2.S3SseAlgorithm var_s3SseAlgorithm = value.S3SseAlgorithm; + string var_s3SseKmsKeyId = value.S3SseKmsKeyId; + string var_failureCode = value.FailureCode; + string var_failureMessage = value.FailureMessage; + Amazon.DynamoDBv2.ExportFormat var_exportFormat = value.ExportFormat; + long? var_billedSizeBytes = value.BilledSizeBytes; + long? var_itemCount = value.ItemCount; + Amazon.DynamoDBv2.ExportType var_exportType = value.ExportType; + Amazon.DynamoDBv2.Model.IncrementalExportSpecification var_incrementalExportSpecification = value.IncrementalExportSpecification; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_ExportArn(var_exportArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M12_ExportStatus(var_exportStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_StartTime(var_startTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M7_EndTime(var_endTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M14_ExportManifest(var_exportManifest), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M10_ExportTime(var_exportTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M8_S3Bucket(var_s3Bucket), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M13_S3BucketOwner(var_s3BucketOwner), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M8_S3Prefix(var_s3Prefix), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M14_S3SseAlgorithm(var_s3SseAlgorithm), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M13_S3SseKmsKeyId(var_s3SseKmsKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M11_FailureCode(var_failureCode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M14_FailureMessage(var_failureMessage), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M12_ExportFormat(var_exportFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M15_BilledSizeBytes(var_billedSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M10_ExportType(var_exportType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M30_IncrementalExportSpecification(var_incrementalExportSpecification)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ReplicaSettingsDescriptionList(Dafny.ISequence value) @@ -6020,25 +6020,25 @@ public static Amazon.DynamoDBv2.Model.ImportTableDescription FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportTableDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription(Amazon.DynamoDBv2.Model.ImportTableDescription value) { - string var_importArn = (string)value.ImportArn; - Amazon.DynamoDBv2.ImportStatus var_importStatus = (Amazon.DynamoDBv2.ImportStatus)value.ImportStatus; - string var_tableArn = (string)value.TableArn; - string var_tableId = (string)value.TableId; - string var_clientToken = (string)value.ClientToken; - Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = (Amazon.DynamoDBv2.Model.S3BucketSource)value.S3BucketSource; - long? var_errorCount = (long?)value.ErrorCount; - string var_cloudWatchLogGroupArn = (string)value.CloudWatchLogGroupArn; - Amazon.DynamoDBv2.InputFormat var_inputFormat = (Amazon.DynamoDBv2.InputFormat)value.InputFormat; - Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = (Amazon.DynamoDBv2.Model.InputFormatOptions)value.InputFormatOptions; - Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = (Amazon.DynamoDBv2.InputCompressionType)value.InputCompressionType; - Amazon.DynamoDBv2.Model.TableCreationParameters var_tableCreationParameters = (Amazon.DynamoDBv2.Model.TableCreationParameters)value.TableCreationParameters; - System.DateTime? var_startTime = (System.DateTime?)value.StartTime; - System.DateTime? var_endTime = (System.DateTime?)value.EndTime; - long? var_processedSizeBytes = (long?)value.ProcessedSizeBytes; - long? var_processedItemCount = (long?)value.ProcessedItemCount; - long? var_importedItemCount = (long?)value.ImportedItemCount; - string var_failureCode = (string)value.FailureCode; - string var_failureMessage = (string)value.FailureMessage; + string var_importArn = value.ImportArn; + Amazon.DynamoDBv2.ImportStatus var_importStatus = value.ImportStatus; + string var_tableArn = value.TableArn; + string var_tableId = value.TableId; + string var_clientToken = value.ClientToken; + Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = value.S3BucketSource; + long? var_errorCount = value.ErrorCount; + string var_cloudWatchLogGroupArn = value.CloudWatchLogGroupArn; + Amazon.DynamoDBv2.InputFormat var_inputFormat = value.InputFormat; + Amazon.DynamoDBv2.Model.InputFormatOptions var_inputFormatOptions = value.InputFormatOptions; + Amazon.DynamoDBv2.InputCompressionType var_inputCompressionType = value.InputCompressionType; + Amazon.DynamoDBv2.Model.TableCreationParameters var_tableCreationParameters = value.TableCreationParameters; + System.DateTime? var_startTime = value.StartTime; + System.DateTime? var_endTime = value.EndTime; + long? var_processedSizeBytes = value.ProcessedSizeBytes; + long? var_processedItemCount = value.ProcessedItemCount; + long? var_importedItemCount = value.ImportedItemCount; + string var_failureCode = value.FailureCode; + string var_failureMessage = value.FailureMessage; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportTableDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M9_ImportArn(var_importArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M12_ImportStatus(var_importStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M11_ClientToken(var_clientToken), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M14_S3BucketSource(var_s3BucketSource), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M10_ErrorCount(var_errorCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M21_CloudWatchLogGroupArn(var_cloudWatchLogGroupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M11_InputFormat(var_inputFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M18_InputFormatOptions(var_inputFormatOptions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M20_InputCompressionType(var_inputCompressionType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M23_TableCreationParameters(var_tableCreationParameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M9_StartTime(var_startTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M7_EndTime(var_endTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M18_ProcessedSizeBytes(var_processedSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M18_ProcessedItemCount(var_processedItemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M17_ImportedItemCount(var_importedItemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M11_FailureCode(var_failureCode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M14_FailureMessage(var_failureMessage)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_KinesisDataStreamDestinations(Dafny.ISequence value) @@ -6066,9 +6066,9 @@ public static Amazon.DynamoDBv2.Model.TableAutoScalingDescription FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription(Amazon.DynamoDBv2.Model.TableAutoScalingDescription value) { - string var_tableName = (string)value.TableName; - Amazon.DynamoDBv2.TableStatus var_tableStatus = (Amazon.DynamoDBv2.TableStatus)value.TableStatus; - System.Collections.Generic.List var_replicas = (System.Collections.Generic.List)value.Replicas; + string var_tableName = value.TableName; + Amazon.DynamoDBv2.TableStatus var_tableStatus = value.TableStatus; + System.Collections.Generic.List var_replicas = value.Replicas; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableAutoScalingDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M11_TableStatus(var_tableStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M8_Replicas(var_replicas)); } public static Amazon.DynamoDBv2.Model.TimeToLiveDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveDescription value) @@ -6079,8 +6079,8 @@ public static Amazon.DynamoDBv2.Model.TimeToLiveDescription FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITimeToLiveDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription(Amazon.DynamoDBv2.Model.TimeToLiveDescription value) { - Amazon.DynamoDBv2.TimeToLiveStatus var_timeToLiveStatus = (Amazon.DynamoDBv2.TimeToLiveStatus)value.TimeToLiveStatus; - string var_attributeName = (string)value.AttributeName; + Amazon.DynamoDBv2.TimeToLiveStatus var_timeToLiveStatus = value.TimeToLiveStatus; + string var_attributeName = value.AttributeName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TimeToLiveDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription__M16_TimeToLiveStatus(var_timeToLiveStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TimeToLiveDescription__M13_AttributeName(var_attributeName)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_StreamArn(Dafny.ISequence value) @@ -6098,7 +6098,7 @@ public static Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEnableKinesisStreamingConfiguration ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_EnableKinesisStreamingConfiguration(Amazon.DynamoDBv2.Model.EnableKinesisStreamingConfiguration value) { - Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = (Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision)value.ApproximateCreationDateTimePrecision; + Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = value.ApproximateCreationDateTimePrecision; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.EnableKinesisStreamingConfiguration(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_EnableKinesisStreamingConfiguration__M36_ApproximateCreationDateTimePrecision(var_approximateCreationDateTimePrecision)); } public static Amazon.DynamoDBv2.DestinationStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_DestinationStatus(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDestinationStatus value) @@ -6290,9 +6290,9 @@ public static Amazon.DynamoDBv2.Model.IncrementalExportSpecification FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IIncrementalExportSpecification ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification(Amazon.DynamoDBv2.Model.IncrementalExportSpecification value) { - System.DateTime? var_exportFromTime = (System.DateTime?)value.ExportFromTime; - System.DateTime? var_exportToTime = (System.DateTime?)value.ExportToTime; - Amazon.DynamoDBv2.ExportViewType var_exportViewType = (Amazon.DynamoDBv2.ExportViewType)value.ExportViewType; + System.DateTime? var_exportFromTime = value.ExportFromTime; + System.DateTime? var_exportToTime = value.ExportToTime; + Amazon.DynamoDBv2.ExportViewType var_exportViewType = value.ExportViewType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.IncrementalExportSpecification(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M14_ExportFromTime(var_exportFromTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M12_ExportToTime(var_exportToTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M14_ExportViewType(var_exportViewType)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_AttributeNameList(Dafny.ISequence> value) @@ -6320,8 +6320,8 @@ public static Amazon.DynamoDBv2.Model.S3BucketSource FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IS3BucketSource ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource(Amazon.DynamoDBv2.Model.S3BucketSource value) { - string var_s3BucketOwner = (string)value.S3BucketOwner; - string var_s3KeyPrefix = (string)value.S3KeyPrefix; + string var_s3BucketOwner = value.S3BucketOwner; + string var_s3KeyPrefix = value.S3KeyPrefix; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.S3BucketSource(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M13_S3BucketOwner(var_s3BucketOwner), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M8_S3Bucket(value.S3Bucket), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M11_S3KeyPrefix(var_s3KeyPrefix)); } public static Amazon.DynamoDBv2.InputFormat FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_InputFormat(software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormat value) @@ -6345,7 +6345,7 @@ public static Amazon.DynamoDBv2.Model.InputFormatOptions FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputFormatOptions ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_InputFormatOptions(Amazon.DynamoDBv2.Model.InputFormatOptions value) { - Amazon.DynamoDBv2.Model.CsvOptions var_csv = (Amazon.DynamoDBv2.Model.CsvOptions)value.Csv; + Amazon.DynamoDBv2.Model.CsvOptions var_csv = value.Csv; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.InputFormatOptions(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_InputFormatOptions__M3_Csv(var_csv)); } public static Amazon.DynamoDBv2.InputCompressionType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_InputCompressionType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IInputCompressionType value) @@ -6376,11 +6376,11 @@ public static Amazon.DynamoDBv2.Model.TableCreationParameters FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableCreationParameters ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters(Amazon.DynamoDBv2.Model.TableCreationParameters value) { - Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; - Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = (Amazon.DynamoDBv2.Model.SSESpecification)value.SSESpecification; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.SSESpecification var_sSESpecification = value.SSESpecification; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableCreationParameters(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M20_AttributeDefinitions(value.AttributeDefinitions), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M18_OnDemandThroughput(var_onDemandThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M16_SSESpecification(var_sSESpecification), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_String(Dafny.ISequence value) @@ -6730,11 +6730,11 @@ public static Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate(Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate value) { - long? var_minimumUnits = (long?)value.MinimumUnits; - long? var_maximumUnits = (long?)value.MaximumUnits; - bool? var_autoScalingDisabled = (bool?)value.AutoScalingDisabled; - string var_autoScalingRoleArn = (string)value.AutoScalingRoleArn; - Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate var_scalingPolicyUpdate = (Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate)value.ScalingPolicyUpdate; + long? var_minimumUnits = value.MinimumUnits; + long? var_maximumUnits = value.MaximumUnits; + bool? var_autoScalingDisabled = value.AutoScalingDisabled; + string var_autoScalingRoleArn = value.AutoScalingRoleArn; + Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate var_scalingPolicyUpdate = value.ScalingPolicyUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M12_MinimumUnits(var_minimumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M12_MaximumUnits(var_maximumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M19_AutoScalingDisabled(var_autoScalingDisabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M18_AutoScalingRoleArn(var_autoScalingRoleArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M19_ScalingPolicyUpdate(var_scalingPolicyUpdate)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_GlobalTableGlobalSecondaryIndexSettingsUpdateList(Dafny.ISequence value) @@ -6778,7 +6778,7 @@ public static Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration FromDa public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateKinesisStreamingConfiguration ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateKinesisStreamingConfiguration(Amazon.DynamoDBv2.Model.UpdateKinesisStreamingConfiguration value) { - Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = (Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision)value.ApproximateCreationDateTimePrecision; + Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = value.ApproximateCreationDateTimePrecision; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateKinesisStreamingConfiguration(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateKinesisStreamingConfiguration__M36_ApproximateCreationDateTimePrecision(var_approximateCreationDateTimePrecision)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_GlobalSecondaryIndexUpdateList(Dafny.ISequence value) @@ -6830,7 +6830,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetA } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_StringSetAttributeValue__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_StringAttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue__M6_member(Dafny.ISequence value) { @@ -6838,7 +6838,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetA } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NumberSetAttributeValue__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_NumberAttributeValue(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue__M6_member(Dafny.ISequence value) { @@ -6846,7 +6846,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N8_dynamodb } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_BinarySetAttributeValue__M6_member(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_BinaryAttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M3_key(Dafny.ISequence value) { @@ -6854,7 +6854,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttribu } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -6862,7 +6862,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_MapAttributeValue__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -6870,7 +6870,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ListAttributeValue__M6_member(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static Amazon.DynamoDBv2.Model.BatchStatementRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementRequest value) { @@ -6878,7 +6878,7 @@ public static Amazon.DynamoDBv2.Model.BatchStatementRequest FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_PartiQLBatchRequest__M6_member(Amazon.DynamoDBv2.Model.BatchStatementRequest value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest((Amazon.DynamoDBv2.Model.BatchStatementRequest)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest(value); } public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_PartiQLBatchResponse__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse value) { @@ -6886,7 +6886,7 @@ public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_PartiQLBatchResponse__M6_member(Amazon.DynamoDBv2.Model.BatchStatementResponse value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse((Amazon.DynamoDBv2.Model.BatchStatementResponse)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse(value); } public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ConsumedCapacityMultiple__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IConsumedCapacity value) { @@ -6894,7 +6894,7 @@ public static Amazon.DynamoDBv2.Model.ConsumedCapacity FromDafny_N3_com__N9_amaz } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IConsumedCapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ConsumedCapacityMultiple__M6_member(Amazon.DynamoDBv2.Model.ConsumedCapacity value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity((Amazon.DynamoDBv2.Model.ConsumedCapacity)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M3_key(Dafny.ISequence value) { @@ -6902,7 +6902,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes value) { @@ -6910,7 +6910,7 @@ public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BatchGetRequestMap__M5_value(Amazon.DynamoDBv2.Model.KeysAndAttributes value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes((Amazon.DynamoDBv2.Model.KeysAndAttributes)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M3_key(Dafny.ISequence value) { @@ -6918,7 +6918,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.List> FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M5_value(Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> value) { @@ -6926,7 +6926,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchGetResponseMap__M5_value(System.Collections.Generic.List> value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList((System.Collections.Generic.List>)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M3_key(Dafny.ISequence value) { @@ -6934,7 +6934,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWrite } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M5_value(Dafny.ISequence value) { @@ -6942,7 +6942,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_BatchWriteItemRequestMap__M5_value(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M3_key(Dafny.ISequence value) { @@ -6950,7 +6950,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M5_value(Dafny.ISequence value) { @@ -6958,7 +6958,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsPerTable__M5_value(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M3_key(Dafny.ISequence value) { @@ -6966,7 +6966,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeM } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -6974,7 +6974,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M9_BackupArn(Dafny.ISequence value) { @@ -6982,7 +6982,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDeta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M9_BackupArn(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_BackupArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupName(Dafny.ISequence value) { @@ -6990,7 +6990,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDeta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupName(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M15_BackupSizeBytes(Wrappers_Compile._IOption value) { @@ -7006,7 +7006,7 @@ public static Amazon.DynamoDBv2.BackupStatus FromDafny_N3_com__N9_amazonaws__N8_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupStatus ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M12_BackupStatus(Amazon.DynamoDBv2.BackupStatus value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_BackupStatus((Amazon.DynamoDBv2.BackupStatus)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_BackupStatus(value); } public static Amazon.DynamoDBv2.BackupType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupType value) { @@ -7014,7 +7014,7 @@ public static Amazon.DynamoDBv2.BackupType FromDafny_N3_com__N9_amazonaws__N8_dy } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupType ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M10_BackupType(Amazon.DynamoDBv2.BackupType value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupType((Amazon.DynamoDBv2.BackupType)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_BackupType(value); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M22_BackupCreationDateTime(Dafny.ISequence value) { @@ -7022,7 +7022,7 @@ public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_B } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M22_BackupCreationDateTime(System.DateTime value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime((System.DateTime)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BackupCreationDateTime(value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupDetails__M20_BackupExpiryDateTime(Wrappers_Compile._IOption> value) { @@ -7038,7 +7038,7 @@ public static Amazon.DynamoDBv2.Model.Replica FromDafny_N3_com__N9_amazonaws__N8 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplica ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_ReplicaList__M6_member(Amazon.DynamoDBv2.Model.Replica value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica((Amazon.DynamoDBv2.Model.Replica)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalTableDescription__M16_ReplicationGroup(Wrappers_Compile._IOption> value) { @@ -7086,7 +7086,7 @@ public static Amazon.DynamoDBv2.Model.AttributeDefinition FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeDefinition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions__M6_member(Amazon.DynamoDBv2.Model.AttributeDefinition value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition((Amazon.DynamoDBv2.Model.AttributeDefinition)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition(value); } public static Amazon.DynamoDBv2.Model.KeySchemaElement FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeySchemaElement value) { @@ -7094,7 +7094,7 @@ public static Amazon.DynamoDBv2.Model.KeySchemaElement FromDafny_N3_com__N9_amaz } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeySchemaElement ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema__M6_member(Amazon.DynamoDBv2.Model.KeySchemaElement value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement((Amazon.DynamoDBv2.Model.KeySchemaElement)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement(value); } public static Amazon.DynamoDBv2.Model.LocalSecondaryIndex FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndex value) { @@ -7102,7 +7102,7 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndex FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexList__M6_member(Amazon.DynamoDBv2.Model.LocalSecondaryIndex value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex((Amazon.DynamoDBv2.Model.LocalSecondaryIndex)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex(value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndex FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndex value) { @@ -7110,7 +7110,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndex FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndex value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex((Amazon.DynamoDBv2.Model.GlobalSecondaryIndex)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex(value); } public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M17_ReadCapacityUnits(long value) { @@ -7118,7 +7118,7 @@ public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedT } public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M17_ReadCapacityUnits(long value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject((long)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject(value); } public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M18_WriteCapacityUnits(long value) { @@ -7126,7 +7126,7 @@ public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedT } public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput__M18_WriteCapacityUnits(long value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject((long)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_PositiveLongObject(value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M13_StreamEnabled(bool value) { @@ -7134,7 +7134,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecif } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M13_StreamEnabled(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_StreamEnabled((bool)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_StreamEnabled(value); } public static Amazon.DynamoDBv2.StreamViewType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_StreamSpecification__M14_StreamViewType(Wrappers_Compile._IOption value) { @@ -7174,7 +7174,7 @@ public static Amazon.DynamoDBv2.Model.Tag FromDafny_N3_com__N9_amazonaws__N8_dyn } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITag ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TagList__M6_member(Amazon.DynamoDBv2.Model.Tag value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag((Amazon.DynamoDBv2.Model.Tag)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_OnDemandThroughput__M19_MaxReadRequestUnits(Wrappers_Compile._IOption value) { @@ -7414,7 +7414,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M3_key } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -7422,7 +7422,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M3_key(Dafny.ISequence value) { @@ -7430,7 +7430,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAt } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue value) { @@ -7438,7 +7438,7 @@ public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_ExpectedAttributeMap__M5_value(Amazon.DynamoDBv2.Model.ExpectedAttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue((Amazon.DynamoDBv2.Model.ExpectedAttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M3_key(Dafny.ISequence value) { @@ -7446,7 +7446,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_Expression } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ExpressionAttributeNameVariable((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ExpressionAttributeNameVariable(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M5_value(Dafny.ISequence value) { @@ -7454,7 +7454,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_Expression } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ExpressionAttributeNameMap__M5_value(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M3_key(Dafny.ISequence value) { @@ -7462,7 +7462,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_Expression } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ExpressionAttributeValueVariable((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ExpressionAttributeValueVariable(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -7470,7 +7470,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ExpressionAttributeValueMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ConsumedCapacity__M9_TableName(Wrappers_Compile._IOption> value) { @@ -7550,7 +7550,7 @@ public static Amazon.DynamoDBv2.ContinuousBackupsStatus FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContinuousBackupsStatus ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M23_ContinuousBackupsStatus(Amazon.DynamoDBv2.ContinuousBackupsStatus value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContinuousBackupsStatus((Amazon.DynamoDBv2.ContinuousBackupsStatus)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContinuousBackupsStatus(value); } public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContinuousBackupsDescription__M30_PointInTimeRecoveryDescription(Wrappers_Compile._IOption value) { @@ -7566,7 +7566,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_Contributo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ContributorInsightsRuleList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContributorInsightsRule((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContributorInsightsRule(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_FailureException__M13_ExceptionName(Wrappers_Compile._IOption> value) { @@ -7590,7 +7590,7 @@ public static Amazon.DynamoDBv2.Model.Endpoint FromDafny_N3_com__N9_amazonaws__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IEndpoint ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Endpoints__M6_member(Amazon.DynamoDBv2.Model.Endpoint value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint((Amazon.DynamoDBv2.Model.Endpoint)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ExportDescription__M9_ExportArn(Wrappers_Compile._IOption> value) { @@ -7766,7 +7766,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsDescription FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_ReplicaSettingsDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaSettingsDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription((Amazon.DynamoDBv2.Model.ReplicaSettingsDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ImportTableDescription__M9_ImportArn(Wrappers_Compile._IOption> value) { @@ -7926,7 +7926,7 @@ public static Amazon.DynamoDBv2.Model.KinesisDataStreamDestination FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKinesisDataStreamDestination ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_KinesisDataStreamDestinations__M6_member(Amazon.DynamoDBv2.Model.KinesisDataStreamDestination value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination((Amazon.DynamoDBv2.Model.KinesisDataStreamDestination)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_TableAutoScalingDescription__M9_TableName(Wrappers_Compile._IOption> value) { @@ -7982,7 +7982,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_PreparedStatementParameters__M6_member(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList__M6_member(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -7990,7 +7990,7 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_ItemList__M6_member(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_AttributeMap(value); } public static Amazon.DynamoDBv2.Model.ParameterizedStatement FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IParameterizedStatement value) { @@ -7998,7 +7998,7 @@ public static Amazon.DynamoDBv2.Model.ParameterizedStatement FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IParameterizedStatement ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ParameterizedStatements__M6_member(Amazon.DynamoDBv2.Model.ParameterizedStatement value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement((Amazon.DynamoDBv2.Model.ParameterizedStatement)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement(value); } public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ItemResponseList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse value) { @@ -8006,7 +8006,7 @@ public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaw } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_ItemResponseList__M6_member(Amazon.DynamoDBv2.Model.ItemResponse value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse((Amazon.DynamoDBv2.Model.ItemResponse)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse(value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_IncrementalExportSpecification__M14_ExportFromTime(Wrappers_Compile._IOption> value) { @@ -8038,7 +8038,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_AttributeN } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_AttributeNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M13_S3BucketOwner(Wrappers_Compile._IOption> value) { @@ -8054,7 +8054,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M8_S3Bucket(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_S3Bucket(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_S3BucketSource__M11_S3KeyPrefix(Wrappers_Compile._IOption> value) { @@ -8078,7 +8078,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreat } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M20_AttributeDefinitions(Dafny.ISequence value) { @@ -8086,7 +8086,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M20_AttributeDefinitions(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeDefinitions(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_KeySchema(Dafny.ISequence value) { @@ -8094,7 +8094,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); } public static Amazon.DynamoDBv2.BillingMode FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TableCreationParameters__M11_BillingMode(Wrappers_Compile._IOption value) { @@ -8142,7 +8142,7 @@ public static Amazon.DynamoDBv2.Model.BackupSummary FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_BackupSummaries__M6_member(Amazon.DynamoDBv2.Model.BackupSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary((Amazon.DynamoDBv2.Model.BackupSummary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary(value); } public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContributorInsightsSummaries__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary value) { @@ -8150,7 +8150,7 @@ public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ContributorInsightsSummaries__M6_member(Amazon.DynamoDBv2.Model.ContributorInsightsSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary((Amazon.DynamoDBv2.Model.ContributorInsightsSummary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary(value); } public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportSummaries__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary value) { @@ -8158,7 +8158,7 @@ public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ExportSummaries__M6_member(Amazon.DynamoDBv2.Model.ExportSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary((Amazon.DynamoDBv2.Model.ExportSummary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary(value); } public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_GlobalTableList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable value) { @@ -8166,7 +8166,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_GlobalTableList__M6_member(Amazon.DynamoDBv2.Model.GlobalTable value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable((Amazon.DynamoDBv2.Model.GlobalTable)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable(value); } public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportSummaryList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary value) { @@ -8174,7 +8174,7 @@ public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ImportSummaryList__M6_member(Amazon.DynamoDBv2.Model.ImportSummary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary((Amazon.DynamoDBv2.Model.ImportSummary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_TableNameList__M6_member(Dafny.ISequence value) { @@ -8182,7 +8182,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_TableNameL } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_TableNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M3_key(Dafny.ISequence value) { @@ -8190,7 +8190,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInp } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -8198,7 +8198,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M3_key(Dafny.ISequence value) { @@ -8206,7 +8206,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditi } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition value) { @@ -8214,7 +8214,7 @@ public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_KeyConditions__M5_value(Amazon.DynamoDBv2.Model.Condition value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition((Amazon.DynamoDBv2.Model.Condition)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M3_key(Dafny.ISequence value) { @@ -8222,7 +8222,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterCond } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition value) { @@ -8230,7 +8230,7 @@ public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_FilterConditionMap__M5_value(Amazon.DynamoDBv2.Model.Condition value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition((Amazon.DynamoDBv2.Model.Condition)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(value); } public static Amazon.DynamoDBv2.Model.TransactGetItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItem value) { @@ -8238,7 +8238,7 @@ public static Amazon.DynamoDBv2.Model.TransactGetItem FromDafny_N3_com__N9_amazo } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItem ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_TransactGetItemList__M6_member(Amazon.DynamoDBv2.Model.TransactGetItem value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem((Amazon.DynamoDBv2.Model.TransactGetItem)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem(value); } public static Amazon.DynamoDBv2.Model.CancellationReason FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CancellationReasonList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICancellationReason value) { @@ -8246,7 +8246,7 @@ public static Amazon.DynamoDBv2.Model.CancellationReason FromDafny_N3_com__N9_am } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICancellationReason ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_CancellationReasonList__M6_member(Amazon.DynamoDBv2.Model.CancellationReason value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason((Amazon.DynamoDBv2.Model.CancellationReason)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason(value); } public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem value) { @@ -8254,7 +8254,7 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TransactWriteItemList__M6_member(Amazon.DynamoDBv2.Model.TransactWriteItem value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem((Amazon.DynamoDBv2.Model.TransactWriteItem)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList__M6_member(Dafny.ISequence value) { @@ -8262,7 +8262,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_TagKeyList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString(value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification__M26_PointInTimeRecoveryEnabled(bool value) { @@ -8270,7 +8270,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeR } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_PointInTimeRecoverySpecification__M26_PointInTimeRecoveryEnabled(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BooleanObject((bool)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BooleanObject(value); } public static Amazon.DynamoDBv2.Model.ReplicaUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaUpdate value) { @@ -8278,7 +8278,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaUpdate FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_ReplicaUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate((Amazon.DynamoDBv2.Model.ReplicaUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_AutoScalingSettingsUpdate__M12_MinimumUnits(Wrappers_Compile._IOption value) { @@ -8326,7 +8326,7 @@ public static Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpd } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_GlobalTableGlobalSecondaryIndexSettingsUpdateList__M6_member(Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate((Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate(value); } public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ReplicaSettingsUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate value) { @@ -8334,7 +8334,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_ReplicaSettingsUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate((Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M3_key(Dafny.ISequence value) { @@ -8342,7 +8342,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeU } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate value) { @@ -8350,7 +8350,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_AttributeUpdates__M5_value(Amazon.DynamoDBv2.Model.AttributeValueUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate((Amazon.DynamoDBv2.Model.AttributeValueUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate(value); } public static Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_UpdateKinesisStreamingConfiguration__M36_ApproximateCreationDateTimePrecision(Wrappers_Compile._IOption value) { @@ -8366,7 +8366,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate FromDafny_N3_co } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_GlobalSecondaryIndexUpdateList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate(value); } public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicationGroupUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate value) { @@ -8374,7 +8374,7 @@ public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicationGroupUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicationGroupUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate((Amazon.DynamoDBv2.Model.ReplicationGroupUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate(value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_GlobalSecondaryIndexAutoScalingUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate value) { @@ -8382,7 +8382,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate From } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_GlobalSecondaryIndexAutoScalingUpdateList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate(value); } public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ReplicaAutoScalingUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate value) { @@ -8390,7 +8390,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_ReplicaAutoScalingUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate((Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate(value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M7_Enabled(bool value) { @@ -8398,7 +8398,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSp } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M7_Enabled(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TimeToLiveEnabled((bool)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TimeToLiveEnabled(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M13_AttributeName(Dafny.ISequence value) { @@ -8406,7 +8406,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLive } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveSpecification__M13_AttributeName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveAttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_TimeToLiveAttributeName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(Dafny.ISequence value) { @@ -8426,9 +8426,9 @@ public static Amazon.DynamoDBv2.Model.BatchStatementRequest FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest(Amazon.DynamoDBv2.Model.BatchStatementRequest value) { - System.Collections.Generic.List var_parameters = (System.Collections.Generic.List)value.Parameters; - bool? var_consistentRead = (bool?)value.ConsistentRead; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.List var_parameters = value.Parameters; + bool? var_consistentRead = value.ConsistentRead; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementRequest(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M9_Statement(value.Statement), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M10_Parameters(var_parameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse value) @@ -8440,9 +8440,9 @@ public static Amazon.DynamoDBv2.Model.BatchStatementResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse(Amazon.DynamoDBv2.Model.BatchStatementResponse value) { - Amazon.DynamoDBv2.Model.BatchStatementError var_error = (Amazon.DynamoDBv2.Model.BatchStatementError)value.Error; - string var_tableName = (string)value.TableName; - System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; + Amazon.DynamoDBv2.Model.BatchStatementError var_error = value.Error; + string var_tableName = value.TableName; + System.Collections.Generic.Dictionary var_item = value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementResponse(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse__M5_Error(var_error), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchStatementResponse__M4_Item(var_item)); } public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes value) @@ -8456,10 +8456,10 @@ public static Amazon.DynamoDBv2.Model.KeysAndAttributes FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeysAndAttributes ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes(Amazon.DynamoDBv2.Model.KeysAndAttributes value) { - System.Collections.Generic.List var_attributesToGet = (System.Collections.Generic.List)value.AttributesToGet; - bool? var_consistentRead = (bool?)value.ConsistentRead; - string var_projectionExpression = (string)value.ProjectionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + System.Collections.Generic.List var_attributesToGet = value.AttributesToGet; + bool? var_consistentRead = value.ConsistentRead; + string var_projectionExpression = value.ProjectionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.KeysAndAttributes(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M4_Keys(value.Keys), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M15_AttributesToGet(var_attributesToGet), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M14_ConsistentRead(var_consistentRead), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M24_ExpressionAttributeNames(var_expressionAttributeNames)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests(Dafny.ISequence value) @@ -8533,7 +8533,7 @@ public static Amazon.DynamoDBv2.Model.Replica FromDafny_N3_com__N9_amazonaws__N8 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplica ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica(Amazon.DynamoDBv2.Model.Replica value) { - string var_regionName = (string)value.RegionName; + string var_regionName = value.RegionName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Replica(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica__M10_RegionName(var_regionName)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicaDescriptionList(Dafny.ISequence value) @@ -8613,8 +8613,8 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndex FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex(Amazon.DynamoDBv2.Model.GlobalSecondaryIndex value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndex(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M10_Projection(value.Projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M18_OnDemandThroughput(var_onDemandThroughput)); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_StreamEnabled(bool value) @@ -8721,11 +8721,11 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughputDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription(Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription value) { - System.DateTime? var_lastIncreaseDateTime = (System.DateTime?)value.LastIncreaseDateTime; - System.DateTime? var_lastDecreaseDateTime = (System.DateTime?)value.LastDecreaseDateTime; - long? var_numberOfDecreasesToday = (long?)value.NumberOfDecreasesToday; - long? var_readCapacityUnits = (long?)value.ReadCapacityUnits; - long? var_writeCapacityUnits = (long?)value.WriteCapacityUnits; + System.DateTime? var_lastIncreaseDateTime = value.LastIncreaseDateTime; + System.DateTime? var_lastDecreaseDateTime = value.LastDecreaseDateTime; + long? var_numberOfDecreasesToday = value.NumberOfDecreasesToday; + long? var_readCapacityUnits = value.ReadCapacityUnits; + long? var_writeCapacityUnits = value.WriteCapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughputDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M20_LastIncreaseDateTime(var_lastIncreaseDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M20_LastDecreaseDateTime(var_lastDecreaseDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M22_NumberOfDecreasesToday(var_numberOfDecreasesToday), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M17_ReadCapacityUnits(var_readCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M18_WriteCapacityUnits(var_writeCapacityUnits)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TableId(Dafny.ISequence value) @@ -8744,8 +8744,8 @@ public static Amazon.DynamoDBv2.Model.BillingModeSummary FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBillingModeSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BillingModeSummary(Amazon.DynamoDBv2.Model.BillingModeSummary value) { - Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; - System.DateTime? var_lastUpdateToPayPerRequestDateTime = (System.DateTime?)value.LastUpdateToPayPerRequestDateTime; + Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; + System.DateTime? var_lastUpdateToPayPerRequestDateTime = value.LastUpdateToPayPerRequestDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BillingModeSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BillingModeSummary__M11_BillingMode(var_billingMode), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_BillingModeSummary__M33_LastUpdateToPayPerRequestDateTime(var_lastUpdateToPayPerRequestDateTime)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_LocalSecondaryIndexDescriptionList(Dafny.ISequence value) @@ -8774,8 +8774,8 @@ public static Amazon.DynamoDBv2.Model.RestoreSummary FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IRestoreSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary(Amazon.DynamoDBv2.Model.RestoreSummary value) { - string var_sourceBackupArn = (string)value.SourceBackupArn; - string var_sourceTableArn = (string)value.SourceTableArn; + string var_sourceBackupArn = value.SourceBackupArn; + string var_sourceTableArn = value.SourceTableArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.RestoreSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_SourceBackupArn(var_sourceBackupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M14_SourceTableArn(var_sourceTableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_RestoreDateTime(value.RestoreDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M17_RestoreInProgress(value.RestoreInProgress)); } public static Amazon.DynamoDBv2.Model.SSEDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSEDescription value) @@ -8788,10 +8788,10 @@ public static Amazon.DynamoDBv2.Model.SSEDescription FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISSEDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription(Amazon.DynamoDBv2.Model.SSEDescription value) { - Amazon.DynamoDBv2.SSEStatus var_status = (Amazon.DynamoDBv2.SSEStatus)value.Status; - Amazon.DynamoDBv2.SSEType var_sSEType = (Amazon.DynamoDBv2.SSEType)value.SSEType; - string var_kMSMasterKeyArn = (string)value.KMSMasterKeyArn; - System.DateTime? var_inaccessibleEncryptionDateTime = (System.DateTime?)value.InaccessibleEncryptionDateTime; + Amazon.DynamoDBv2.SSEStatus var_status = value.Status; + Amazon.DynamoDBv2.SSEType var_sSEType = value.SSEType; + string var_kMSMasterKeyArn = value.KMSMasterKeyArn; + System.DateTime? var_inaccessibleEncryptionDateTime = value.InaccessibleEncryptionDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SSEDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M6_Status(var_status), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M7_SSEType(var_sSEType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M15_KMSMasterKeyArn(var_kMSMasterKeyArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M30_InaccessibleEncryptionDateTime(var_inaccessibleEncryptionDateTime)); } public static Amazon.DynamoDBv2.Model.ArchivalSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IArchivalSummary value) @@ -8803,9 +8803,9 @@ public static Amazon.DynamoDBv2.Model.ArchivalSummary FromDafny_N3_com__N9_amazo public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IArchivalSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary(Amazon.DynamoDBv2.Model.ArchivalSummary value) { - System.DateTime? var_archivalDateTime = (System.DateTime?)value.ArchivalDateTime; - string var_archivalReason = (string)value.ArchivalReason; - string var_archivalBackupArn = (string)value.ArchivalBackupArn; + System.DateTime? var_archivalDateTime = value.ArchivalDateTime; + string var_archivalReason = value.ArchivalReason; + string var_archivalBackupArn = value.ArchivalBackupArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ArchivalSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary__M16_ArchivalDateTime(var_archivalDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary__M14_ArchivalReason(var_archivalReason), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_ArchivalSummary__M17_ArchivalBackupArn(var_archivalBackupArn)); } public static Amazon.DynamoDBv2.Model.TableClassSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableClassSummary value) @@ -8816,8 +8816,8 @@ public static Amazon.DynamoDBv2.Model.TableClassSummary FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITableClassSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary(Amazon.DynamoDBv2.Model.TableClassSummary value) { - Amazon.DynamoDBv2.TableClass var_tableClass = (Amazon.DynamoDBv2.TableClass)value.TableClass; - System.DateTime? var_lastUpdateDateTime = (System.DateTime?)value.LastUpdateDateTime; + Amazon.DynamoDBv2.TableClass var_tableClass = value.TableClass; + System.DateTime? var_lastUpdateDateTime = value.LastUpdateDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TableClassSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary__M10_TableClass(var_tableClass), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TableClassSummary__M18_LastUpdateDateTime(var_lastUpdateDateTime)); } public static Amazon.DynamoDBv2.Model.SourceTableDetails FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableDetails value) @@ -8836,11 +8836,11 @@ public static Amazon.DynamoDBv2.Model.SourceTableDetails FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableDetails ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails(Amazon.DynamoDBv2.Model.SourceTableDetails value) { - string var_tableArn = (string)value.TableArn; - long? var_tableSizeBytes = (long?)value.TableSizeBytes; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; - long? var_itemCount = (long?)value.ItemCount; - Amazon.DynamoDBv2.BillingMode var_billingMode = (Amazon.DynamoDBv2.BillingMode)value.BillingMode; + string var_tableArn = value.TableArn; + long? var_tableSizeBytes = value.TableSizeBytes; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; + long? var_itemCount = value.ItemCount; + Amazon.DynamoDBv2.BillingMode var_billingMode = value.BillingMode; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SourceTableDetails(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M7_TableId(value.TableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M14_TableSizeBytes(var_tableSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_TableCreationDateTime(value.TableCreationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_ProvisionedThroughput(value.ProvisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M18_OnDemandThroughput(var_onDemandThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M11_BillingMode(var_billingMode)); } public static Amazon.DynamoDBv2.Model.SourceTableFeatureDetails FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails(software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableFeatureDetails value) @@ -8854,11 +8854,11 @@ public static Amazon.DynamoDBv2.Model.SourceTableFeatureDetails FromDafny_N3_com public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ISourceTableFeatureDetails ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails(Amazon.DynamoDBv2.Model.SourceTableFeatureDetails value) { - System.Collections.Generic.List var_localSecondaryIndexes = (System.Collections.Generic.List)value.LocalSecondaryIndexes; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.Model.StreamSpecification var_streamDescription = (Amazon.DynamoDBv2.Model.StreamSpecification)value.StreamDescription; - Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = (Amazon.DynamoDBv2.Model.TimeToLiveDescription)value.TimeToLiveDescription; - Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = (Amazon.DynamoDBv2.Model.SSEDescription)value.SSEDescription; + System.Collections.Generic.List var_localSecondaryIndexes = value.LocalSecondaryIndexes; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.Model.StreamSpecification var_streamDescription = value.StreamDescription; + Amazon.DynamoDBv2.Model.TimeToLiveDescription var_timeToLiveDescription = value.TimeToLiveDescription; + Amazon.DynamoDBv2.Model.SSEDescription var_sSEDescription = value.SSEDescription; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.SourceTableFeatureDetails(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M21_LocalSecondaryIndexes(var_localSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M17_StreamDescription(var_streamDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M21_TimeToLiveDescription(var_timeToLiveDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S25_SourceTableFeatureDetails__M14_SSEDescription(var_sSEDescription)); } public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue value) @@ -8871,10 +8871,10 @@ public static Amazon.DynamoDBv2.Model.ExpectedAttributeValue FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExpectedAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue(Amazon.DynamoDBv2.Model.ExpectedAttributeValue value) { - Amazon.DynamoDBv2.Model.AttributeValue var_value = (Amazon.DynamoDBv2.Model.AttributeValue)value.Value; - bool? var_exists = (bool?)value.Exists; - Amazon.DynamoDBv2.ComparisonOperator var_comparisonOperator = (Amazon.DynamoDBv2.ComparisonOperator)value.ComparisonOperator; - System.Collections.Generic.List var_attributeValueList = (System.Collections.Generic.List)value.AttributeValueList; + Amazon.DynamoDBv2.Model.AttributeValue var_value = value.Value; + bool? var_exists = value.Exists; + Amazon.DynamoDBv2.ComparisonOperator var_comparisonOperator = value.ComparisonOperator; + System.Collections.Generic.List var_attributeValueList = value.AttributeValueList; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExpectedAttributeValue(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M5_Value(var_value), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M6_Exists(var_exists), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M18_ComparisonOperator(var_comparisonOperator), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ExpectedAttributeValue__M18_AttributeValueList(var_attributeValueList)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ExpressionAttributeNameVariable(Dafny.ISequence value) @@ -8910,9 +8910,9 @@ public static Amazon.DynamoDBv2.Model.Capacity FromDafny_N3_com__N9_amazonaws__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity(Amazon.DynamoDBv2.Model.Capacity value) { - double? var_readCapacityUnits = (double?)value.ReadCapacityUnits; - double? var_writeCapacityUnits = (double?)value.WriteCapacityUnits; - double? var_capacityUnits = (double?)value.CapacityUnits; + double? var_readCapacityUnits = value.ReadCapacityUnits; + double? var_writeCapacityUnits = value.WriteCapacityUnits; + double? var_capacityUnits = value.CapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Capacity(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity__M17_ReadCapacityUnits(var_readCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity__M18_WriteCapacityUnits(var_writeCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity__M13_CapacityUnits(var_capacityUnits)); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity> value) @@ -8964,9 +8964,9 @@ public static Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPointInTimeRecoveryDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription(Amazon.DynamoDBv2.Model.PointInTimeRecoveryDescription value) { - Amazon.DynamoDBv2.PointInTimeRecoveryStatus var_pointInTimeRecoveryStatus = (Amazon.DynamoDBv2.PointInTimeRecoveryStatus)value.PointInTimeRecoveryStatus; - System.DateTime? var_earliestRestorableDateTime = (System.DateTime?)value.EarliestRestorableDateTime; - System.DateTime? var_latestRestorableDateTime = (System.DateTime?)value.LatestRestorableDateTime; + Amazon.DynamoDBv2.PointInTimeRecoveryStatus var_pointInTimeRecoveryStatus = value.PointInTimeRecoveryStatus; + System.DateTime? var_earliestRestorableDateTime = value.EarliestRestorableDateTime; + System.DateTime? var_latestRestorableDateTime = value.LatestRestorableDateTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.PointInTimeRecoveryDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M25_PointInTimeRecoveryStatus(var_pointInTimeRecoveryStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M26_EarliestRestorableDateTime(var_earliestRestorableDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M24_LatestRestorableDateTime(var_latestRestorableDateTime)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_ContributorInsightsRule(Dafny.ISequence value) @@ -9097,14 +9097,14 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsDescription FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription(Amazon.DynamoDBv2.Model.ReplicaSettingsDescription value) { - Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = (Amazon.DynamoDBv2.ReplicaStatus)value.ReplicaStatus; - Amazon.DynamoDBv2.Model.BillingModeSummary var_replicaBillingModeSummary = (Amazon.DynamoDBv2.Model.BillingModeSummary)value.ReplicaBillingModeSummary; - long? var_replicaProvisionedReadCapacityUnits = (long?)value.ReplicaProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedReadCapacityAutoScalingSettings; - long? var_replicaProvisionedWriteCapacityUnits = (long?)value.ReplicaProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedWriteCapacityAutoScalingSettings; - System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettings = (System.Collections.Generic.List)value.ReplicaGlobalSecondaryIndexSettings; - Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = (Amazon.DynamoDBv2.Model.TableClassSummary)value.ReplicaTableClassSummary; + Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = value.ReplicaStatus; + Amazon.DynamoDBv2.Model.BillingModeSummary var_replicaBillingModeSummary = value.ReplicaBillingModeSummary; + long? var_replicaProvisionedReadCapacityUnits = value.ReplicaProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = value.ReplicaProvisionedReadCapacityAutoScalingSettings; + long? var_replicaProvisionedWriteCapacityUnits = value.ReplicaProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = value.ReplicaProvisionedWriteCapacityAutoScalingSettings; + System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettings = value.ReplicaGlobalSecondaryIndexSettings; + Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = value.ReplicaTableClassSummary; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaSettingsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M13_ReplicaStatus(var_replicaStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M25_ReplicaBillingModeSummary(var_replicaBillingModeSummary), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M35_ReplicaProvisionedReadCapacityUnits(var_replicaProvisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M49_ReplicaProvisionedReadCapacityAutoScalingSettings(var_replicaProvisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M36_ReplicaProvisionedWriteCapacityUnits(var_replicaProvisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M50_ReplicaProvisionedWriteCapacityAutoScalingSettings(var_replicaProvisionedWriteCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M35_ReplicaGlobalSecondaryIndexSettings(var_replicaGlobalSecondaryIndexSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M24_ReplicaTableClassSummary(var_replicaTableClassSummary)); } public static Amazon.DynamoDBv2.ImportStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ImportStatus(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportStatus value) @@ -9191,10 +9191,10 @@ public static Amazon.DynamoDBv2.Model.KinesisDataStreamDestination FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKinesisDataStreamDestination ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination(Amazon.DynamoDBv2.Model.KinesisDataStreamDestination value) { - string var_streamArn = (string)value.StreamArn; - Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = (Amazon.DynamoDBv2.DestinationStatus)value.DestinationStatus; - string var_destinationStatusDescription = (string)value.DestinationStatusDescription; - Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = (Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision)value.ApproximateCreationDateTimePrecision; + string var_streamArn = value.StreamArn; + Amazon.DynamoDBv2.DestinationStatus var_destinationStatus = value.DestinationStatus; + string var_destinationStatusDescription = value.DestinationStatusDescription; + Amazon.DynamoDBv2.ApproximateCreationDateTimePrecision var_approximateCreationDateTimePrecision = value.ApproximateCreationDateTimePrecision; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.KinesisDataStreamDestination(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M9_StreamArn(var_streamArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M17_DestinationStatus(var_destinationStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M28_DestinationStatusDescription(var_destinationStatusDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_KinesisDataStreamDestination__M36_ApproximateCreationDateTimePrecision(var_approximateCreationDateTimePrecision)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_ReplicaAutoScalingDescriptionList(Dafny.ISequence value) @@ -9250,8 +9250,8 @@ public static Amazon.DynamoDBv2.Model.ParameterizedStatement FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IParameterizedStatement ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement(Amazon.DynamoDBv2.Model.ParameterizedStatement value) { - System.Collections.Generic.List var_parameters = (System.Collections.Generic.List)value.Parameters; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.List var_parameters = value.Parameters; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ParameterizedStatement(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M9_Statement(value.Statement), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M10_Parameters(var_parameters), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse value) @@ -9261,7 +9261,7 @@ public static Amazon.DynamoDBv2.Model.ItemResponse FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemResponse ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse(Amazon.DynamoDBv2.Model.ItemResponse value) { - System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; + System.Collections.Generic.Dictionary var_item = value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ItemResponse(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_ItemResponse__M4_Item(var_item)); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ExportFromTime(Dafny.ISequence value) @@ -9308,8 +9308,8 @@ public static Amazon.DynamoDBv2.Model.CsvOptions FromDafny_N3_com__N9_amazonaws_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICsvOptions ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_CsvOptions(Amazon.DynamoDBv2.Model.CsvOptions value) { - string var_delimiter = (string)value.Delimiter; - System.Collections.Generic.List var_headerList = (System.Collections.Generic.List)value.HeaderList; + string var_delimiter = value.Delimiter; + System.Collections.Generic.List var_headerList = value.HeaderList; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CsvOptions(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_CsvOptions__M9_Delimiter(var_delimiter), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_CsvOptions__M10_HeaderList(var_headerList)); } public static Amazon.DynamoDBv2.Model.BackupSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupSummary value) @@ -9328,16 +9328,16 @@ public static Amazon.DynamoDBv2.Model.BackupSummary FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBackupSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary(Amazon.DynamoDBv2.Model.BackupSummary value) { - string var_tableName = (string)value.TableName; - string var_tableId = (string)value.TableId; - string var_tableArn = (string)value.TableArn; - string var_backupArn = (string)value.BackupArn; - string var_backupName = (string)value.BackupName; - System.DateTime? var_backupCreationDateTime = (System.DateTime?)value.BackupCreationDateTime; - System.DateTime? var_backupExpiryDateTime = (System.DateTime?)value.BackupExpiryDateTime; - Amazon.DynamoDBv2.BackupStatus var_backupStatus = (Amazon.DynamoDBv2.BackupStatus)value.BackupStatus; - Amazon.DynamoDBv2.BackupType var_backupType = (Amazon.DynamoDBv2.BackupType)value.BackupType; - long? var_backupSizeBytes = (long?)value.BackupSizeBytes; + string var_tableName = value.TableName; + string var_tableId = value.TableId; + string var_tableArn = value.TableArn; + string var_backupArn = value.BackupArn; + string var_backupName = value.BackupName; + System.DateTime? var_backupCreationDateTime = value.BackupCreationDateTime; + System.DateTime? var_backupExpiryDateTime = value.BackupExpiryDateTime; + Amazon.DynamoDBv2.BackupStatus var_backupStatus = value.BackupStatus; + Amazon.DynamoDBv2.BackupType var_backupType = value.BackupType; + long? var_backupSizeBytes = value.BackupSizeBytes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BackupSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M7_TableId(var_tableId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M9_BackupArn(var_backupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M10_BackupName(var_backupName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M22_BackupCreationDateTime(var_backupCreationDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M20_BackupExpiryDateTime(var_backupExpiryDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M12_BackupStatus(var_backupStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M10_BackupType(var_backupType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_BackupSummary__M15_BackupSizeBytes(var_backupSizeBytes)); } public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary value) @@ -9349,9 +9349,9 @@ public static Amazon.DynamoDBv2.Model.ContributorInsightsSummary FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IContributorInsightsSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary(Amazon.DynamoDBv2.Model.ContributorInsightsSummary value) { - string var_tableName = (string)value.TableName; - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = (Amazon.DynamoDBv2.ContributorInsightsStatus)value.ContributorInsightsStatus; + string var_tableName = value.TableName; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.ContributorInsightsStatus var_contributorInsightsStatus = value.ContributorInsightsStatus; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ContributorInsightsSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary__M9_TableName(var_tableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ContributorInsightsSummary__M25_ContributorInsightsStatus(var_contributorInsightsStatus)); } public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary value) @@ -9363,9 +9363,9 @@ public static Amazon.DynamoDBv2.Model.ExportSummary FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IExportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary(Amazon.DynamoDBv2.Model.ExportSummary value) { - string var_exportArn = (string)value.ExportArn; - Amazon.DynamoDBv2.ExportStatus var_exportStatus = (Amazon.DynamoDBv2.ExportStatus)value.ExportStatus; - Amazon.DynamoDBv2.ExportType var_exportType = (Amazon.DynamoDBv2.ExportType)value.ExportType; + string var_exportArn = value.ExportArn; + Amazon.DynamoDBv2.ExportStatus var_exportStatus = value.ExportStatus; + Amazon.DynamoDBv2.ExportType var_exportType = value.ExportType; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ExportSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary__M9_ExportArn(var_exportArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary__M12_ExportStatus(var_exportStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ExportSummary__M10_ExportType(var_exportType)); } public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable value) @@ -9376,8 +9376,8 @@ public static Amazon.DynamoDBv2.Model.GlobalTable FromDafny_N3_com__N9_amazonaws public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTable ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable(Amazon.DynamoDBv2.Model.GlobalTable value) { - string var_globalTableName = (string)value.GlobalTableName; - System.Collections.Generic.List var_replicationGroup = (System.Collections.Generic.List)value.ReplicationGroup; + string var_globalTableName = value.GlobalTableName; + System.Collections.Generic.List var_replicationGroup = value.ReplicationGroup; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTable(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable__M15_GlobalTableName(var_globalTableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S11_GlobalTable__M16_ReplicationGroup(var_replicationGroup)); } public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary(software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary value) @@ -9394,14 +9394,14 @@ public static Amazon.DynamoDBv2.Model.ImportSummary FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IImportSummary ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary(Amazon.DynamoDBv2.Model.ImportSummary value) { - string var_importArn = (string)value.ImportArn; - Amazon.DynamoDBv2.ImportStatus var_importStatus = (Amazon.DynamoDBv2.ImportStatus)value.ImportStatus; - string var_tableArn = (string)value.TableArn; - Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = (Amazon.DynamoDBv2.Model.S3BucketSource)value.S3BucketSource; - string var_cloudWatchLogGroupArn = (string)value.CloudWatchLogGroupArn; - Amazon.DynamoDBv2.InputFormat var_inputFormat = (Amazon.DynamoDBv2.InputFormat)value.InputFormat; - System.DateTime? var_startTime = (System.DateTime?)value.StartTime; - System.DateTime? var_endTime = (System.DateTime?)value.EndTime; + string var_importArn = value.ImportArn; + Amazon.DynamoDBv2.ImportStatus var_importStatus = value.ImportStatus; + string var_tableArn = value.TableArn; + Amazon.DynamoDBv2.Model.S3BucketSource var_s3BucketSource = value.S3BucketSource; + string var_cloudWatchLogGroupArn = value.CloudWatchLogGroupArn; + Amazon.DynamoDBv2.InputFormat var_inputFormat = value.InputFormat; + System.DateTime? var_startTime = value.StartTime; + System.DateTime? var_endTime = value.EndTime; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ImportSummary(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M9_ImportArn(var_importArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M12_ImportStatus(var_importStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M8_TableArn(var_tableArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M14_S3BucketSource(var_s3BucketSource), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M21_CloudWatchLogGroupArn(var_cloudWatchLogGroupArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M11_InputFormat(var_inputFormat), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M9_StartTime(var_startTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ImportSummary__M7_EndTime(var_endTime)); } public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition value) @@ -9412,7 +9412,7 @@ public static Amazon.DynamoDBv2.Model.Condition FromDafny_N3_com__N9_amazonaws__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICondition ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition(Amazon.DynamoDBv2.Model.Condition value) { - System.Collections.Generic.List var_attributeValueList = (System.Collections.Generic.List)value.AttributeValueList; + System.Collections.Generic.List var_attributeValueList = value.AttributeValueList; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Condition(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition__M18_AttributeValueList(var_attributeValueList), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition__M18_ComparisonOperator(value.ComparisonOperator)); } public static Amazon.DynamoDBv2.Model.TransactGetItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactGetItem value) @@ -9434,9 +9434,9 @@ public static Amazon.DynamoDBv2.Model.CancellationReason FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICancellationReason ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason(Amazon.DynamoDBv2.Model.CancellationReason value) { - System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; - string var_code = (string)value.Code; - string var_message = (string)value.Message; + System.Collections.Generic.Dictionary var_item = value.Item; + string var_code = value.Code; + string var_message = value.Message; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CancellationReason(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M4_Item(var_item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M4_Code(var_code), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M7_Message(var_message)); } public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem(software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem value) @@ -9449,10 +9449,10 @@ public static Amazon.DynamoDBv2.Model.TransactWriteItem FromDafny_N3_com__N9_ama public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ITransactWriteItem ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem(Amazon.DynamoDBv2.Model.TransactWriteItem value) { - Amazon.DynamoDBv2.Model.ConditionCheck var_conditionCheck = (Amazon.DynamoDBv2.Model.ConditionCheck)value.ConditionCheck; - Amazon.DynamoDBv2.Model.Put var_put = (Amazon.DynamoDBv2.Model.Put)value.Put; - Amazon.DynamoDBv2.Model.Delete var_delete = (Amazon.DynamoDBv2.Model.Delete)value.Delete; - Amazon.DynamoDBv2.Model.Update var_update = (Amazon.DynamoDBv2.Model.Update)value.Update; + Amazon.DynamoDBv2.Model.ConditionCheck var_conditionCheck = value.ConditionCheck; + Amazon.DynamoDBv2.Model.Put var_put = value.Put; + Amazon.DynamoDBv2.Model.Delete var_delete = value.Delete; + Amazon.DynamoDBv2.Model.Update var_update = value.Update; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.TransactWriteItem(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M14_ConditionCheck(var_conditionCheck), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M3_Put(var_put), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M6_Delete(var_delete), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TransactWriteItem__M6_Update(var_update)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString(Dafny.ISequence value) @@ -9471,8 +9471,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaUpdate FromDafny_N3_com__N9_amazona public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate(Amazon.DynamoDBv2.Model.ReplicaUpdate value) { - Amazon.DynamoDBv2.Model.CreateReplicaAction var_create = (Amazon.DynamoDBv2.Model.CreateReplicaAction)value.Create; - Amazon.DynamoDBv2.Model.DeleteReplicaAction var_delete = (Amazon.DynamoDBv2.Model.DeleteReplicaAction)value.Delete; + Amazon.DynamoDBv2.Model.CreateReplicaAction var_create = value.Create; + Amazon.DynamoDBv2.Model.DeleteReplicaAction var_delete = value.Delete; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate__M6_Create(var_create), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_ReplicaUpdate__M6_Delete(var_delete)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_AutoScalingRoleArn(Dafny.ISequence value) @@ -9491,7 +9491,7 @@ public static Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingPolicyUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate(Amazon.DynamoDBv2.Model.AutoScalingPolicyUpdate value) { - string var_policyName = (string)value.PolicyName; + string var_policyName = value.PolicyName; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingPolicyUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate__M10_PolicyName(var_policyName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate__M40_TargetTrackingScalingPolicyConfiguration(value.TargetTrackingScalingPolicyConfiguration)); } public static Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableGlobalSecondaryIndexSettingsUpdate value) @@ -9503,8 +9503,8 @@ public static Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpd public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalTableGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate(Amazon.DynamoDBv2.Model.GlobalTableGlobalSecondaryIndexSettingsUpdate value) { - long? var_provisionedWriteCapacityUnits = (long?)value.ProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedWriteCapacityAutoScalingSettingsUpdate; + long? var_provisionedWriteCapacityUnits = value.ProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingSettingsUpdate = value.ProvisionedWriteCapacityAutoScalingSettingsUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalTableGlobalSecondaryIndexSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M29_ProvisionedWriteCapacityUnits(var_provisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M49_ProvisionedWriteCapacityAutoScalingSettingsUpdate(var_provisionedWriteCapacityAutoScalingSettingsUpdate)); } public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate value) @@ -9518,10 +9518,10 @@ public static Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate FromDafny_N3_com__N9 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate(Amazon.DynamoDBv2.Model.ReplicaSettingsUpdate value) { - long? var_replicaProvisionedReadCapacityUnits = (long?)value.ReplicaProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate; - System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettingsUpdate = (System.Collections.Generic.List)value.ReplicaGlobalSecondaryIndexSettingsUpdate; - Amazon.DynamoDBv2.TableClass var_replicaTableClass = (Amazon.DynamoDBv2.TableClass)value.ReplicaTableClass; + long? var_replicaProvisionedReadCapacityUnits = value.ReplicaProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingSettingsUpdate = value.ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate; + System.Collections.Generic.List var_replicaGlobalSecondaryIndexSettingsUpdate = value.ReplicaGlobalSecondaryIndexSettingsUpdate; + Amazon.DynamoDBv2.TableClass var_replicaTableClass = value.ReplicaTableClass; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M35_ReplicaProvisionedReadCapacityUnits(var_replicaProvisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M55_ReplicaProvisionedReadCapacityAutoScalingSettingsUpdate(var_replicaProvisionedReadCapacityAutoScalingSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M41_ReplicaGlobalSecondaryIndexSettingsUpdate(var_replicaGlobalSecondaryIndexSettingsUpdate), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M17_ReplicaTableClass(var_replicaTableClass)); } public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate value) @@ -9532,8 +9532,8 @@ public static Amazon.DynamoDBv2.Model.AttributeValueUpdate FromDafny_N3_com__N9_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValueUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate(Amazon.DynamoDBv2.Model.AttributeValueUpdate value) { - Amazon.DynamoDBv2.Model.AttributeValue var_value = (Amazon.DynamoDBv2.Model.AttributeValue)value.Value; - Amazon.DynamoDBv2.AttributeAction var_action = (Amazon.DynamoDBv2.AttributeAction)value.Action; + Amazon.DynamoDBv2.Model.AttributeValue var_value = value.Value; + Amazon.DynamoDBv2.AttributeAction var_action = value.Action; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AttributeValueUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate__M5_Value(var_value), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_AttributeValueUpdate__M6_Action(var_action)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexUpdate value) @@ -9545,9 +9545,9 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexUpdate value) { - Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction var_update = (Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction)value.Update; - Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction var_create = (Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction)value.Create; - Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction var_delete = (Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction)value.Delete; + Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction var_update = value.Update; + Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction var_create = value.Create; + Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction var_delete = value.Delete; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate__M6_Update(var_update), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate__M6_Create(var_create), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_GlobalSecondaryIndexUpdate__M6_Delete(var_delete)); } public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate value) @@ -9559,9 +9559,9 @@ public static Amazon.DynamoDBv2.Model.ReplicationGroupUpdate FromDafny_N3_com__N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicationGroupUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate(Amazon.DynamoDBv2.Model.ReplicationGroupUpdate value) { - Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction var_create = (Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction)value.Create; - Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction var_update = (Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction)value.Update; - Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction var_delete = (Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction)value.Delete; + Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction var_create = value.Create; + Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction var_update = value.Update; + Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction var_delete = value.Delete; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicationGroupUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate__M6_Create(var_create), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate__M6_Update(var_update), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicationGroupUpdate__M6_Delete(var_delete)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate value) @@ -9572,8 +9572,8 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate From public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexAutoScalingUpdate value) { - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedWriteCapacityAutoScalingUpdate; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedWriteCapacityAutoScalingUpdate = value.ProvisionedWriteCapacityAutoScalingUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexAutoScalingUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S37_GlobalSecondaryIndexAutoScalingUpdate__M41_ProvisionedWriteCapacityAutoScalingUpdate(var_provisionedWriteCapacityAutoScalingUpdate)); } public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate value) @@ -9585,8 +9585,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate(Amazon.DynamoDBv2.Model.ReplicaAutoScalingUpdate value) { - System.Collections.Generic.List var_replicaGlobalSecondaryIndexUpdates = (System.Collections.Generic.List)value.ReplicaGlobalSecondaryIndexUpdates; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ReplicaProvisionedReadCapacityAutoScalingUpdate; + System.Collections.Generic.List var_replicaGlobalSecondaryIndexUpdates = value.ReplicaGlobalSecondaryIndexUpdates; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_replicaProvisionedReadCapacityAutoScalingUpdate = value.ReplicaProvisionedReadCapacityAutoScalingUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaAutoScalingUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M34_ReplicaGlobalSecondaryIndexUpdates(var_replicaGlobalSecondaryIndexUpdates), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M47_ReplicaProvisionedReadCapacityAutoScalingUpdate(var_replicaProvisionedReadCapacityAutoScalingUpdate)); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_TimeToLiveEnabled(bool value) @@ -9603,7 +9603,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchState } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M9_Statement(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_BatchStatementRequest__M10_Parameters(Wrappers_Compile._IOption> value) { @@ -9659,7 +9659,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_BatchState } public static Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M4_Keys(System.Collections.Generic.List> value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList((System.Collections.Generic.List>)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_KeysAndAttributes__M15_AttributesToGet(Wrappers_Compile._IOption>> value) { @@ -9699,7 +9699,7 @@ public static Amazon.DynamoDBv2.Model.WriteRequest FromDafny_N3_com__N9_amazonaw } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IWriteRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_WriteRequests__M6_member(Amazon.DynamoDBv2.Model.WriteRequest value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest((Amazon.DynamoDBv2.Model.WriteRequest)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest(value); } public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics value) { @@ -9707,7 +9707,7 @@ public static Amazon.DynamoDBv2.Model.ItemCollectionMetrics FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IItemCollectionMetrics ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionMetricsMultiple__M6_member(Amazon.DynamoDBv2.Model.ItemCollectionMetrics value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics((Amazon.DynamoDBv2.Model.ItemCollectionMetrics)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ItemCollectionMetrics(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_Replica__M10_RegionName(Wrappers_Compile._IOption> value) { @@ -9723,7 +9723,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaDescription FromDafny_N3_com__N9_am } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ReplicaDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription((Amazon.DynamoDBv2.Model.ReplicaDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeName(Dafny.ISequence value) { @@ -9731,7 +9731,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeD } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName(value); } public static Amazon.DynamoDBv2.ScalarAttributeType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IScalarAttributeType value) { @@ -9739,7 +9739,7 @@ public static Amazon.DynamoDBv2.ScalarAttributeType FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IScalarAttributeType ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_AttributeDefinition__M13_AttributeType(Amazon.DynamoDBv2.ScalarAttributeType value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ScalarAttributeType((Amazon.DynamoDBv2.ScalarAttributeType)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ScalarAttributeType(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M13_AttributeName(Dafny.ISequence value) { @@ -9747,7 +9747,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaE } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M13_AttributeName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName(value); } public static Amazon.DynamoDBv2.KeyType FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M7_KeyType(software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeyType value) { @@ -9755,7 +9755,7 @@ public static Amazon.DynamoDBv2.KeyType FromDafny_N3_com__N9_amazonaws__N8_dynam } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IKeyType ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_KeySchemaElement__M7_KeyType(Amazon.DynamoDBv2.KeyType value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyType((Amazon.DynamoDBv2.KeyType)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyType(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_IndexName(Dafny.ISequence value) { @@ -9763,7 +9763,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecon } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_KeySchema(Dafny.ISequence value) { @@ -9771,7 +9771,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); } public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M10_Projection(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection value) { @@ -9779,7 +9779,7 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_LocalSecondaryIndex__M10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection((Amazon.DynamoDBv2.Model.Projection)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_IndexName(Dafny.ISequence value) { @@ -9787,7 +9787,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSeco } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_KeySchema(Dafny.ISequence value) { @@ -9795,7 +9795,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); } public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M10_Projection(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection value) { @@ -9803,7 +9803,7 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection((Amazon.DynamoDBv2.Model.Projection)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S20_GlobalSecondaryIndex__M21_ProvisionedThroughput(Wrappers_Compile._IOption value) { @@ -9827,7 +9827,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M3_Key } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M3_Key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_TagKeyString(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M5_Value(Dafny.ISequence value) { @@ -9835,7 +9835,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M5_Val } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Tag__M5_Value(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_TagValueString((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_TagValueString(value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_ProvisionedThroughputDescription__M20_LastIncreaseDateTime(Wrappers_Compile._IOption> value) { @@ -9899,7 +9899,7 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription FromDafny_N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_LocalSecondaryIndexDescriptionList__M6_member(Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription((Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription(value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_GlobalSecondaryIndexDescriptionList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription value) { @@ -9907,7 +9907,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S35_GlobalSecondaryIndexDescriptionList__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_SourceBackupArn(Wrappers_Compile._IOption> value) { @@ -9931,7 +9931,7 @@ public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_R } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M15_RestoreDateTime(System.DateTime value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date((System.DateTime)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Date(value); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M17_RestoreInProgress(bool value) { @@ -9939,7 +9939,7 @@ public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSumma } public static bool ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_RestoreSummary__M17_RestoreInProgress(bool value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_RestoreInProgress((bool)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_RestoreInProgress(value); } public static Amazon.DynamoDBv2.SSEStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_SSEDescription__M6_Status(Wrappers_Compile._IOption value) { @@ -10019,7 +10019,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_TableName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M7_TableId(Dafny.ISequence value) { @@ -10027,7 +10027,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M7_TableId(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TableId((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_TableId(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M8_TableArn(Wrappers_Compile._IOption> value) { @@ -10051,7 +10051,7 @@ public static Wrappers_Compile._IOption ToDafny_N3_com__N9_amazonaws__N8_d } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); } public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_TableCreationDateTime(Dafny.ISequence value) { @@ -10059,7 +10059,7 @@ public static System.DateTime FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_TableCreationDateTime(System.DateTime value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime((System.DateTime)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_TableCreationDateTime(value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_ProvisionedThroughput(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughput value) { @@ -10067,7 +10067,7 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughput ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M21_ProvisionedThroughput(Amazon.DynamoDBv2.Model.ProvisionedThroughput value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput((Amazon.DynamoDBv2.Model.ProvisionedThroughput)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ProvisionedThroughput(value); } public static Amazon.DynamoDBv2.Model.OnDemandThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_SourceTableDetails__M18_OnDemandThroughput(Wrappers_Compile._IOption value) { @@ -10195,7 +10195,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryI } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static Amazon.DynamoDBv2.Model.Capacity FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity value) { @@ -10203,7 +10203,7 @@ public static Amazon.DynamoDBv2.Model.Capacity FromDafny_N3_com__N9_amazonaws__N } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICapacity ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_SecondaryIndexesCapacityMap__M5_value(Amazon.DynamoDBv2.Model.Capacity value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity((Amazon.DynamoDBv2.Model.Capacity)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Capacity(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M3_key(Dafny.ISequence value) { @@ -10211,7 +10211,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_AttributeName(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M5_value(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -10219,7 +10219,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ItemCollectionKeyAttributeMap__M5_value(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateRange__M6_member(Dafny.ISequence value) { @@ -10227,7 +10227,7 @@ public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateRange__M6_member(double value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateBound((double)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ItemCollectionSizeEstimateBound(value); } public static Amazon.DynamoDBv2.PointInTimeRecoveryStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_PointInTimeRecoveryDescription__M25_PointInTimeRecoveryStatus(Wrappers_Compile._IOption value) { @@ -10259,7 +10259,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M7_Address(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_String((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_String(value); } public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M20_CachePeriodInMinutes(long value) { @@ -10267,7 +10267,7 @@ public static long FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M20 } public static long ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_Endpoint__M20_CachePeriodInMinutes(long value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Long((long)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Long(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M10_RegionName(Dafny.ISequence value) { @@ -10275,7 +10275,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSet } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static Amazon.DynamoDBv2.ReplicaStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_ReplicaSettingsDescription__M13_ReplicaStatus(Wrappers_Compile._IOption value) { @@ -10379,7 +10379,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription FromDafny_N3 } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S33_ReplicaAutoScalingDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription((Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M9_Statement(Dafny.ISequence value) { @@ -10387,7 +10387,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_Parameteri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M9_Statement(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_PartiQLStatement(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_ParameterizedStatement__M10_Parameters(Wrappers_Compile._IOption> value) { @@ -10651,7 +10651,7 @@ public static Amazon.DynamoDBv2.ComparisonOperator FromDafny_N3_com__N9_amazonaw } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IComparisonOperator ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_Condition__M18_ComparisonOperator(Amazon.DynamoDBv2.ComparisonOperator value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ComparisonOperator((Amazon.DynamoDBv2.ComparisonOperator)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ComparisonOperator(value); } public static Amazon.DynamoDBv2.Model.Get FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem__M3_Get(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGet value) { @@ -10659,7 +10659,7 @@ public static Amazon.DynamoDBv2.Model.Get FromDafny_N3_com__N9_amazonaws__N8_dyn } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGet ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S15_TransactGetItem__M3_Get(Amazon.DynamoDBv2.Model.Get value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get((Amazon.DynamoDBv2.Model.Get)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_CancellationReason__M4_Item(Wrappers_Compile._IOption, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> value) { @@ -10747,7 +10747,7 @@ public static Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConf } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingTargetTrackingScalingPolicyConfigurationUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_AutoScalingPolicyUpdate__M40_TargetTrackingScalingPolicyConfiguration(Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate((Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M9_IndexName(Dafny.ISequence value) { @@ -10755,7 +10755,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTabl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_GlobalTableGlobalSecondaryIndexSettingsUpdate__M29_ProvisionedWriteCapacityUnits(Wrappers_Compile._IOption value) { @@ -10779,7 +10779,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSet } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_ReplicaSettingsUpdate__M35_ReplicaProvisionedReadCapacityUnits(Wrappers_Compile._IOption value) { @@ -10899,7 +10899,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAut } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_ReplicaAutoScalingUpdate__M34_ReplicaGlobalSecondaryIndexUpdates(Wrappers_Compile._IOption> value) { @@ -10926,9 +10926,9 @@ public static Amazon.DynamoDBv2.Model.BatchStatementError FromDafny_N3_com__N9_a public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementError ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError(Amazon.DynamoDBv2.Model.BatchStatementError value) { - Amazon.DynamoDBv2.BatchStatementErrorCodeEnum var_code = (Amazon.DynamoDBv2.BatchStatementErrorCodeEnum)value.Code; - string var_message = (string)value.Message; - System.Collections.Generic.Dictionary var_item = (System.Collections.Generic.Dictionary)value.Item; + Amazon.DynamoDBv2.BatchStatementErrorCodeEnum var_code = value.Code; + string var_message = value.Message; + System.Collections.Generic.Dictionary var_item = value.Item; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.BatchStatementError(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError__M4_Code(var_code), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError__M7_Message(var_message), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchStatementError__M4_Item(var_item)); } public static System.Collections.Generic.List> FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList(Dafny.ISequence, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue>> value) @@ -10947,8 +10947,8 @@ public static Amazon.DynamoDBv2.Model.WriteRequest FromDafny_N3_com__N9_amazonaw public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IWriteRequest ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest(Amazon.DynamoDBv2.Model.WriteRequest value) { - Amazon.DynamoDBv2.Model.PutRequest var_putRequest = (Amazon.DynamoDBv2.Model.PutRequest)value.PutRequest; - Amazon.DynamoDBv2.Model.DeleteRequest var_deleteRequest = (Amazon.DynamoDBv2.Model.DeleteRequest)value.DeleteRequest; + Amazon.DynamoDBv2.Model.PutRequest var_putRequest = value.PutRequest; + Amazon.DynamoDBv2.Model.DeleteRequest var_deleteRequest = value.DeleteRequest; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.WriteRequest(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest__M10_PutRequest(var_putRequest), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest__M13_DeleteRequest(var_deleteRequest)); } public static Amazon.DynamoDBv2.Model.ReplicaDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaDescription value) @@ -10967,16 +10967,16 @@ public static Amazon.DynamoDBv2.Model.ReplicaDescription FromDafny_N3_com__N9_am public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription(Amazon.DynamoDBv2.Model.ReplicaDescription value) { - string var_regionName = (string)value.RegionName; - Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = (Amazon.DynamoDBv2.ReplicaStatus)value.ReplicaStatus; - string var_replicaStatusDescription = (string)value.ReplicaStatusDescription; - string var_replicaStatusPercentProgress = (string)value.ReplicaStatusPercentProgress; - string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - System.DateTime? var_replicaInaccessibleDateTime = (System.DateTime?)value.ReplicaInaccessibleDateTime; - Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = (Amazon.DynamoDBv2.Model.TableClassSummary)value.ReplicaTableClassSummary; + string var_regionName = value.RegionName; + Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = value.ReplicaStatus; + string var_replicaStatusDescription = value.ReplicaStatusDescription; + string var_replicaStatusPercentProgress = value.ReplicaStatusPercentProgress; + string var_kMSMasterKeyId = value.KMSMasterKeyId; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + System.DateTime? var_replicaInaccessibleDateTime = value.ReplicaInaccessibleDateTime; + Amazon.DynamoDBv2.Model.TableClassSummary var_replicaTableClassSummary = value.ReplicaTableClassSummary; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M10_RegionName(var_regionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M13_ReplicaStatus(var_replicaStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M24_ReplicaStatusDescription(var_replicaStatusDescription), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M28_ReplicaStatusPercentProgress(var_replicaStatusPercentProgress), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M14_KMSMasterKeyId(var_kMSMasterKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M27_ReplicaInaccessibleDateTime(var_replicaInaccessibleDateTime), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_ReplicaDescription__M24_ReplicaTableClassSummary(var_replicaTableClassSummary)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_KeySchemaAttributeName(Dafny.ISequence value) @@ -11021,8 +11021,8 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - Amazon.DynamoDBv2.ProjectionType var_projectionType = (Amazon.DynamoDBv2.ProjectionType)value.ProjectionType; - System.Collections.Generic.List var_nonKeyAttributes = (System.Collections.Generic.List)value.NonKeyAttributes; + Amazon.DynamoDBv2.ProjectionType var_projectionType = value.ProjectionType; + System.Collections.Generic.List var_nonKeyAttributes = value.NonKeyAttributes; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Projection(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection__M14_ProjectionType(var_projectionType), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection__M16_NonKeyAttributes(var_nonKeyAttributes)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_TagValueString(Dafny.ISequence value) @@ -11053,12 +11053,12 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription(Amazon.DynamoDBv2.Model.LocalSecondaryIndexDescription value) { - string var_indexName = (string)value.IndexName; - System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; - long? var_indexSizeBytes = (long?)value.IndexSizeBytes; - long? var_itemCount = (long?)value.ItemCount; - string var_indexArn = (string)value.IndexArn; + string var_indexName = value.IndexName; + System.Collections.Generic.List var_keySchema = value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; + long? var_indexSizeBytes = value.IndexSizeBytes; + long? var_itemCount = value.ItemCount; + string var_indexArn = value.IndexArn; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M10_Projection(var_projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M14_IndexSizeBytes(var_indexSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_LocalSecondaryIndexDescription__M8_IndexArn(var_indexArn)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription value) @@ -11077,16 +11077,16 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription FromDafny_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexDescription value) { - string var_indexName = (string)value.IndexName; - System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; - Amazon.DynamoDBv2.IndexStatus var_indexStatus = (Amazon.DynamoDBv2.IndexStatus)value.IndexStatus; - bool? var_backfilling = (bool?)value.Backfilling; - Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription)value.ProvisionedThroughput; - long? var_indexSizeBytes = (long?)value.IndexSizeBytes; - long? var_itemCount = (long?)value.ItemCount; - string var_indexArn = (string)value.IndexArn; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + string var_indexName = value.IndexName; + System.Collections.Generic.List var_keySchema = value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; + Amazon.DynamoDBv2.IndexStatus var_indexStatus = value.IndexStatus; + bool? var_backfilling = value.Backfilling; + Amazon.DynamoDBv2.Model.ProvisionedThroughputDescription var_provisionedThroughput = value.ProvisionedThroughput; + long? var_indexSizeBytes = value.IndexSizeBytes; + long? var_itemCount = value.ItemCount; + string var_indexArn = value.IndexArn; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M10_Projection(var_projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M11_IndexStatus(var_indexStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M11_Backfilling(var_backfilling), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M14_IndexSizeBytes(var_indexSizeBytes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M9_ItemCount(var_itemCount), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M8_IndexArn(var_indexArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_GlobalSecondaryIndexDescription__M18_OnDemandThroughput(var_onDemandThroughput)); } public static bool FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S17_RestoreInProgress(bool value) @@ -11262,11 +11262,11 @@ public static Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription FromDafny_N public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription(Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription value) { - long? var_minimumUnits = (long?)value.MinimumUnits; - long? var_maximumUnits = (long?)value.MaximumUnits; - bool? var_autoScalingDisabled = (bool?)value.AutoScalingDisabled; - string var_autoScalingRoleArn = (string)value.AutoScalingRoleArn; - System.Collections.Generic.List var_scalingPolicies = (System.Collections.Generic.List)value.ScalingPolicies; + long? var_minimumUnits = value.MinimumUnits; + long? var_maximumUnits = value.MaximumUnits; + bool? var_autoScalingDisabled = value.AutoScalingDisabled; + string var_autoScalingRoleArn = value.AutoScalingRoleArn; + System.Collections.Generic.List var_scalingPolicies = value.ScalingPolicies; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingSettingsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M12_MinimumUnits(var_minimumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M12_MaximumUnits(var_maximumUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M19_AutoScalingDisabled(var_autoScalingDisabled), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M18_AutoScalingRoleArn(var_autoScalingRoleArn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M15_ScalingPolicies(var_scalingPolicies)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S50_ReplicaGlobalSecondaryIndexSettingsDescriptionList(Dafny.ISequence value) @@ -11288,11 +11288,11 @@ public static Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription(Amazon.DynamoDBv2.Model.ReplicaAutoScalingDescription value) { - string var_regionName = (string)value.RegionName; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedReadCapacityAutoScalingSettings; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ReplicaProvisionedWriteCapacityAutoScalingSettings; - Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = (Amazon.DynamoDBv2.ReplicaStatus)value.ReplicaStatus; + string var_regionName = value.RegionName; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedReadCapacityAutoScalingSettings = value.ReplicaProvisionedReadCapacityAutoScalingSettings; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_replicaProvisionedWriteCapacityAutoScalingSettings = value.ReplicaProvisionedWriteCapacityAutoScalingSettings; + Amazon.DynamoDBv2.ReplicaStatus var_replicaStatus = value.ReplicaStatus; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaAutoScalingDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M10_RegionName(var_regionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M49_ReplicaProvisionedReadCapacityAutoScalingSettings(var_replicaProvisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M50_ReplicaProvisionedWriteCapacityAutoScalingSettings(var_replicaProvisionedWriteCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M13_ReplicaStatus(var_replicaStatus)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_CsvDelimiter(Dafny.ISequence value) @@ -11321,8 +11321,8 @@ public static Amazon.DynamoDBv2.Model.Get FromDafny_N3_com__N9_amazonaws__N8_dyn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGet ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get(Amazon.DynamoDBv2.Model.Get value) { - string var_projectionExpression = (string)value.ProjectionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; + string var_projectionExpression = value.ProjectionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Get(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M20_ProjectionExpression(var_projectionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M24_ExpressionAttributeNames(var_expressionAttributeNames)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S4_Code(Dafny.ISequence value) @@ -11345,9 +11345,9 @@ public static Amazon.DynamoDBv2.Model.ConditionCheck FromDafny_N3_com__N9_amazon public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IConditionCheck ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck(Amazon.DynamoDBv2.Model.ConditionCheck value) { - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ConditionCheck(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M19_ConditionExpression(value.ConditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.Put FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put(software.amazon.cryptography.services.dynamodb.internaldafny.types._IPut value) @@ -11362,10 +11362,10 @@ public static Amazon.DynamoDBv2.Model.Put FromDafny_N3_com__N9_amazonaws__N8_dyn public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IPut ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put(Amazon.DynamoDBv2.Model.Put value) { - string var_conditionExpression = (string)value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + string var_conditionExpression = value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Put(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M4_Item(value.Item), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.Delete FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDelete value) @@ -11380,10 +11380,10 @@ public static Amazon.DynamoDBv2.Model.Delete FromDafny_N3_com__N9_amazonaws__N8_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IDelete ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete(Amazon.DynamoDBv2.Model.Delete value) { - string var_conditionExpression = (string)value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + string var_conditionExpression = value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Delete(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.Update FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdate value) @@ -11399,10 +11399,10 @@ public static Amazon.DynamoDBv2.Model.Update FromDafny_N3_com__N9_amazonaws__N8_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update(Amazon.DynamoDBv2.Model.Update value) { - string var_conditionExpression = (string)value.ConditionExpression; - System.Collections.Generic.Dictionary var_expressionAttributeNames = (System.Collections.Generic.Dictionary)value.ExpressionAttributeNames; - System.Collections.Generic.Dictionary var_expressionAttributeValues = (System.Collections.Generic.Dictionary)value.ExpressionAttributeValues; - Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = (Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure)value.ReturnValuesOnConditionCheckFailure; + string var_conditionExpression = value.ConditionExpression; + System.Collections.Generic.Dictionary var_expressionAttributeNames = value.ExpressionAttributeNames; + System.Collections.Generic.Dictionary var_expressionAttributeValues = value.ExpressionAttributeValues; + Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure var_returnValuesOnConditionCheckFailure = value.ReturnValuesOnConditionCheckFailure; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.Update(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M3_Key(value.Key), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16_UpdateExpression(value.UpdateExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_TableName(value.TableName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M19_ConditionExpression(var_conditionExpression), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M24_ExpressionAttributeNames(var_expressionAttributeNames), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M25_ExpressionAttributeValues(var_expressionAttributeValues), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M35_ReturnValuesOnConditionCheckFailure(var_returnValuesOnConditionCheckFailure)); } public static Amazon.DynamoDBv2.Model.CreateReplicaAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_CreateReplicaAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateReplicaAction value) @@ -11443,9 +11443,9 @@ public static Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingTargetTrackingScalingPolicyConfigurationUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate value) { - bool? var_disableScaleIn = (bool?)value.DisableScaleIn; - int? var_scaleInCooldown = (int?)value.ScaleInCooldown; - int? var_scaleOutCooldown = (int?)value.ScaleOutCooldown; + bool? var_disableScaleIn = value.DisableScaleIn; + int? var_scaleInCooldown = value.ScaleInCooldown; + int? var_scaleOutCooldown = value.ScaleOutCooldown; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingTargetTrackingScalingPolicyConfigurationUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M14_DisableScaleIn(var_disableScaleIn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M15_ScaleInCooldown(var_scaleInCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M16_ScaleOutCooldown(var_scaleOutCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M11_TargetValue((int)value.TargetValue)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_ReplicaGlobalSecondaryIndexSettingsUpdateList(Dafny.ISequence value) @@ -11479,8 +11479,8 @@ public static Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateGlobalSecondaryIndexAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction(Amazon.DynamoDBv2.Model.UpdateGlobalSecondaryIndexAction value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateGlobalSecondaryIndexAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalSecondaryIndexAction value) @@ -11494,8 +11494,8 @@ public static Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction FromDafny public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateGlobalSecondaryIndexAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction(Amazon.DynamoDBv2.Model.CreateGlobalSecondaryIndexAction value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateGlobalSecondaryIndexAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_KeySchema(value.KeySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M10_Projection(value.Projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M18_OnDemandThroughput(var_onDemandThroughput)); } public static Amazon.DynamoDBv2.Model.DeleteGlobalSecondaryIndexAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DeleteGlobalSecondaryIndexAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteGlobalSecondaryIndexAction value) @@ -11520,11 +11520,11 @@ public static Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction FromDaf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ICreateReplicationGroupMemberAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction(Amazon.DynamoDBv2.Model.CreateReplicationGroupMemberAction value) { - string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.TableClass var_tableClassOverride = (Amazon.DynamoDBv2.TableClass)value.TableClassOverride; + string var_kMSMasterKeyId = value.KMSMasterKeyId; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.TableClass var_tableClassOverride = value.TableClassOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.CreateReplicationGroupMemberAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M14_KMSMasterKeyId(var_kMSMasterKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M18_TableClassOverride(var_tableClassOverride)); } public static Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateReplicationGroupMemberAction value) @@ -11539,11 +11539,11 @@ public static Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction FromDaf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IUpdateReplicationGroupMemberAction ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction(Amazon.DynamoDBv2.Model.UpdateReplicationGroupMemberAction value) { - string var_kMSMasterKeyId = (string)value.KMSMasterKeyId; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; - System.Collections.Generic.List var_globalSecondaryIndexes = (System.Collections.Generic.List)value.GlobalSecondaryIndexes; - Amazon.DynamoDBv2.TableClass var_tableClassOverride = (Amazon.DynamoDBv2.TableClass)value.TableClassOverride; + string var_kMSMasterKeyId = value.KMSMasterKeyId; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; + System.Collections.Generic.List var_globalSecondaryIndexes = value.GlobalSecondaryIndexes; + Amazon.DynamoDBv2.TableClass var_tableClassOverride = value.TableClassOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.UpdateReplicationGroupMemberAction(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M10_RegionName(value.RegionName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M14_KMSMasterKeyId(var_kMSMasterKeyId), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M22_GlobalSecondaryIndexes(var_globalSecondaryIndexes), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M18_TableClassOverride(var_tableClassOverride)); } public static Amazon.DynamoDBv2.Model.DeleteReplicationGroupMemberAction FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_DeleteReplicationGroupMemberAction(software.amazon.cryptography.services.dynamodb.internaldafny.types._IDeleteReplicationGroupMemberAction value) @@ -11594,7 +11594,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_BatchState } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S7_KeyList__M6_member(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static Amazon.DynamoDBv2.Model.PutRequest FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_WriteRequest__M10_PutRequest(Wrappers_Compile._IOption value) { @@ -11848,7 +11848,7 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo FromDafny_N3_com__ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S21_LocalSecondaryIndexes__M6_member(Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo((Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo(value); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalSecondaryIndexes__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo value) { @@ -11856,7 +11856,7 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S22_GlobalSecondaryIndexes__M6_member(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo((Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo(value); } public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_AttributeValueList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue value) { @@ -11864,7 +11864,7 @@ public static Amazon.DynamoDBv2.Model.AttributeValue FromDafny_N3_com__N9_amazon } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S18_AttributeValueList__M6_member(Amazon.DynamoDBv2.Model.AttributeValue value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue((Amazon.DynamoDBv2.Model.AttributeValue)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_AttributeValue(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S30_AutoScalingSettingsDescription__M12_MinimumUnits(Wrappers_Compile._IOption value) { @@ -11912,7 +11912,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescrip } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S50_ReplicaGlobalSecondaryIndexSettingsDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ReplicaAutoScalingDescription__M10_RegionName(Wrappers_Compile._IOption> value) { @@ -11960,7 +11960,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_CsvHeaderL } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_CsvHeaderList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_CsvHeader((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_CsvHeader(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -11968,7 +11968,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_TableName(Dafny.ISequence value) { @@ -11976,7 +11976,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_Tab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Get__M20_ProjectionExpression(Wrappers_Compile._IOption> value) { @@ -12000,7 +12000,7 @@ public static System.Collections.Generic.Dictionary FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M9_TableName(Dafny.ISequence value) { @@ -12008,7 +12008,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionC } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M19_ConditionExpression(Dafny.ISequence value) { @@ -12016,7 +12016,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionC } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M19_ConditionExpression(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ConditionExpression((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_ConditionExpression(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S14_ConditionCheck__M24_ExpressionAttributeNames(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -12048,7 +12048,7 @@ public static Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M4_Item(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_TableName(Dafny.ISequence value) { @@ -12056,7 +12056,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_Tab } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Put__M19_ConditionExpression(Wrappers_Compile._IOption> value) { @@ -12096,7 +12096,7 @@ public static Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_TableName(Dafny.ISequence value) { @@ -12104,7 +12104,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Delete__M19_ConditionExpression(Wrappers_Compile._IOption> value) { @@ -12144,7 +12144,7 @@ public static Amazon.DynamoDBv2.ReturnValuesOnConditionCheckFailure FromDafny_N3 } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16_UpdateExpression(Dafny.ISequence value) { @@ -12152,7 +12152,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M16_UpdateExpression(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateExpression((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S16_UpdateExpression(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_TableName(Dafny.ISequence value) { @@ -12160,7 +12160,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M9_TableName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S8_TableArn(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S6_Update__M19_ConditionExpression(Wrappers_Compile._IOption> value) { @@ -12200,7 +12200,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_CreateRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_CreateReplicaAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DeleteReplicaAction__M10_RegionName(Dafny.ISequence value) { @@ -12208,7 +12208,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DeleteRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_DeleteReplicaAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static bool? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M14_DisableScaleIn(Wrappers_Compile._IOption value) { @@ -12240,7 +12240,7 @@ public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S57_AutoScalingTargetTrackingScalingPolicyConfigurationUpdate__M11_TargetValue(double value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject((double)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject(value); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_ReplicaGlobalSecondaryIndexSettingsUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsUpdate value) { @@ -12248,7 +12248,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S45_ReplicaGlobalSecondaryIndexSettingsUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M9_IndexName(Dafny.ISequence value) { @@ -12256,7 +12256,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_UpdateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(Wrappers_Compile._IOption value) { @@ -12280,7 +12280,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_KeySchema(Dafny.ISequence value) { @@ -12288,7 +12288,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M9_KeySchema(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_KeySchema(value); } public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M10_Projection(software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection value) { @@ -12296,7 +12296,7 @@ public static Amazon.DynamoDBv2.Model.Projection FromDafny_N3_com__N9_amazonaws_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProjection ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M10_Projection(Amazon.DynamoDBv2.Model.Projection value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection((Amazon.DynamoDBv2.Model.Projection)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_Projection(value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughput FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_CreateGlobalSecondaryIndexAction__M21_ProvisionedThroughput(Wrappers_Compile._IOption value) { @@ -12320,7 +12320,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DeleteGlob } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_DeleteGlobalSecondaryIndexAction__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M10_RegionName(Dafny.ISequence value) { @@ -12328,7 +12328,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_CreateReplicationGroupMemberAction__M14_KMSMasterKeyId(Wrappers_Compile._IOption> value) { @@ -12376,7 +12376,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_UpdateReplicationGroupMemberAction__M14_KMSMasterKeyId(Wrappers_Compile._IOption> value) { @@ -12424,7 +12424,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_DeleteRepl } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S34_DeleteReplicationGroupMemberAction__M10_RegionName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_RegionName(value); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S48_ReplicaGlobalSecondaryIndexAutoScalingUpdateList__M6_member(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingUpdate value) { @@ -12432,7 +12432,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpda } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S48_ReplicaGlobalSecondaryIndexAutoScalingUpdateList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate(value); } public static Amazon.DynamoDBv2.BatchStatementErrorCodeEnum FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_BatchStatementErrorCodeEnum(software.amazon.cryptography.services.dynamodb.internaldafny.types._IBatchStatementErrorCodeEnum value) { @@ -12507,7 +12507,7 @@ public static Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride FromDafny_N3 public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IProvisionedThroughputOverride ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ProvisionedThroughputOverride(Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride value) { - long? var_readCapacityUnits = (long?)value.ReadCapacityUnits; + long? var_readCapacityUnits = value.ReadCapacityUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ProvisionedThroughputOverride(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ProvisionedThroughputOverride__M17_ReadCapacityUnits(var_readCapacityUnits)); } public static Amazon.DynamoDBv2.Model.OnDemandThroughputOverride FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_OnDemandThroughputOverride(software.amazon.cryptography.services.dynamodb.internaldafny.types._IOnDemandThroughputOverride value) @@ -12517,7 +12517,7 @@ public static Amazon.DynamoDBv2.Model.OnDemandThroughputOverride FromDafny_N3_co public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IOnDemandThroughputOverride ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_OnDemandThroughputOverride(Amazon.DynamoDBv2.Model.OnDemandThroughputOverride value) { - long? var_maxReadRequestUnits = (long?)value.MaxReadRequestUnits; + long? var_maxReadRequestUnits = value.MaxReadRequestUnits; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.OnDemandThroughputOverride(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S26_OnDemandThroughputOverride__M19_MaxReadRequestUnits(var_maxReadRequestUnits)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S42_ReplicaGlobalSecondaryIndexDescriptionList(Dafny.ISequence value) @@ -12583,9 +12583,9 @@ public static Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo FromDafny_N3_com__ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._ILocalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo(Amazon.DynamoDBv2.Model.LocalSecondaryIndexInfo value) { - string var_indexName = (string)value.IndexName; - System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; + string var_indexName = value.IndexName; + System.Collections.Generic.List var_keySchema = value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.LocalSecondaryIndexInfo(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M10_Projection(var_projection)); } public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo(software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo value) @@ -12599,11 +12599,11 @@ public static Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo FromDafny_N3_com_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IGlobalSecondaryIndexInfo ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo(Amazon.DynamoDBv2.Model.GlobalSecondaryIndexInfo value) { - string var_indexName = (string)value.IndexName; - System.Collections.Generic.List var_keySchema = (System.Collections.Generic.List)value.KeySchema; - Amazon.DynamoDBv2.Model.Projection var_projection = (Amazon.DynamoDBv2.Model.Projection)value.Projection; - Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = (Amazon.DynamoDBv2.Model.ProvisionedThroughput)value.ProvisionedThroughput; - Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = (Amazon.DynamoDBv2.Model.OnDemandThroughput)value.OnDemandThroughput; + string var_indexName = value.IndexName; + System.Collections.Generic.List var_keySchema = value.KeySchema; + Amazon.DynamoDBv2.Model.Projection var_projection = value.Projection; + Amazon.DynamoDBv2.Model.ProvisionedThroughput var_provisionedThroughput = value.ProvisionedThroughput; + Amazon.DynamoDBv2.Model.OnDemandThroughput var_onDemandThroughput = value.OnDemandThroughput; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.GlobalSecondaryIndexInfo(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M9_KeySchema(var_keySchema), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M10_Projection(var_projection), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M21_ProvisionedThroughput(var_provisionedThroughput), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_GlobalSecondaryIndexInfo__M18_OnDemandThroughput(var_onDemandThroughput)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_AutoScalingPolicyDescriptionList(Dafny.ISequence value) @@ -12626,11 +12626,11 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescrip public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsDescription value) { - Amazon.DynamoDBv2.IndexStatus var_indexStatus = (Amazon.DynamoDBv2.IndexStatus)value.IndexStatus; - long? var_provisionedReadCapacityUnits = (long?)value.ProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedReadCapacityAutoScalingSettings; - long? var_provisionedWriteCapacityUnits = (long?)value.ProvisionedWriteCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedWriteCapacityAutoScalingSettings; + Amazon.DynamoDBv2.IndexStatus var_indexStatus = value.IndexStatus; + long? var_provisionedReadCapacityUnits = value.ProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = value.ProvisionedReadCapacityAutoScalingSettings; + long? var_provisionedWriteCapacityUnits = value.ProvisionedWriteCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = value.ProvisionedWriteCapacityAutoScalingSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexSettingsDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M11_IndexStatus(var_indexStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M28_ProvisionedReadCapacityUnits(var_provisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M42_ProvisionedReadCapacityAutoScalingSettings(var_provisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M29_ProvisionedWriteCapacityUnits(var_provisionedWriteCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M43_ProvisionedWriteCapacityAutoScalingSettings(var_provisionedWriteCapacityAutoScalingSettings)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S53_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList(Dafny.ISequence value) @@ -12674,8 +12674,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexSettingsUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexSettingsUpdate value) { - long? var_provisionedReadCapacityUnits = (long?)value.ProvisionedReadCapacityUnits; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingSettingsUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedReadCapacityAutoScalingSettingsUpdate; + long? var_provisionedReadCapacityUnits = value.ProvisionedReadCapacityUnits; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingSettingsUpdate = value.ProvisionedReadCapacityAutoScalingSettingsUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexSettingsUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M28_ProvisionedReadCapacityUnits(var_provisionedReadCapacityUnits), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M48_ProvisionedReadCapacityAutoScalingSettingsUpdate(var_provisionedReadCapacityAutoScalingSettingsUpdate)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ReplicaGlobalSecondaryIndexList(Dafny.ISequence value) @@ -12694,8 +12694,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpda public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingUpdate ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingUpdate value) { - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingUpdate = (Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate)value.ProvisionedReadCapacityAutoScalingUpdate; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.Model.AutoScalingSettingsUpdate var_provisionedReadCapacityAutoScalingUpdate = value.ProvisionedReadCapacityAutoScalingUpdate; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexAutoScalingUpdate(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate__M40_ProvisionedReadCapacityAutoScalingUpdate(var_provisionedReadCapacityAutoScalingUpdate)); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_PutRequest__M4_Item(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) @@ -12704,7 +12704,7 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S10_PutRequest__M4_Item(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S24_PutItemInputAttributeMap(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_DeleteRequest__M3_Key(Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> value) { @@ -12712,7 +12712,7 @@ public static software.amazon.cryptography.services.dynamodb.internaldafny.types } public static Dafny.IMap, software.amazon.cryptography.services.dynamodb.internaldafny.types._IAttributeValue> ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S13_DeleteRequest__M3_Key(System.Collections.Generic.Dictionary value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key((System.Collections.Generic.Dictionary)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S3_Key(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S29_ProvisionedThroughputOverride__M17_ReadCapacityUnits(Wrappers_Compile._IOption value) { @@ -12736,7 +12736,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription Fro } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S42_ReplicaGlobalSecondaryIndexDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttributeNameList__M6_member(Dafny.ISequence value) { @@ -12744,7 +12744,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttr } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_NonKeyAttributeNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_NonKeyAttributeName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_NonKeyAttributeName(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S23_LocalSecondaryIndexInfo__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -12816,7 +12816,7 @@ public static Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription FromDafny_N3_ } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingPolicyDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S32_AutoScalingPolicyDescriptionList__M6_member(Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription((Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M9_IndexName(Dafny.ISequence value) { @@ -12824,7 +12824,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static Amazon.DynamoDBv2.IndexStatus FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S46_ReplicaGlobalSecondaryIndexSettingsDescription__M11_IndexStatus(Wrappers_Compile._IOption value) { @@ -12872,7 +12872,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDesc } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S53_ReplicaGlobalSecondaryIndexAutoScalingDescriptionList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M9_IndexName(Dafny.ISequence value) { @@ -12880,7 +12880,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static long? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S41_ReplicaGlobalSecondaryIndexSettingsUpdate__M28_ProvisionedReadCapacityUnits(Wrappers_Compile._IOption value) { @@ -12904,7 +12904,7 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex FromDafny_N3_c } public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S31_ReplicaGlobalSecondaryIndexList__M6_member(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex((Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex(value); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S44_ReplicaGlobalSecondaryIndexAutoScalingUpdate__M9_IndexName(Wrappers_Compile._IOption> value) { @@ -12931,9 +12931,9 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription Fro public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexDescription value) { - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S19_NonKeyAttributeName(Dafny.ISequence value) @@ -12952,8 +12952,8 @@ public static Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription FromDafny_N3_ public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingPolicyDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription(Amazon.DynamoDBv2.Model.AutoScalingPolicyDescription value) { - string var_policyName = (string)value.PolicyName; - Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription var_targetTrackingScalingPolicyConfiguration = (Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription)value.TargetTrackingScalingPolicyConfiguration; + string var_policyName = value.PolicyName; + Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription var_targetTrackingScalingPolicyConfiguration = value.TargetTrackingScalingPolicyConfiguration; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingPolicyDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription__M10_PolicyName(var_policyName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S28_AutoScalingPolicyDescription__M40_TargetTrackingScalingPolicyConfiguration(var_targetTrackingScalingPolicyConfiguration)); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingDescription value) @@ -12966,10 +12966,10 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDesc public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndexAutoScalingDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndexAutoScalingDescription value) { - string var_indexName = (string)value.IndexName; - Amazon.DynamoDBv2.IndexStatus var_indexStatus = (Amazon.DynamoDBv2.IndexStatus)value.IndexStatus; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedReadCapacityAutoScalingSettings; - Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = (Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription)value.ProvisionedWriteCapacityAutoScalingSettings; + string var_indexName = value.IndexName; + Amazon.DynamoDBv2.IndexStatus var_indexStatus = value.IndexStatus; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedReadCapacityAutoScalingSettings = value.ProvisionedReadCapacityAutoScalingSettings; + Amazon.DynamoDBv2.Model.AutoScalingSettingsDescription var_provisionedWriteCapacityAutoScalingSettings = value.ProvisionedWriteCapacityAutoScalingSettings; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndexAutoScalingDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M9_IndexName(var_indexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M11_IndexStatus(var_indexStatus), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M42_ProvisionedReadCapacityAutoScalingSettings(var_provisionedReadCapacityAutoScalingSettings), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S49_ReplicaGlobalSecondaryIndexAutoScalingDescription__M43_ProvisionedWriteCapacityAutoScalingSettings(var_provisionedWriteCapacityAutoScalingSettings)); } public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex(software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndex value) @@ -12981,8 +12981,8 @@ public static Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex FromDafny_N3_c public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IReplicaGlobalSecondaryIndex ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex(Amazon.DynamoDBv2.Model.ReplicaGlobalSecondaryIndex value) { - Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = (Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride)value.ProvisionedThroughputOverride; - Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = (Amazon.DynamoDBv2.Model.OnDemandThroughputOverride)value.OnDemandThroughputOverride; + Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride var_provisionedThroughputOverride = value.ProvisionedThroughputOverride; + Amazon.DynamoDBv2.Model.OnDemandThroughputOverride var_onDemandThroughputOverride = value.OnDemandThroughputOverride; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.ReplicaGlobalSecondaryIndex(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M9_IndexName(value.IndexName), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M29_ProvisionedThroughputOverride(var_provisionedThroughputOverride), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M26_OnDemandThroughputOverride(var_onDemandThroughputOverride)); } public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S38_ReplicaGlobalSecondaryIndexDescription__M9_IndexName(Wrappers_Compile._IOption> value) @@ -13063,7 +13063,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M9_IndexName(string value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName((string)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S9_IndexName(value); } public static Amazon.DynamoDBv2.Model.ProvisionedThroughputOverride FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S27_ReplicaGlobalSecondaryIndex__M29_ProvisionedThroughputOverride(Wrappers_Compile._IOption value) { @@ -13091,9 +13091,9 @@ public static Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConf public static software.amazon.cryptography.services.dynamodb.internaldafny.types._IAutoScalingTargetTrackingScalingPolicyConfigurationDescription ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription(Amazon.DynamoDBv2.Model.AutoScalingTargetTrackingScalingPolicyConfigurationDescription value) { - bool? var_disableScaleIn = (bool?)value.DisableScaleIn; - int? var_scaleInCooldown = (int?)value.ScaleInCooldown; - int? var_scaleOutCooldown = (int?)value.ScaleOutCooldown; + bool? var_disableScaleIn = value.DisableScaleIn; + int? var_scaleInCooldown = value.ScaleInCooldown; + int? var_scaleOutCooldown = value.ScaleOutCooldown; return new software.amazon.cryptography.services.dynamodb.internaldafny.types.AutoScalingTargetTrackingScalingPolicyConfigurationDescription(ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M14_DisableScaleIn(var_disableScaleIn), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M15_ScaleInCooldown(var_scaleInCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M16_ScaleOutCooldown(var_scaleOutCooldown), ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M11_TargetValue((int)value.TargetValue)); } public static bool? FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M14_DisableScaleIn(Wrappers_Compile._IOption value) @@ -13126,7 +13126,7 @@ public static double FromDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalin } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S62_AutoScalingTargetTrackingScalingPolicyConfigurationDescription__M11_TargetValue(double value) { - return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject((double)value); + return ToDafny_N3_com__N9_amazonaws__N8_dynamodb__S12_DoubleObject(value); } public static string FromDafny_N6_smithy__N3_api__S6_String(Dafny.ISequence value) { diff --git a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs index 9369407305..0752a1dbbc 100644 --- a/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs +++ b/ComAmazonawsKms/runtimes/net/Generated/TypeConversion.cs @@ -39,7 +39,7 @@ public static Amazon.KeyManagementService.Model.AlreadyExistsException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_AlreadyExistsException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_AlreadyExistsException(Amazon.KeyManagementService.Model.AlreadyExistsException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_AlreadyExistsException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_AlreadyExistsException__M7_message(var_message) ); @@ -61,7 +61,7 @@ public static Amazon.KeyManagementService.Model.CancelKeyDeletionResponse FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._ICancelKeyDeletionResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S25_CancelKeyDeletionResponse(Amazon.KeyManagementService.Model.CancelKeyDeletionResponse value) { - string var_keyId = (string)value.KeyId; + string var_keyId = value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.CancelKeyDeletionResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_CancelKeyDeletionResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.Model.CloudHsmClusterInUseException FromDafny_N3_com__N9_amazonaws__N3_kms__S29_CloudHsmClusterInUseException(software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInUseException value) @@ -72,7 +72,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterInUseException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_CloudHsmClusterInUseException(Amazon.KeyManagementService.Model.CloudHsmClusterInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_CloudHsmClusterInUseException__M7_message(var_message) ); @@ -85,7 +85,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterInvalidConfigurat } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S44_CloudHsmClusterInvalidConfigurationException(Amazon.KeyManagementService.Model.CloudHsmClusterInvalidConfigurationException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S44_CloudHsmClusterInvalidConfigurationException__M7_message(var_message) ); @@ -98,7 +98,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterNotActiveExceptio } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotActiveException ToDafny_N3_com__N9_amazonaws__N3_kms__S33_CloudHsmClusterNotActiveException(Amazon.KeyManagementService.Model.CloudHsmClusterNotActiveException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotActiveException( ToDafny_N3_com__N9_amazonaws__N3_kms__S33_CloudHsmClusterNotActiveException__M7_message(var_message) ); @@ -111,7 +111,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterNotFoundException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CloudHsmClusterNotFoundException(Amazon.KeyManagementService.Model.CloudHsmClusterNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CloudHsmClusterNotFoundException__M7_message(var_message) ); @@ -124,7 +124,7 @@ public static Amazon.KeyManagementService.Model.CloudHsmClusterNotRelatedExcepti } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotRelatedException ToDafny_N3_com__N9_amazonaws__N3_kms__S34_CloudHsmClusterNotRelatedException(Amazon.KeyManagementService.Model.CloudHsmClusterNotRelatedException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CloudHsmClusterNotRelatedException( ToDafny_N3_com__N9_amazonaws__N3_kms__S34_CloudHsmClusterNotRelatedException__M7_message(var_message) ); @@ -137,7 +137,7 @@ public static Amazon.KeyManagementService.Model.ConflictException FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_ConflictException ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ConflictException(Amazon.KeyManagementService.Model.ConflictException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_ConflictException( ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ConflictException__M7_message(var_message) ); @@ -251,15 +251,15 @@ public static Amazon.KeyManagementService.Model.CreateCustomKeyStoreRequest From public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateCustomKeyStoreRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest(Amazon.KeyManagementService.Model.CreateCustomKeyStoreRequest value) { - string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; - string var_trustAnchorCertificate = (string)value.TrustAnchorCertificate; - string var_keyStorePassword = (string)value.KeyStorePassword; - Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = (Amazon.KeyManagementService.CustomKeyStoreType)value.CustomKeyStoreType; - string var_xksProxyUriEndpoint = (string)value.XksProxyUriEndpoint; - string var_xksProxyUriPath = (string)value.XksProxyUriPath; - string var_xksProxyVpcEndpointServiceName = (string)value.XksProxyVpcEndpointServiceName; - Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = (Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType)value.XksProxyAuthenticationCredential; - Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = (Amazon.KeyManagementService.XksProxyConnectivityType)value.XksProxyConnectivity; + string var_cloudHsmClusterId = value.CloudHsmClusterId; + string var_trustAnchorCertificate = value.TrustAnchorCertificate; + string var_keyStorePassword = value.KeyStorePassword; + Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = value.CustomKeyStoreType; + string var_xksProxyUriEndpoint = value.XksProxyUriEndpoint; + string var_xksProxyUriPath = value.XksProxyUriPath; + string var_xksProxyVpcEndpointServiceName = value.XksProxyVpcEndpointServiceName; + Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = value.XksProxyAuthenticationCredential; + Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = value.XksProxyConnectivity; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateCustomKeyStoreRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreName(value.CustomKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M22_TrustAnchorCertificate(var_trustAnchorCertificate), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M16_KeyStorePassword(var_keyStorePassword), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreType(var_customKeyStoreType), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M19_XksProxyUriEndpoint(var_xksProxyUriEndpoint), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M15_XksProxyUriPath(var_xksProxyUriPath), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M30_XksProxyVpcEndpointServiceName(var_xksProxyVpcEndpointServiceName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M32_XksProxyAuthenticationCredential(var_xksProxyAuthenticationCredential), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M20_XksProxyConnectivity(var_xksProxyConnectivity)); } public static Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S28_CreateCustomKeyStoreResponse(software.amazon.cryptography.services.kms.internaldafny.types._ICreateCustomKeyStoreResponse value) @@ -269,7 +269,7 @@ public static Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse Fro public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateCustomKeyStoreResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S28_CreateCustomKeyStoreResponse(Amazon.KeyManagementService.Model.CreateCustomKeyStoreResponse value) { - string var_customKeyStoreId = (string)value.CustomKeyStoreId; + string var_customKeyStoreId = value.CustomKeyStoreId; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateCustomKeyStoreResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S28_CreateCustomKeyStoreResponse__M16_CustomKeyStoreId(var_customKeyStoreId)); } public static Amazon.KeyManagementService.Model.CreateGrantRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest(software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantRequest value) @@ -286,11 +286,11 @@ public static Amazon.KeyManagementService.Model.CreateGrantRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest(Amazon.KeyManagementService.Model.CreateGrantRequest value) { - string var_retiringPrincipal = (string)value.RetiringPrincipal; - Amazon.KeyManagementService.Model.GrantConstraints var_constraints = (Amazon.KeyManagementService.Model.GrantConstraints)value.Constraints; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - string var_name = (string)value.Name; - bool? var_dryRun = (bool?)value.DryRun; + string var_retiringPrincipal = value.RetiringPrincipal; + Amazon.KeyManagementService.Model.GrantConstraints var_constraints = value.Constraints; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + string var_name = value.Name; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateGrantRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M16_GranteePrincipal(value.GranteePrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M17_RetiringPrincipal(var_retiringPrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M10_Operations(value.Operations), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M11_Constraints(var_constraints), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M4_Name(var_name), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.CreateGrantResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse(software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantResponse value) @@ -301,8 +301,8 @@ public static Amazon.KeyManagementService.Model.CreateGrantResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateGrantResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse(Amazon.KeyManagementService.Model.CreateGrantResponse value) { - string var_grantToken = (string)value.GrantToken; - string var_grantId = (string)value.GrantId; + string var_grantToken = value.GrantToken; + string var_grantId = value.GrantId; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateGrantResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse__M10_GrantToken(var_grantToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CreateGrantResponse__M7_GrantId(var_grantId)); } public static Amazon.KeyManagementService.Model.CreateKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyRequest value) @@ -322,17 +322,17 @@ public static Amazon.KeyManagementService.Model.CreateKeyRequest FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest(Amazon.KeyManagementService.Model.CreateKeyRequest value) { - string var_policy = (string)value.Policy; - string var_description = (string)value.Description; - Amazon.KeyManagementService.KeyUsageType var_keyUsage = (Amazon.KeyManagementService.KeyUsageType)value.KeyUsage; - Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = (Amazon.KeyManagementService.CustomerMasterKeySpec)value.CustomerMasterKeySpec; - Amazon.KeyManagementService.KeySpec var_keySpec = (Amazon.KeyManagementService.KeySpec)value.KeySpec; - Amazon.KeyManagementService.OriginType var_origin = (Amazon.KeyManagementService.OriginType)value.Origin; - string var_customKeyStoreId = (string)value.CustomKeyStoreId; - bool? var_bypassPolicyLockoutSafetyCheck = (bool?)value.BypassPolicyLockoutSafetyCheck; - System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; - bool? var_multiRegion = (bool?)value.MultiRegion; - string var_xksKeyId = (string)value.XksKeyId; + string var_policy = value.Policy; + string var_description = value.Description; + Amazon.KeyManagementService.KeyUsageType var_keyUsage = value.KeyUsage; + Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = value.CustomerMasterKeySpec; + Amazon.KeyManagementService.KeySpec var_keySpec = value.KeySpec; + Amazon.KeyManagementService.OriginType var_origin = value.Origin; + string var_customKeyStoreId = value.CustomKeyStoreId; + bool? var_bypassPolicyLockoutSafetyCheck = value.BypassPolicyLockoutSafetyCheck; + System.Collections.Generic.List var_tags = value.Tags; + bool? var_multiRegion = value.MultiRegion; + string var_xksKeyId = value.XksKeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M11_Description(var_description), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M8_KeyUsage(var_keyUsage), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M21_CustomerMasterKeySpec(var_customerMasterKeySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M6_Origin(var_origin), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M30_BypassPolicyLockoutSafetyCheck(var_bypassPolicyLockoutSafetyCheck), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M11_MultiRegion(var_multiRegion), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_CreateKeyRequest__M8_XksKeyId(var_xksKeyId)); } public static Amazon.KeyManagementService.Model.CreateKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S17_CreateKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyResponse value) @@ -342,7 +342,7 @@ public static Amazon.KeyManagementService.Model.CreateKeyResponse FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._ICreateKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S17_CreateKeyResponse(Amazon.KeyManagementService.Model.CreateKeyResponse value) { - Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = (Amazon.KeyManagementService.Model.KeyMetadata)value.KeyMetadata; + Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = value.KeyMetadata; return new software.amazon.cryptography.services.kms.internaldafny.types.CreateKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_CreateKeyResponse__M11_KeyMetadata(var_keyMetadata)); } public static Amazon.KeyManagementService.CustomerMasterKeySpec FromDafny_N3_com__N9_amazonaws__N3_kms__S21_CustomerMasterKeySpec(software.amazon.cryptography.services.kms.internaldafny.types._ICustomerMasterKeySpec value) @@ -387,7 +387,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreHasCMKsException F } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreHasCMKsException ToDafny_N3_com__N9_amazonaws__N3_kms__S30_CustomKeyStoreHasCMKsException(Amazon.KeyManagementService.Model.CustomKeyStoreHasCMKsException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreHasCMKsException( ToDafny_N3_com__N9_amazonaws__N3_kms__S30_CustomKeyStoreHasCMKsException__M7_message(var_message) ); @@ -400,7 +400,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreInvalidStateExcept } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreInvalidStateException ToDafny_N3_com__N9_amazonaws__N3_kms__S35_CustomKeyStoreInvalidStateException(Amazon.KeyManagementService.Model.CustomKeyStoreInvalidStateException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreInvalidStateException( ToDafny_N3_com__N9_amazonaws__N3_kms__S35_CustomKeyStoreInvalidStateException__M7_message(var_message) ); @@ -413,7 +413,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreNameInUseException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNameInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CustomKeyStoreNameInUseException(Amazon.KeyManagementService.Model.CustomKeyStoreNameInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNameInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_CustomKeyStoreNameInUseException__M7_message(var_message) ); @@ -426,7 +426,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoreNotFoundException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S31_CustomKeyStoreNotFoundException(Amazon.KeyManagementService.Model.CustomKeyStoreNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_CustomKeyStoreNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S31_CustomKeyStoreNotFoundException__M7_message(var_message) ); @@ -492,12 +492,12 @@ public static Amazon.KeyManagementService.Model.DecryptRequest FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IDecryptRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest(Amazon.KeyManagementService.Model.DecryptRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - string var_keyId = (string)value.KeyId; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + string var_keyId = value.KeyId; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.DecryptRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M14_CiphertextBlob(value.CiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M19_EncryptionAlgorithm(var_encryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M9_Recipient(var_recipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.DecryptResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDecryptResponse value) @@ -510,10 +510,10 @@ public static Amazon.KeyManagementService.Model.DecryptResponse FromDafny_N3_com public static software.amazon.cryptography.services.kms.internaldafny.types._IDecryptResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse(Amazon.KeyManagementService.Model.DecryptResponse value) { - string var_keyId = (string)value.KeyId; - System.IO.MemoryStream var_plaintext = (System.IO.MemoryStream)value.Plaintext; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; - System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; + string var_keyId = value.KeyId; + System.IO.MemoryStream var_plaintext = value.Plaintext; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; + System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.DecryptResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M9_Plaintext(var_plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M19_EncryptionAlgorithm(var_encryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DecryptResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.DeleteAliasRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DeleteAliasRequest(software.amazon.cryptography.services.kms.internaldafny.types._IDeleteAliasRequest value) @@ -564,7 +564,7 @@ public static Amazon.KeyManagementService.Model.DependencyTimeoutException FromD } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_DependencyTimeoutException ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DependencyTimeoutException(Amazon.KeyManagementService.Model.DependencyTimeoutException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_DependencyTimeoutException( ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DependencyTimeoutException__M7_message(var_message) ); @@ -581,9 +581,9 @@ public static Amazon.KeyManagementService.Model.DeriveSharedSecretRequest FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._IDeriveSharedSecretRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest(Amazon.KeyManagementService.Model.DeriveSharedSecretRequest value) { - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; return new software.amazon.cryptography.services.kms.internaldafny.types.DeriveSharedSecretRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M21_KeyAgreementAlgorithm(value.KeyAgreementAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_PublicKey(value.PublicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M6_DryRun(var_dryRun), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_Recipient(var_recipient)); } public static Amazon.KeyManagementService.Model.DeriveSharedSecretResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDeriveSharedSecretResponse value) @@ -597,11 +597,11 @@ public static Amazon.KeyManagementService.Model.DeriveSharedSecretResponse FromD public static software.amazon.cryptography.services.kms.internaldafny.types._IDeriveSharedSecretResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse(Amazon.KeyManagementService.Model.DeriveSharedSecretResponse value) { - string var_keyId = (string)value.KeyId; - System.IO.MemoryStream var_sharedSecret = (System.IO.MemoryStream)value.SharedSecret; - System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; - Amazon.KeyManagementService.KeyAgreementAlgorithmSpec var_keyAgreementAlgorithm = (Amazon.KeyManagementService.KeyAgreementAlgorithmSpec)value.KeyAgreementAlgorithm; - Amazon.KeyManagementService.OriginType var_keyOrigin = (Amazon.KeyManagementService.OriginType)value.KeyOrigin; + string var_keyId = value.KeyId; + System.IO.MemoryStream var_sharedSecret = value.SharedSecret; + System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; + Amazon.KeyManagementService.KeyAgreementAlgorithmSpec var_keyAgreementAlgorithm = value.KeyAgreementAlgorithm; + Amazon.KeyManagementService.OriginType var_keyOrigin = value.KeyOrigin; return new software.amazon.cryptography.services.kms.internaldafny.types.DeriveSharedSecretResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M12_SharedSecret(var_sharedSecret), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M21_KeyAgreementAlgorithm(var_keyAgreementAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_DeriveSharedSecretResponse__M9_KeyOrigin(var_keyOrigin)); } public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresRequest value) @@ -614,10 +614,10 @@ public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresRequest F public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest(Amazon.KeyManagementService.Model.DescribeCustomKeyStoresRequest value) { - string var_customKeyStoreId = (string)value.CustomKeyStoreId; - string var_customKeyStoreName = (string)value.CustomKeyStoreName; - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; + string var_customKeyStoreId = value.CustomKeyStoreId; + string var_customKeyStoreName = value.CustomKeyStoreName; + int? var_limit = value.Limit; + string var_marker = value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeCustomKeyStoresRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M18_CustomKeyStoreName(var_customKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_DescribeCustomKeyStoresRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresResponse value) @@ -629,9 +629,9 @@ public static Amazon.KeyManagementService.Model.DescribeCustomKeyStoresResponse public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeCustomKeyStoresResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse(Amazon.KeyManagementService.Model.DescribeCustomKeyStoresResponse value) { - System.Collections.Generic.List var_customKeyStores = (System.Collections.Generic.List)value.CustomKeyStores; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_customKeyStores = value.CustomKeyStores; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeCustomKeyStoresResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse__M15_CustomKeyStores(var_customKeyStores), ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DescribeCustomKeyStoresResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.DescribeKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyRequest value) @@ -642,7 +642,7 @@ public static Amazon.KeyManagementService.Model.DescribeKeyRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest(Amazon.KeyManagementService.Model.DescribeKeyRequest value) { - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M11_GrantTokens(var_grantTokens)); } public static Amazon.KeyManagementService.Model.DescribeKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_DescribeKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyResponse value) @@ -652,7 +652,7 @@ public static Amazon.KeyManagementService.Model.DescribeKeyResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IDescribeKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_DescribeKeyResponse(Amazon.KeyManagementService.Model.DescribeKeyResponse value) { - Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = (Amazon.KeyManagementService.Model.KeyMetadata)value.KeyMetadata; + Amazon.KeyManagementService.Model.KeyMetadata var_keyMetadata = value.KeyMetadata; return new software.amazon.cryptography.services.kms.internaldafny.types.DescribeKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_DescribeKeyResponse__M11_KeyMetadata(var_keyMetadata)); } public static Amazon.KeyManagementService.Model.DisabledException FromDafny_N3_com__N9_amazonaws__N3_kms__S17_DisabledException(software.amazon.cryptography.services.kms.internaldafny.types.Error_DisabledException value) @@ -663,7 +663,7 @@ public static Amazon.KeyManagementService.Model.DisabledException FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_DisabledException ToDafny_N3_com__N9_amazonaws__N3_kms__S17_DisabledException(Amazon.KeyManagementService.Model.DisabledException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_DisabledException( ToDafny_N3_com__N9_amazonaws__N3_kms__S17_DisabledException__M7_message(var_message) ); @@ -716,7 +716,7 @@ public static Amazon.KeyManagementService.Model.DryRunOperationException FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_DryRunOperationException ToDafny_N3_com__N9_amazonaws__N3_kms__S24_DryRunOperationException(Amazon.KeyManagementService.Model.DryRunOperationException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_DryRunOperationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S24_DryRunOperationException__M7_message(var_message) ); @@ -739,7 +739,7 @@ public static Amazon.KeyManagementService.Model.EnableKeyRotationRequest FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IEnableKeyRotationRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest(Amazon.KeyManagementService.Model.EnableKeyRotationRequest value) { - int? var_rotationPeriodInDays = (int?)value.RotationPeriodInDays; + int? var_rotationPeriodInDays = value.RotationPeriodInDays; return new software.amazon.cryptography.services.kms.internaldafny.types.EnableKeyRotationRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M20_RotationPeriodInDays(var_rotationPeriodInDays)); } public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec value) @@ -768,10 +768,10 @@ public static Amazon.KeyManagementService.Model.EncryptRequest FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest(Amazon.KeyManagementService.Model.EncryptRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.EncryptRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M9_Plaintext(value.Plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M19_EncryptionAlgorithm(var_encryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.EncryptResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptResponse value) @@ -783,9 +783,9 @@ public static Amazon.KeyManagementService.Model.EncryptResponse FromDafny_N3_com public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse(Amazon.KeyManagementService.Model.EncryptResponse value) { - System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; - string var_keyId = (string)value.KeyId; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.EncryptionAlgorithm; + System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; + string var_keyId = value.KeyId; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_encryptionAlgorithm = value.EncryptionAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.EncryptResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_EncryptResponse__M19_EncryptionAlgorithm(var_encryptionAlgorithm)); } public static Amazon.KeyManagementService.ExpirationModelType FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ExpirationModelType(software.amazon.cryptography.services.kms.internaldafny.types._IExpirationModelType value) @@ -808,7 +808,7 @@ public static Amazon.KeyManagementService.Model.ExpiredImportTokenException From } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_ExpiredImportTokenException ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ExpiredImportTokenException(Amazon.KeyManagementService.Model.ExpiredImportTokenException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_ExpiredImportTokenException( ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ExpiredImportTokenException__M7_message(var_message) ); @@ -825,10 +825,10 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairRequest FromD public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest(Amazon.KeyManagementService.Model.GenerateDataKeyPairRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_KeyPairSpec(value.KeyPairSpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M9_Recipient(var_recipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyPairResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairResponse value) @@ -843,12 +843,12 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairResponse From public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse(Amazon.KeyManagementService.Model.GenerateDataKeyPairResponse value) { - System.IO.MemoryStream var_privateKeyCiphertextBlob = (System.IO.MemoryStream)value.PrivateKeyCiphertextBlob; - System.IO.MemoryStream var_privateKeyPlaintext = (System.IO.MemoryStream)value.PrivateKeyPlaintext; - System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; - string var_keyId = (string)value.KeyId; - Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = (Amazon.KeyManagementService.DataKeyPairSpec)value.KeyPairSpec; - System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; + System.IO.MemoryStream var_privateKeyCiphertextBlob = value.PrivateKeyCiphertextBlob; + System.IO.MemoryStream var_privateKeyPlaintext = value.PrivateKeyPlaintext; + System.IO.MemoryStream var_publicKey = value.PublicKey; + string var_keyId = value.KeyId; + Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = value.KeyPairSpec; + System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M24_PrivateKeyCiphertextBlob(var_privateKeyCiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M19_PrivateKeyPlaintext(var_privateKeyPlaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M11_KeyPairSpec(var_keyPairSpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GenerateDataKeyPairResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextRequest value) @@ -862,9 +862,9 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaint public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest(Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairWithoutPlaintextRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_KeyPairSpec(value.KeyPairSpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextResponse value) @@ -877,10 +877,10 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaint public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyPairWithoutPlaintextResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse(Amazon.KeyManagementService.Model.GenerateDataKeyPairWithoutPlaintextResponse value) { - System.IO.MemoryStream var_privateKeyCiphertextBlob = (System.IO.MemoryStream)value.PrivateKeyCiphertextBlob; - System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; - string var_keyId = (string)value.KeyId; - Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = (Amazon.KeyManagementService.DataKeyPairSpec)value.KeyPairSpec; + System.IO.MemoryStream var_privateKeyCiphertextBlob = value.PrivateKeyCiphertextBlob; + System.IO.MemoryStream var_publicKey = value.PublicKey; + string var_keyId = value.KeyId; + Amazon.KeyManagementService.DataKeyPairSpec var_keyPairSpec = value.KeyPairSpec; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyPairWithoutPlaintextResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M24_PrivateKeyCiphertextBlob(var_privateKeyCiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S43_GenerateDataKeyPairWithoutPlaintextResponse__M11_KeyPairSpec(var_keyPairSpec)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyRequest value) @@ -896,12 +896,12 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyRequest FromDafny public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest(Amazon.KeyManagementService.Model.GenerateDataKeyRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; - int? var_numberOfBytes = (int?)value.NumberOfBytes; - Amazon.KeyManagementService.DataKeySpec var_keySpec = (Amazon.KeyManagementService.DataKeySpec)value.KeySpec; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; + int? var_numberOfBytes = value.NumberOfBytes; + Amazon.KeyManagementService.DataKeySpec var_keySpec = value.KeySpec; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M13_NumberOfBytes(var_numberOfBytes), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M9_Recipient(var_recipient), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyResponse value) @@ -914,10 +914,10 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyResponse FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse(Amazon.KeyManagementService.Model.GenerateDataKeyResponse value) { - System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; - System.IO.MemoryStream var_plaintext = (System.IO.MemoryStream)value.Plaintext; - string var_keyId = (string)value.KeyId; - System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; + System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; + System.IO.MemoryStream var_plaintext = value.Plaintext; + string var_keyId = value.KeyId; + System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M9_Plaintext(var_plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_GenerateDataKeyResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextRequest value) @@ -932,11 +932,11 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextR public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest(Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextRequest value) { - System.Collections.Generic.Dictionary var_encryptionContext = (System.Collections.Generic.Dictionary)value.EncryptionContext; - Amazon.KeyManagementService.DataKeySpec var_keySpec = (Amazon.KeyManagementService.DataKeySpec)value.KeySpec; - int? var_numberOfBytes = (int?)value.NumberOfBytes; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_encryptionContext = value.EncryptionContext; + Amazon.KeyManagementService.DataKeySpec var_keySpec = value.KeySpec; + int? var_numberOfBytes = value.NumberOfBytes; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyWithoutPlaintextRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M17_EncryptionContext(var_encryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M13_NumberOfBytes(var_numberOfBytes), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextResponse value) @@ -947,8 +947,8 @@ public static Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextR public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateDataKeyWithoutPlaintextResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse(Amazon.KeyManagementService.Model.GenerateDataKeyWithoutPlaintextResponse value) { - System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; - string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; + string var_keyId = value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateDataKeyWithoutPlaintextResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S39_GenerateDataKeyWithoutPlaintextResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.Model.GenerateMacRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacRequest value) @@ -962,8 +962,8 @@ public static Amazon.KeyManagementService.Model.GenerateMacRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest(Amazon.KeyManagementService.Model.GenerateMacRequest value) { - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateMacRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M12_MacAlgorithm(value.MacAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.GenerateMacResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacResponse value) @@ -975,9 +975,9 @@ public static Amazon.KeyManagementService.Model.GenerateMacResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateMacResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse(Amazon.KeyManagementService.Model.GenerateMacResponse value) { - System.IO.MemoryStream var_mac = (System.IO.MemoryStream)value.Mac; - Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = (Amazon.KeyManagementService.MacAlgorithmSpec)value.MacAlgorithm; - string var_keyId = (string)value.KeyId; + System.IO.MemoryStream var_mac = value.Mac; + Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = value.MacAlgorithm; + string var_keyId = value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateMacResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse__M3_Mac(var_mac), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse__M12_MacAlgorithm(var_macAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GenerateMacResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.Model.GenerateRandomRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomRequest value) @@ -989,9 +989,9 @@ public static Amazon.KeyManagementService.Model.GenerateRandomRequest FromDafny_ public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest(Amazon.KeyManagementService.Model.GenerateRandomRequest value) { - int? var_numberOfBytes = (int?)value.NumberOfBytes; - string var_customKeyStoreId = (string)value.CustomKeyStoreId; - Amazon.KeyManagementService.Model.RecipientInfo var_recipient = (Amazon.KeyManagementService.Model.RecipientInfo)value.Recipient; + int? var_numberOfBytes = value.NumberOfBytes; + string var_customKeyStoreId = value.CustomKeyStoreId; + Amazon.KeyManagementService.Model.RecipientInfo var_recipient = value.Recipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateRandomRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest__M13_NumberOfBytes(var_numberOfBytes), ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S21_GenerateRandomRequest__M9_Recipient(var_recipient)); } public static Amazon.KeyManagementService.Model.GenerateRandomResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomResponse value) @@ -1002,8 +1002,8 @@ public static Amazon.KeyManagementService.Model.GenerateRandomResponse FromDafny public static software.amazon.cryptography.services.kms.internaldafny.types._IGenerateRandomResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse(Amazon.KeyManagementService.Model.GenerateRandomResponse value) { - System.IO.MemoryStream var_plaintext = (System.IO.MemoryStream)value.Plaintext; - System.IO.MemoryStream var_ciphertextForRecipient = (System.IO.MemoryStream)value.CiphertextForRecipient; + System.IO.MemoryStream var_plaintext = value.Plaintext; + System.IO.MemoryStream var_ciphertextForRecipient = value.CiphertextForRecipient; return new software.amazon.cryptography.services.kms.internaldafny.types.GenerateRandomResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse__M9_Plaintext(var_plaintext), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateRandomResponse__M22_CiphertextForRecipient(var_ciphertextForRecipient)); } public static Amazon.KeyManagementService.Model.GetKeyPolicyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyRequest value) @@ -1014,7 +1014,7 @@ public static Amazon.KeyManagementService.Model.GetKeyPolicyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest(Amazon.KeyManagementService.Model.GetKeyPolicyRequest value) { - string var_policyName = (string)value.PolicyName; + string var_policyName = value.PolicyName; return new software.amazon.cryptography.services.kms.internaldafny.types.GetKeyPolicyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M10_PolicyName(var_policyName)); } public static Amazon.KeyManagementService.Model.GetKeyPolicyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyResponse value) @@ -1025,8 +1025,8 @@ public static Amazon.KeyManagementService.Model.GetKeyPolicyResponse FromDafny_N public static software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyPolicyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse(Amazon.KeyManagementService.Model.GetKeyPolicyResponse value) { - string var_policy = (string)value.Policy; - string var_policyName = (string)value.PolicyName; + string var_policy = value.Policy; + string var_policyName = value.PolicyName; return new software.amazon.cryptography.services.kms.internaldafny.types.GetKeyPolicyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetKeyPolicyResponse__M10_PolicyName(var_policyName)); } public static Amazon.KeyManagementService.Model.GetKeyRotationStatusRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S27_GetKeyRotationStatusRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyRotationStatusRequest value) @@ -1050,11 +1050,11 @@ public static Amazon.KeyManagementService.Model.GetKeyRotationStatusResponse Fro public static software.amazon.cryptography.services.kms.internaldafny.types._IGetKeyRotationStatusResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse(Amazon.KeyManagementService.Model.GetKeyRotationStatusResponse value) { - bool? var_keyRotationEnabled = (bool?)value.KeyRotationEnabled; - string var_keyId = (string)value.KeyId; - int? var_rotationPeriodInDays = (int?)value.RotationPeriodInDays; - System.DateTime? var_nextRotationDate = (System.DateTime?)value.NextRotationDate; - System.DateTime? var_onDemandRotationStartDate = (System.DateTime?)value.OnDemandRotationStartDate; + bool? var_keyRotationEnabled = value.KeyRotationEnabled; + string var_keyId = value.KeyId; + int? var_rotationPeriodInDays = value.RotationPeriodInDays; + System.DateTime? var_nextRotationDate = value.NextRotationDate; + System.DateTime? var_onDemandRotationStartDate = value.OnDemandRotationStartDate; return new software.amazon.cryptography.services.kms.internaldafny.types.GetKeyRotationStatusResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M18_KeyRotationEnabled(var_keyRotationEnabled), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M20_RotationPeriodInDays(var_rotationPeriodInDays), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M16_NextRotationDate(var_nextRotationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M25_OnDemandRotationStartDate(var_onDemandRotationStartDate)); } public static Amazon.KeyManagementService.Model.GetParametersForImportRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetParametersForImportRequest value) @@ -1079,10 +1079,10 @@ public static Amazon.KeyManagementService.Model.GetParametersForImportResponse F public static software.amazon.cryptography.services.kms.internaldafny.types._IGetParametersForImportResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse(Amazon.KeyManagementService.Model.GetParametersForImportResponse value) { - string var_keyId = (string)value.KeyId; - System.IO.MemoryStream var_importToken = (System.IO.MemoryStream)value.ImportToken; - System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; - System.DateTime? var_parametersValidTo = (System.DateTime?)value.ParametersValidTo; + string var_keyId = value.KeyId; + System.IO.MemoryStream var_importToken = value.ImportToken; + System.IO.MemoryStream var_publicKey = value.PublicKey; + System.DateTime? var_parametersValidTo = value.ParametersValidTo; return new software.amazon.cryptography.services.kms.internaldafny.types.GetParametersForImportResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M11_ImportToken(var_importToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M17_ParametersValidTo(var_parametersValidTo)); } public static Amazon.KeyManagementService.Model.GetPublicKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyRequest value) @@ -1093,7 +1093,7 @@ public static Amazon.KeyManagementService.Model.GetPublicKeyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest(Amazon.KeyManagementService.Model.GetPublicKeyRequest value) { - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; return new software.amazon.cryptography.services.kms.internaldafny.types.GetPublicKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M11_GrantTokens(var_grantTokens)); } public static Amazon.KeyManagementService.Model.GetPublicKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyResponse value) @@ -1110,14 +1110,14 @@ public static Amazon.KeyManagementService.Model.GetPublicKeyResponse FromDafny_N public static software.amazon.cryptography.services.kms.internaldafny.types._IGetPublicKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse(Amazon.KeyManagementService.Model.GetPublicKeyResponse value) { - string var_keyId = (string)value.KeyId; - System.IO.MemoryStream var_publicKey = (System.IO.MemoryStream)value.PublicKey; - Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = (Amazon.KeyManagementService.CustomerMasterKeySpec)value.CustomerMasterKeySpec; - Amazon.KeyManagementService.KeySpec var_keySpec = (Amazon.KeyManagementService.KeySpec)value.KeySpec; - Amazon.KeyManagementService.KeyUsageType var_keyUsage = (Amazon.KeyManagementService.KeyUsageType)value.KeyUsage; - System.Collections.Generic.List var_encryptionAlgorithms = (System.Collections.Generic.List)value.EncryptionAlgorithms; - System.Collections.Generic.List var_signingAlgorithms = (System.Collections.Generic.List)value.SigningAlgorithms; - System.Collections.Generic.List var_keyAgreementAlgorithms = (System.Collections.Generic.List)value.KeyAgreementAlgorithms; + string var_keyId = value.KeyId; + System.IO.MemoryStream var_publicKey = value.PublicKey; + Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = value.CustomerMasterKeySpec; + Amazon.KeyManagementService.KeySpec var_keySpec = value.KeySpec; + Amazon.KeyManagementService.KeyUsageType var_keyUsage = value.KeyUsage; + System.Collections.Generic.List var_encryptionAlgorithms = value.EncryptionAlgorithms; + System.Collections.Generic.List var_signingAlgorithms = value.SigningAlgorithms; + System.Collections.Generic.List var_keyAgreementAlgorithms = value.KeyAgreementAlgorithms; return new software.amazon.cryptography.services.kms.internaldafny.types.GetPublicKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M9_PublicKey(var_publicKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M21_CustomerMasterKeySpec(var_customerMasterKeySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M8_KeyUsage(var_keyUsage), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M20_EncryptionAlgorithms(var_encryptionAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M17_SigningAlgorithms(var_signingAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_GetPublicKeyResponse__M22_KeyAgreementAlgorithms(var_keyAgreementAlgorithms)); } public static Amazon.KeyManagementService.GrantOperation FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantOperation(software.amazon.cryptography.services.kms.internaldafny.types._IGrantOperation value) @@ -1173,8 +1173,8 @@ public static Amazon.KeyManagementService.Model.ImportKeyMaterialRequest FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IImportKeyMaterialRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest(Amazon.KeyManagementService.Model.ImportKeyMaterialRequest value) { - System.DateTime? var_validTo = (System.DateTime?)value.ValidTo; - Amazon.KeyManagementService.ExpirationModelType var_expirationModel = (Amazon.KeyManagementService.ExpirationModelType)value.ExpirationModel; + System.DateTime? var_validTo = value.ValidTo; + Amazon.KeyManagementService.ExpirationModelType var_expirationModel = value.ExpirationModel; return new software.amazon.cryptography.services.kms.internaldafny.types.ImportKeyMaterialRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M11_ImportToken(value.ImportToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M20_EncryptedKeyMaterial(value.EncryptedKeyMaterial), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M7_ValidTo(var_validTo), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M15_ExpirationModel(var_expirationModel)); } public static Amazon.KeyManagementService.Model.ImportKeyMaterialResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S25_ImportKeyMaterialResponse(software.amazon.cryptography.services.kms.internaldafny.types._IImportKeyMaterialResponse value) @@ -1195,7 +1195,7 @@ public static Amazon.KeyManagementService.Model.IncorrectKeyException FromDafny_ } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyException ToDafny_N3_com__N9_amazonaws__N3_kms__S21_IncorrectKeyException(Amazon.KeyManagementService.Model.IncorrectKeyException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyException( ToDafny_N3_com__N9_amazonaws__N3_kms__S21_IncorrectKeyException__M7_message(var_message) ); @@ -1208,7 +1208,7 @@ public static Amazon.KeyManagementService.Model.IncorrectKeyMaterialException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyMaterialException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectKeyMaterialException(Amazon.KeyManagementService.Model.IncorrectKeyMaterialException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectKeyMaterialException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectKeyMaterialException__M7_message(var_message) ); @@ -1221,7 +1221,7 @@ public static Amazon.KeyManagementService.Model.IncorrectTrustAnchorException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectTrustAnchorException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectTrustAnchorException(Amazon.KeyManagementService.Model.IncorrectTrustAnchorException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_IncorrectTrustAnchorException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_IncorrectTrustAnchorException__M7_message(var_message) ); @@ -1234,7 +1234,7 @@ public static Amazon.KeyManagementService.Model.InvalidAliasNameException FromDa } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidAliasNameException ToDafny_N3_com__N9_amazonaws__N3_kms__S25_InvalidAliasNameException(Amazon.KeyManagementService.Model.InvalidAliasNameException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidAliasNameException( ToDafny_N3_com__N9_amazonaws__N3_kms__S25_InvalidAliasNameException__M7_message(var_message) ); @@ -1247,7 +1247,7 @@ public static Amazon.KeyManagementService.Model.InvalidArnException FromDafny_N3 } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidArnException ToDafny_N3_com__N9_amazonaws__N3_kms__S19_InvalidArnException(Amazon.KeyManagementService.Model.InvalidArnException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidArnException( ToDafny_N3_com__N9_amazonaws__N3_kms__S19_InvalidArnException__M7_message(var_message) ); @@ -1260,7 +1260,7 @@ public static Amazon.KeyManagementService.Model.InvalidCiphertextException FromD } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidCiphertextException ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidCiphertextException(Amazon.KeyManagementService.Model.InvalidCiphertextException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidCiphertextException( ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidCiphertextException__M7_message(var_message) ); @@ -1273,7 +1273,7 @@ public static Amazon.KeyManagementService.Model.InvalidGrantIdException FromDafn } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantIdException ToDafny_N3_com__N9_amazonaws__N3_kms__S23_InvalidGrantIdException(Amazon.KeyManagementService.Model.InvalidGrantIdException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantIdException( ToDafny_N3_com__N9_amazonaws__N3_kms__S23_InvalidGrantIdException__M7_message(var_message) ); @@ -1286,7 +1286,7 @@ public static Amazon.KeyManagementService.Model.InvalidGrantTokenException FromD } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantTokenException ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidGrantTokenException(Amazon.KeyManagementService.Model.InvalidGrantTokenException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidGrantTokenException( ToDafny_N3_com__N9_amazonaws__N3_kms__S26_InvalidGrantTokenException__M7_message(var_message) ); @@ -1299,7 +1299,7 @@ public static Amazon.KeyManagementService.Model.InvalidImportTokenException From } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidImportTokenException ToDafny_N3_com__N9_amazonaws__N3_kms__S27_InvalidImportTokenException(Amazon.KeyManagementService.Model.InvalidImportTokenException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidImportTokenException( ToDafny_N3_com__N9_amazonaws__N3_kms__S27_InvalidImportTokenException__M7_message(var_message) ); @@ -1312,7 +1312,7 @@ public static Amazon.KeyManagementService.Model.InvalidKeyUsageException FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidKeyUsageException ToDafny_N3_com__N9_amazonaws__N3_kms__S24_InvalidKeyUsageException(Amazon.KeyManagementService.Model.InvalidKeyUsageException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidKeyUsageException( ToDafny_N3_com__N9_amazonaws__N3_kms__S24_InvalidKeyUsageException__M7_message(var_message) ); @@ -1325,7 +1325,7 @@ public static Amazon.KeyManagementService.Model.InvalidMarkerException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidMarkerException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_InvalidMarkerException(Amazon.KeyManagementService.Model.InvalidMarkerException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_InvalidMarkerException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_InvalidMarkerException__M7_message(var_message) ); @@ -1428,7 +1428,7 @@ public static Amazon.KeyManagementService.Model.KeyUnavailableException FromDafn } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUnavailableException ToDafny_N3_com__N9_amazonaws__N3_kms__S23_KeyUnavailableException(Amazon.KeyManagementService.Model.KeyUnavailableException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KeyUnavailableException( ToDafny_N3_com__N9_amazonaws__N3_kms__S23_KeyUnavailableException__M7_message(var_message) ); @@ -1457,7 +1457,7 @@ public static Amazon.KeyManagementService.Model.KMSInternalException FromDafny_N } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInternalException ToDafny_N3_com__N9_amazonaws__N3_kms__S20_KMSInternalException(Amazon.KeyManagementService.Model.KMSInternalException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInternalException( ToDafny_N3_com__N9_amazonaws__N3_kms__S20_KMSInternalException__M7_message(var_message) ); @@ -1470,7 +1470,7 @@ public static Amazon.KeyManagementService.Model.KMSInvalidMacException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidMacException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_KMSInvalidMacException(Amazon.KeyManagementService.Model.KMSInvalidMacException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidMacException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_KMSInvalidMacException__M7_message(var_message) ); @@ -1483,7 +1483,7 @@ public static Amazon.KeyManagementService.Model.KMSInvalidSignatureException Fro } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidSignatureException ToDafny_N3_com__N9_amazonaws__N3_kms__S28_KMSInvalidSignatureException(Amazon.KeyManagementService.Model.KMSInvalidSignatureException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidSignatureException( ToDafny_N3_com__N9_amazonaws__N3_kms__S28_KMSInvalidSignatureException__M7_message(var_message) ); @@ -1496,7 +1496,7 @@ public static Amazon.KeyManagementService.Model.KMSInvalidStateException FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidStateException ToDafny_N3_com__N9_amazonaws__N3_kms__S24_KMSInvalidStateException(Amazon.KeyManagementService.Model.KMSInvalidStateException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_KMSInvalidStateException( ToDafny_N3_com__N9_amazonaws__N3_kms__S24_KMSInvalidStateException__M7_message(var_message) ); @@ -1509,7 +1509,7 @@ public static Amazon.KeyManagementService.Model.LimitExceededException FromDafny } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException ToDafny_N3_com__N9_amazonaws__N3_kms__S22_LimitExceededException(Amazon.KeyManagementService.Model.LimitExceededException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_LimitExceededException( ToDafny_N3_com__N9_amazonaws__N3_kms__S22_LimitExceededException__M7_message(var_message) ); @@ -1523,9 +1523,9 @@ public static Amazon.KeyManagementService.Model.ListAliasesRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IListAliasesRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest(Amazon.KeyManagementService.Model.ListAliasesRequest value) { - string var_keyId = (string)value.KeyId; - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; + string var_keyId = value.KeyId; + int? var_limit = value.Limit; + string var_marker = value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListAliasesRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListAliasesRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListAliasesResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListAliasesResponse value) @@ -1537,9 +1537,9 @@ public static Amazon.KeyManagementService.Model.ListAliasesResponse FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IListAliasesResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse(Amazon.KeyManagementService.Model.ListAliasesResponse value) { - System.Collections.Generic.List var_aliases = (System.Collections.Generic.List)value.Aliases; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_aliases = value.Aliases; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListAliasesResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse__M7_Aliases(var_aliases), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ListAliasesResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListGrantsRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsRequest value) @@ -1553,10 +1553,10 @@ public static Amazon.KeyManagementService.Model.ListGrantsRequest FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest(Amazon.KeyManagementService.Model.ListGrantsRequest value) { - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; - string var_grantId = (string)value.GrantId; - string var_granteePrincipal = (string)value.GranteePrincipal; + int? var_limit = value.Limit; + string var_marker = value.Marker; + string var_grantId = value.GrantId; + string var_granteePrincipal = value.GranteePrincipal; return new software.amazon.cryptography.services.kms.internaldafny.types.ListGrantsRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M6_Marker(var_marker), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M7_GrantId(var_grantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M16_GranteePrincipal(var_granteePrincipal)); } public static Amazon.KeyManagementService.Model.ListGrantsResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsResponse value) @@ -1568,9 +1568,9 @@ public static Amazon.KeyManagementService.Model.ListGrantsResponse FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IListGrantsResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse(Amazon.KeyManagementService.Model.ListGrantsResponse value) { - System.Collections.Generic.List var_grants = (System.Collections.Generic.List)value.Grants; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_grants = value.Grants; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListGrantsResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse__M6_Grants(var_grants), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_ListGrantsResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListKeyPoliciesRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesRequest value) @@ -1582,8 +1582,8 @@ public static Amazon.KeyManagementService.Model.ListKeyPoliciesRequest FromDafny public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest(Amazon.KeyManagementService.Model.ListKeyPoliciesRequest value) { - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; + int? var_limit = value.Limit; + string var_marker = value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyPoliciesRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListKeyPoliciesResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesResponse value) @@ -1595,9 +1595,9 @@ public static Amazon.KeyManagementService.Model.ListKeyPoliciesResponse FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyPoliciesResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse(Amazon.KeyManagementService.Model.ListKeyPoliciesResponse value) { - System.Collections.Generic.List var_policyNames = (System.Collections.Generic.List)value.PolicyNames; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_policyNames = value.PolicyNames; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyPoliciesResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse__M11_PolicyNames(var_policyNames), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyPoliciesResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListKeyRotationsRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsRequest value) @@ -1609,8 +1609,8 @@ public static Amazon.KeyManagementService.Model.ListKeyRotationsRequest FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest(Amazon.KeyManagementService.Model.ListKeyRotationsRequest value) { - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; + int? var_limit = value.Limit; + string var_marker = value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyRotationsRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListKeyRotationsResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsResponse value) @@ -1622,9 +1622,9 @@ public static Amazon.KeyManagementService.Model.ListKeyRotationsResponse FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeyRotationsResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse(Amazon.KeyManagementService.Model.ListKeyRotationsResponse value) { - System.Collections.Generic.List var_rotations = (System.Collections.Generic.List)value.Rotations; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_rotations = value.Rotations; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeyRotationsResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse__M9_Rotations(var_rotations), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListKeyRotationsResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListKeysRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListKeysRequest value) @@ -1635,8 +1635,8 @@ public static Amazon.KeyManagementService.Model.ListKeysRequest FromDafny_N3_com public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeysRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest(Amazon.KeyManagementService.Model.ListKeysRequest value) { - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; + int? var_limit = value.Limit; + string var_marker = value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeysRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S15_ListKeysRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListKeysResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListKeysResponse value) @@ -1648,9 +1648,9 @@ public static Amazon.KeyManagementService.Model.ListKeysResponse FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IListKeysResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse(Amazon.KeyManagementService.Model.ListKeysResponse value) { - System.Collections.Generic.List var_keys = (System.Collections.Generic.List)value.Keys; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_keys = value.Keys; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListKeysResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse__M4_Keys(var_keys), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ListKeysResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.Model.ListResourceTagsRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest(software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsRequest value) @@ -1662,8 +1662,8 @@ public static Amazon.KeyManagementService.Model.ListResourceTagsRequest FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest(Amazon.KeyManagementService.Model.ListResourceTagsRequest value) { - int? var_limit = (int?)value.Limit; - string var_marker = (string)value.Marker; + int? var_limit = value.Limit; + string var_marker = value.Marker; return new software.amazon.cryptography.services.kms.internaldafny.types.ListResourceTagsRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_Limit(var_limit), ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M6_Marker(var_marker)); } public static Amazon.KeyManagementService.Model.ListResourceTagsResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse(software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsResponse value) @@ -1675,9 +1675,9 @@ public static Amazon.KeyManagementService.Model.ListResourceTagsResponse FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IListResourceTagsResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse(Amazon.KeyManagementService.Model.ListResourceTagsResponse value) { - System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; - string var_nextMarker = (string)value.NextMarker; - bool? var_truncated = (bool?)value.Truncated; + System.Collections.Generic.List var_tags = value.Tags; + string var_nextMarker = value.NextMarker; + bool? var_truncated = value.Truncated; return new software.amazon.cryptography.services.kms.internaldafny.types.ListResourceTagsResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse__M4_Tags(var_tags), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse__M10_NextMarker(var_nextMarker), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ListResourceTagsResponse__M9_Truncated(var_truncated)); } public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec value) @@ -1704,7 +1704,7 @@ public static Amazon.KeyManagementService.Model.MalformedPolicyDocumentException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_MalformedPolicyDocumentException(Amazon.KeyManagementService.Model.MalformedPolicyDocumentException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_MalformedPolicyDocumentException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_MalformedPolicyDocumentException__M7_message(var_message) ); @@ -1741,7 +1741,7 @@ public static Amazon.KeyManagementService.Model.NotFoundException FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S17_NotFoundException(Amazon.KeyManagementService.Model.NotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_NotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S17_NotFoundException__M7_message(var_message) ); @@ -1772,8 +1772,8 @@ public static Amazon.KeyManagementService.Model.PutKeyPolicyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IPutKeyPolicyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest(Amazon.KeyManagementService.Model.PutKeyPolicyRequest value) { - string var_policyName = (string)value.PolicyName; - bool? var_bypassPolicyLockoutSafetyCheck = (bool?)value.BypassPolicyLockoutSafetyCheck; + string var_policyName = value.PolicyName; + bool? var_bypassPolicyLockoutSafetyCheck = value.BypassPolicyLockoutSafetyCheck; return new software.amazon.cryptography.services.kms.internaldafny.types.PutKeyPolicyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M10_PolicyName(var_policyName), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M6_Policy(value.Policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M30_BypassPolicyLockoutSafetyCheck(var_bypassPolicyLockoutSafetyCheck)); } public static Amazon.KeyManagementService.Model.ReEncryptRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest(software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptRequest value) @@ -1791,13 +1791,13 @@ public static Amazon.KeyManagementService.Model.ReEncryptRequest FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest(Amazon.KeyManagementService.Model.ReEncryptRequest value) { - System.Collections.Generic.Dictionary var_sourceEncryptionContext = (System.Collections.Generic.Dictionary)value.SourceEncryptionContext; - string var_sourceKeyId = (string)value.SourceKeyId; - System.Collections.Generic.Dictionary var_destinationEncryptionContext = (System.Collections.Generic.Dictionary)value.DestinationEncryptionContext; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.SourceEncryptionAlgorithm; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.DestinationEncryptionAlgorithm; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.Dictionary var_sourceEncryptionContext = value.SourceEncryptionContext; + string var_sourceKeyId = value.SourceKeyId; + System.Collections.Generic.Dictionary var_destinationEncryptionContext = value.DestinationEncryptionContext; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = value.SourceEncryptionAlgorithm; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = value.DestinationEncryptionAlgorithm; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.ReEncryptRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M14_CiphertextBlob(value.CiphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M23_SourceEncryptionContext(var_sourceEncryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M11_SourceKeyId(var_sourceKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M16_DestinationKeyId(value.DestinationKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M28_DestinationEncryptionContext(var_destinationEncryptionContext), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M25_SourceEncryptionAlgorithm(var_sourceEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M30_DestinationEncryptionAlgorithm(var_destinationEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.ReEncryptResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse(software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptResponse value) @@ -1811,11 +1811,11 @@ public static Amazon.KeyManagementService.Model.ReEncryptResponse FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._IReEncryptResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse(Amazon.KeyManagementService.Model.ReEncryptResponse value) { - System.IO.MemoryStream var_ciphertextBlob = (System.IO.MemoryStream)value.CiphertextBlob; - string var_sourceKeyId = (string)value.SourceKeyId; - string var_keyId = (string)value.KeyId; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.SourceEncryptionAlgorithm; - Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = (Amazon.KeyManagementService.EncryptionAlgorithmSpec)value.DestinationEncryptionAlgorithm; + System.IO.MemoryStream var_ciphertextBlob = value.CiphertextBlob; + string var_sourceKeyId = value.SourceKeyId; + string var_keyId = value.KeyId; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_sourceEncryptionAlgorithm = value.SourceEncryptionAlgorithm; + Amazon.KeyManagementService.EncryptionAlgorithmSpec var_destinationEncryptionAlgorithm = value.DestinationEncryptionAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.ReEncryptResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M14_CiphertextBlob(var_ciphertextBlob), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M11_SourceKeyId(var_sourceKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M25_SourceEncryptionAlgorithm(var_sourceEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ReEncryptResponse__M30_DestinationEncryptionAlgorithm(var_destinationEncryptionAlgorithm)); } public static Amazon.KeyManagementService.Model.ReplicateKeyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyRequest value) @@ -1830,10 +1830,10 @@ public static Amazon.KeyManagementService.Model.ReplicateKeyRequest FromDafny_N3 public static software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest(Amazon.KeyManagementService.Model.ReplicateKeyRequest value) { - string var_policy = (string)value.Policy; - bool? var_bypassPolicyLockoutSafetyCheck = (bool?)value.BypassPolicyLockoutSafetyCheck; - string var_description = (string)value.Description; - System.Collections.Generic.List var_tags = (System.Collections.Generic.List)value.Tags; + string var_policy = value.Policy; + bool? var_bypassPolicyLockoutSafetyCheck = value.BypassPolicyLockoutSafetyCheck; + string var_description = value.Description; + System.Collections.Generic.List var_tags = value.Tags; return new software.amazon.cryptography.services.kms.internaldafny.types.ReplicateKeyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M13_ReplicaRegion(value.ReplicaRegion), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M6_Policy(var_policy), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M30_BypassPolicyLockoutSafetyCheck(var_bypassPolicyLockoutSafetyCheck), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M11_Description(var_description), ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M4_Tags(var_tags)); } public static Amazon.KeyManagementService.Model.ReplicateKeyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyResponse value) @@ -1845,9 +1845,9 @@ public static Amazon.KeyManagementService.Model.ReplicateKeyResponse FromDafny_N public static software.amazon.cryptography.services.kms.internaldafny.types._IReplicateKeyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse(Amazon.KeyManagementService.Model.ReplicateKeyResponse value) { - Amazon.KeyManagementService.Model.KeyMetadata var_replicaKeyMetadata = (Amazon.KeyManagementService.Model.KeyMetadata)value.ReplicaKeyMetadata; - string var_replicaPolicy = (string)value.ReplicaPolicy; - System.Collections.Generic.List var_replicaTags = (System.Collections.Generic.List)value.ReplicaTags; + Amazon.KeyManagementService.Model.KeyMetadata var_replicaKeyMetadata = value.ReplicaKeyMetadata; + string var_replicaPolicy = value.ReplicaPolicy; + System.Collections.Generic.List var_replicaTags = value.ReplicaTags; return new software.amazon.cryptography.services.kms.internaldafny.types.ReplicateKeyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse__M18_ReplicaKeyMetadata(var_replicaKeyMetadata), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse__M13_ReplicaPolicy(var_replicaPolicy), ToDafny_N3_com__N9_amazonaws__N3_kms__S20_ReplicateKeyResponse__M11_ReplicaTags(var_replicaTags)); } public static Amazon.KeyManagementService.Model.RetireGrantRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest(software.amazon.cryptography.services.kms.internaldafny.types._IRetireGrantRequest value) @@ -1860,10 +1860,10 @@ public static Amazon.KeyManagementService.Model.RetireGrantRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IRetireGrantRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest(Amazon.KeyManagementService.Model.RetireGrantRequest value) { - string var_grantToken = (string)value.GrantToken; - string var_keyId = (string)value.KeyId; - string var_grantId = (string)value.GrantId; - bool? var_dryRun = (bool?)value.DryRun; + string var_grantToken = value.GrantToken; + string var_keyId = value.KeyId; + string var_grantId = value.GrantId; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.RetireGrantRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M10_GrantToken(var_grantToken), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M7_GrantId(var_grantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RetireGrantRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.RevokeGrantRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest(software.amazon.cryptography.services.kms.internaldafny.types._IRevokeGrantRequest value) @@ -1875,7 +1875,7 @@ public static Amazon.KeyManagementService.Model.RevokeGrantRequest FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IRevokeGrantRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest(Amazon.KeyManagementService.Model.RevokeGrantRequest value) { - bool? var_dryRun = (bool?)value.DryRun; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.RevokeGrantRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M7_GrantId(value.GrantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.RotateKeyOnDemandRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S24_RotateKeyOnDemandRequest(software.amazon.cryptography.services.kms.internaldafny.types._IRotateKeyOnDemandRequest value) @@ -1895,7 +1895,7 @@ public static Amazon.KeyManagementService.Model.RotateKeyOnDemandResponse FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._IRotateKeyOnDemandResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S25_RotateKeyOnDemandResponse(Amazon.KeyManagementService.Model.RotateKeyOnDemandResponse value) { - string var_keyId = (string)value.KeyId; + string var_keyId = value.KeyId; return new software.amazon.cryptography.services.kms.internaldafny.types.RotateKeyOnDemandResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_RotateKeyOnDemandResponse__M5_KeyId(var_keyId)); } public static Amazon.KeyManagementService.RotationType FromDafny_N3_com__N9_amazonaws__N3_kms__S12_RotationType(software.amazon.cryptography.services.kms.internaldafny.types._IRotationType value) @@ -1918,7 +1918,7 @@ public static Amazon.KeyManagementService.Model.ScheduleKeyDeletionRequest FromD public static software.amazon.cryptography.services.kms.internaldafny.types._IScheduleKeyDeletionRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest(Amazon.KeyManagementService.Model.ScheduleKeyDeletionRequest value) { - int? var_pendingWindowInDays = (int?)value.PendingWindowInDays; + int? var_pendingWindowInDays = value.PendingWindowInDays; return new software.amazon.cryptography.services.kms.internaldafny.types.ScheduleKeyDeletionRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M19_PendingWindowInDays(var_pendingWindowInDays)); } public static Amazon.KeyManagementService.Model.ScheduleKeyDeletionResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse(software.amazon.cryptography.services.kms.internaldafny.types._IScheduleKeyDeletionResponse value) @@ -1931,10 +1931,10 @@ public static Amazon.KeyManagementService.Model.ScheduleKeyDeletionResponse From public static software.amazon.cryptography.services.kms.internaldafny.types._IScheduleKeyDeletionResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse(Amazon.KeyManagementService.Model.ScheduleKeyDeletionResponse value) { - string var_keyId = (string)value.KeyId; - System.DateTime? var_deletionDate = (System.DateTime?)value.DeletionDate; - Amazon.KeyManagementService.KeyState var_keyState = (Amazon.KeyManagementService.KeyState)value.KeyState; - int? var_pendingWindowInDays = (int?)value.PendingWindowInDays; + string var_keyId = value.KeyId; + System.DateTime? var_deletionDate = value.DeletionDate; + Amazon.KeyManagementService.KeyState var_keyState = value.KeyState; + int? var_pendingWindowInDays = value.PendingWindowInDays; return new software.amazon.cryptography.services.kms.internaldafny.types.ScheduleKeyDeletionResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M12_DeletionDate(var_deletionDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M8_KeyState(var_keyState), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_ScheduleKeyDeletionResponse__M19_PendingWindowInDays(var_pendingWindowInDays)); } public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec value) @@ -1977,9 +1977,9 @@ public static Amazon.KeyManagementService.Model.SignRequest FromDafny_N3_com__N9 public static software.amazon.cryptography.services.kms.internaldafny.types._ISignRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest(Amazon.KeyManagementService.Model.SignRequest value) { - Amazon.KeyManagementService.MessageType var_messageType = (Amazon.KeyManagementService.MessageType)value.MessageType; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + Amazon.KeyManagementService.MessageType var_messageType = value.MessageType; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.SignRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M11_MessageType(var_messageType), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M16_SigningAlgorithm(value.SigningAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.SignResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse(software.amazon.cryptography.services.kms.internaldafny.types._ISignResponse value) @@ -1991,9 +1991,9 @@ public static Amazon.KeyManagementService.Model.SignResponse FromDafny_N3_com__N public static software.amazon.cryptography.services.kms.internaldafny.types._ISignResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse(Amazon.KeyManagementService.Model.SignResponse value) { - string var_keyId = (string)value.KeyId; - System.IO.MemoryStream var_signature = (System.IO.MemoryStream)value.Signature; - Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = (Amazon.KeyManagementService.SigningAlgorithmSpec)value.SigningAlgorithm; + string var_keyId = value.KeyId; + System.IO.MemoryStream var_signature = value.Signature; + Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = value.SigningAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.SignResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse__M9_Signature(var_signature), ToDafny_N3_com__N9_amazonaws__N3_kms__S12_SignResponse__M16_SigningAlgorithm(var_signingAlgorithm)); } public static Amazon.KeyManagementService.Model.TagException FromDafny_N3_com__N9_amazonaws__N3_kms__S12_TagException(software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException value) @@ -2004,7 +2004,7 @@ public static Amazon.KeyManagementService.Model.TagException FromDafny_N3_com__N } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagException(Amazon.KeyManagementService.Model.TagException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_TagException( ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagException__M7_message(var_message) ); @@ -2028,7 +2028,7 @@ public static Amazon.KeyManagementService.Model.UnsupportedOperationException Fr } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException ToDafny_N3_com__N9_amazonaws__N3_kms__S29_UnsupportedOperationException(Amazon.KeyManagementService.Model.UnsupportedOperationException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_UnsupportedOperationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S29_UnsupportedOperationException__M7_message(var_message) ); @@ -2070,14 +2070,14 @@ public static Amazon.KeyManagementService.Model.UpdateCustomKeyStoreRequest From public static software.amazon.cryptography.services.kms.internaldafny.types._IUpdateCustomKeyStoreRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest(Amazon.KeyManagementService.Model.UpdateCustomKeyStoreRequest value) { - string var_newCustomKeyStoreName = (string)value.NewCustomKeyStoreName; - string var_keyStorePassword = (string)value.KeyStorePassword; - string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; - string var_xksProxyUriEndpoint = (string)value.XksProxyUriEndpoint; - string var_xksProxyUriPath = (string)value.XksProxyUriPath; - string var_xksProxyVpcEndpointServiceName = (string)value.XksProxyVpcEndpointServiceName; - Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = (Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType)value.XksProxyAuthenticationCredential; - Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = (Amazon.KeyManagementService.XksProxyConnectivityType)value.XksProxyConnectivity; + string var_newCustomKeyStoreName = value.NewCustomKeyStoreName; + string var_keyStorePassword = value.KeyStorePassword; + string var_cloudHsmClusterId = value.CloudHsmClusterId; + string var_xksProxyUriEndpoint = value.XksProxyUriEndpoint; + string var_xksProxyUriPath = value.XksProxyUriPath; + string var_xksProxyVpcEndpointServiceName = value.XksProxyVpcEndpointServiceName; + Amazon.KeyManagementService.Model.XksProxyAuthenticationCredentialType var_xksProxyAuthenticationCredential = value.XksProxyAuthenticationCredential; + Amazon.KeyManagementService.XksProxyConnectivityType var_xksProxyConnectivity = value.XksProxyConnectivity; return new software.amazon.cryptography.services.kms.internaldafny.types.UpdateCustomKeyStoreRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_CustomKeyStoreId(value.CustomKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M21_NewCustomKeyStoreName(var_newCustomKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_KeyStorePassword(var_keyStorePassword), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M19_XksProxyUriEndpoint(var_xksProxyUriEndpoint), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M15_XksProxyUriPath(var_xksProxyUriPath), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M30_XksProxyVpcEndpointServiceName(var_xksProxyVpcEndpointServiceName), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M32_XksProxyAuthenticationCredential(var_xksProxyAuthenticationCredential), ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M20_XksProxyConnectivity(var_xksProxyConnectivity)); } public static Amazon.KeyManagementService.Model.UpdateCustomKeyStoreResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S28_UpdateCustomKeyStoreResponse(software.amazon.cryptography.services.kms.internaldafny.types._IUpdateCustomKeyStoreResponse value) @@ -2124,8 +2124,8 @@ public static Amazon.KeyManagementService.Model.VerifyMacRequest FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyMacRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest(Amazon.KeyManagementService.Model.VerifyMacRequest value) { - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyMacRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M12_MacAlgorithm(value.MacAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M3_Mac(value.Mac), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.VerifyMacResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse(software.amazon.cryptography.services.kms.internaldafny.types._IVerifyMacResponse value) @@ -2137,9 +2137,9 @@ public static Amazon.KeyManagementService.Model.VerifyMacResponse FromDafny_N3_c public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyMacResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse(Amazon.KeyManagementService.Model.VerifyMacResponse value) { - string var_keyId = (string)value.KeyId; - bool? var_macValid = (bool?)value.MacValid; - Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = (Amazon.KeyManagementService.MacAlgorithmSpec)value.MacAlgorithm; + string var_keyId = value.KeyId; + bool? var_macValid = value.MacValid; + Amazon.KeyManagementService.MacAlgorithmSpec var_macAlgorithm = value.MacAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyMacResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse__M8_MacValid(var_macValid), ToDafny_N3_com__N9_amazonaws__N3_kms__S17_VerifyMacResponse__M12_MacAlgorithm(var_macAlgorithm)); } public static Amazon.KeyManagementService.Model.VerifyRequest FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest(software.amazon.cryptography.services.kms.internaldafny.types._IVerifyRequest value) @@ -2155,9 +2155,9 @@ public static Amazon.KeyManagementService.Model.VerifyRequest FromDafny_N3_com__ public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyRequest ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest(Amazon.KeyManagementService.Model.VerifyRequest value) { - Amazon.KeyManagementService.MessageType var_messageType = (Amazon.KeyManagementService.MessageType)value.MessageType; - System.Collections.Generic.List var_grantTokens = (System.Collections.Generic.List)value.GrantTokens; - bool? var_dryRun = (bool?)value.DryRun; + Amazon.KeyManagementService.MessageType var_messageType = value.MessageType; + System.Collections.Generic.List var_grantTokens = value.GrantTokens; + bool? var_dryRun = value.DryRun; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyRequest(ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M7_Message(value.Message), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_MessageType(var_messageType), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M9_Signature(value.Signature), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M16_SigningAlgorithm(value.SigningAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_GrantTokens(var_grantTokens), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M6_DryRun(var_dryRun)); } public static Amazon.KeyManagementService.Model.VerifyResponse FromDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse(software.amazon.cryptography.services.kms.internaldafny.types._IVerifyResponse value) @@ -2169,9 +2169,9 @@ public static Amazon.KeyManagementService.Model.VerifyResponse FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IVerifyResponse ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse(Amazon.KeyManagementService.Model.VerifyResponse value) { - string var_keyId = (string)value.KeyId; - bool? var_signatureValid = (bool?)value.SignatureValid; - Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = (Amazon.KeyManagementService.SigningAlgorithmSpec)value.SigningAlgorithm; + string var_keyId = value.KeyId; + bool? var_signatureValid = value.SignatureValid; + Amazon.KeyManagementService.SigningAlgorithmSpec var_signingAlgorithm = value.SigningAlgorithm; return new software.amazon.cryptography.services.kms.internaldafny.types.VerifyResponse(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse__M14_SignatureValid(var_signatureValid), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_VerifyResponse__M16_SigningAlgorithm(var_signingAlgorithm)); } public static Amazon.KeyManagementService.WrappingKeySpec FromDafny_N3_com__N9_amazonaws__N3_kms__S15_WrappingKeySpec(software.amazon.cryptography.services.kms.internaldafny.types._IWrappingKeySpec value) @@ -2198,7 +2198,7 @@ public static Amazon.KeyManagementService.Model.XksKeyAlreadyInUseException From } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S27_XksKeyAlreadyInUseException(Amazon.KeyManagementService.Model.XksKeyAlreadyInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyAlreadyInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S27_XksKeyAlreadyInUseException__M7_message(var_message) ); @@ -2211,7 +2211,7 @@ public static Amazon.KeyManagementService.Model.XksKeyInvalidConfigurationExcept } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S35_XksKeyInvalidConfigurationException(Amazon.KeyManagementService.Model.XksKeyInvalidConfigurationException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S35_XksKeyInvalidConfigurationException__M7_message(var_message) ); @@ -2224,7 +2224,7 @@ public static Amazon.KeyManagementService.Model.XksKeyNotFoundException FromDafn } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyNotFoundException(Amazon.KeyManagementService.Model.XksKeyNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksKeyNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyNotFoundException__M7_message(var_message) ); @@ -2249,7 +2249,7 @@ public static Amazon.KeyManagementService.Model.XksProxyIncorrectAuthenticationC } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyIncorrectAuthenticationCredentialException ToDafny_N3_com__N9_amazonaws__N3_kms__S50_XksProxyIncorrectAuthenticationCredentialException(Amazon.KeyManagementService.Model.XksProxyIncorrectAuthenticationCredentialException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyIncorrectAuthenticationCredentialException( ToDafny_N3_com__N9_amazonaws__N3_kms__S50_XksProxyIncorrectAuthenticationCredentialException__M7_message(var_message) ); @@ -2262,7 +2262,7 @@ public static Amazon.KeyManagementService.Model.XksProxyInvalidConfigurationExce } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyInvalidConfigurationException(Amazon.KeyManagementService.Model.XksProxyInvalidConfigurationException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyInvalidConfigurationException__M7_message(var_message) ); @@ -2275,7 +2275,7 @@ public static Amazon.KeyManagementService.Model.XksProxyInvalidResponseException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidResponseException ToDafny_N3_com__N9_amazonaws__N3_kms__S32_XksProxyInvalidResponseException(Amazon.KeyManagementService.Model.XksProxyInvalidResponseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyInvalidResponseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S32_XksProxyInvalidResponseException__M7_message(var_message) ); @@ -2288,7 +2288,7 @@ public static Amazon.KeyManagementService.Model.XksProxyUriEndpointInUseExceptio } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriEndpointInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S33_XksProxyUriEndpointInUseException(Amazon.KeyManagementService.Model.XksProxyUriEndpointInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriEndpointInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S33_XksProxyUriEndpointInUseException__M7_message(var_message) ); @@ -2301,7 +2301,7 @@ public static Amazon.KeyManagementService.Model.XksProxyUriInUseException FromDa } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyUriInUseException(Amazon.KeyManagementService.Model.XksProxyUriInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyUriInUseException__M7_message(var_message) ); @@ -2314,7 +2314,7 @@ public static Amazon.KeyManagementService.Model.XksProxyUriUnreachableException } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriUnreachableException ToDafny_N3_com__N9_amazonaws__N3_kms__S31_XksProxyUriUnreachableException(Amazon.KeyManagementService.Model.XksProxyUriUnreachableException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyUriUnreachableException( ToDafny_N3_com__N9_amazonaws__N3_kms__S31_XksProxyUriUnreachableException__M7_message(var_message) ); @@ -2327,7 +2327,7 @@ public static Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInUseE } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInUseException ToDafny_N3_com__N9_amazonaws__N3_kms__S40_XksProxyVpcEndpointServiceInUseException(Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInUseException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInUseException( ToDafny_N3_com__N9_amazonaws__N3_kms__S40_XksProxyVpcEndpointServiceInUseException__M7_message(var_message) ); @@ -2340,7 +2340,7 @@ public static Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInvali } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInvalidConfigurationException ToDafny_N3_com__N9_amazonaws__N3_kms__S55_XksProxyVpcEndpointServiceInvalidConfigurationException(Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceInvalidConfigurationException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceInvalidConfigurationException( ToDafny_N3_com__N9_amazonaws__N3_kms__S55_XksProxyVpcEndpointServiceInvalidConfigurationException__M7_message(var_message) ); @@ -2353,7 +2353,7 @@ public static Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceNotFou } public static software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceNotFoundException ToDafny_N3_com__N9_amazonaws__N3_kms__S43_XksProxyVpcEndpointServiceNotFoundException(Amazon.KeyManagementService.Model.XksProxyVpcEndpointServiceNotFoundException value) { - string var_message = (string)value.Message; + string var_message = value.Message; return new software.amazon.cryptography.services.kms.internaldafny.types.Error_XksProxyVpcEndpointServiceNotFoundException( ToDafny_N3_com__N9_amazonaws__N3_kms__S43_XksProxyVpcEndpointServiceNotFoundException__M7_message(var_message) ); @@ -2372,7 +2372,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_CancelKeyDeleti } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CancelKeyDeletionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_CancelKeyDeletionResponse__M5_KeyId(Wrappers_Compile._IOption> value) { @@ -2436,7 +2436,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S28_ConnectCustomKe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S28_ConnectCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M9_AliasName(Dafny.ISequence value) { @@ -2444,7 +2444,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M9_AliasName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M11_TargetKeyId(Dafny.ISequence value) { @@ -2452,7 +2452,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateAliasRequest__M11_TargetKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreName(Dafny.ISequence value) { @@ -2460,7 +2460,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M18_CustomKeyStoreName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_CustomKeyStoreNameType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_CustomKeyStoreNameType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_CreateCustomKeyStoreRequest__M17_CloudHsmClusterId(Wrappers_Compile._IOption> value) { @@ -2548,7 +2548,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M16_GranteePrincipal(Dafny.ISequence value) { @@ -2556,7 +2556,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M16_GranteePrincipal(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_PrincipalIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_PrincipalIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M17_RetiringPrincipal(Wrappers_Compile._IOption> value) { @@ -2572,7 +2572,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M10_Operations(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList(value); } public static Amazon.KeyManagementService.Model.GrantConstraints FromDafny_N3_com__N9_amazonaws__N3_kms__S18_CreateGrantRequest__M11_Constraints(Wrappers_Compile._IOption value) { @@ -2756,7 +2756,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M14_CiphertextBlob(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S14_DecryptRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -2844,7 +2844,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DeleteAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DeleteAliasRequest__M9_AliasName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_DeleteCustomKeyStoreRequest__M16_CustomKeyStoreId(Dafny.ISequence value) { @@ -2852,7 +2852,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_DeleteCustomKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_DeleteCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S32_DeleteImportedKeyMaterialRequest__M5_KeyId(Dafny.ISequence value) { @@ -2860,7 +2860,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S32_DeleteImportedK } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S32_DeleteImportedKeyMaterialRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_DependencyTimeoutException__M7_message(Wrappers_Compile._IOption> value) { @@ -2876,7 +2876,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSec } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M21_KeyAgreementAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec value) { @@ -2884,7 +2884,7 @@ public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3 } public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M21_KeyAgreementAlgorithm(Amazon.KeyManagementService.KeyAgreementAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec((Amazon.KeyManagementService.KeyAgreementAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_PublicKey(Dafny.ISequence value) { @@ -2892,7 +2892,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S25 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M9_PublicKey(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PublicKeyType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PublicKeyType(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DeriveSharedSecretRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3020,7 +3020,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_DescribeKeyRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3052,7 +3052,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S17_DisableKeyReque } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S17_DisableKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DisableKeyRotationRequest__M5_KeyId(Dafny.ISequence value) { @@ -3060,7 +3060,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_DisableKeyRotat } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S25_DisableKeyRotationRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S31_DisconnectCustomKeyStoreRequest__M16_CustomKeyStoreId(Dafny.ISequence value) { @@ -3068,7 +3068,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S31_DisconnectCusto } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S31_DisconnectCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_DryRunOperationException__M7_message(Wrappers_Compile._IOption> value) { @@ -3084,7 +3084,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_EnableKeyReques } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_EnableKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M5_KeyId(Dafny.ISequence value) { @@ -3092,7 +3092,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotati } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S24_EnableKeyRotationRequest__M20_RotationPeriodInDays(Wrappers_Compile._IOption value) { @@ -3108,7 +3108,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M9_Plaintext(Dafny.ISequence value) { @@ -3116,7 +3116,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M9_Plaintext(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S14_EncryptRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -3196,7 +3196,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_KeyPairSpec(software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec value) { @@ -3204,7 +3204,7 @@ public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_KeyPairSpec(Amazon.KeyManagementService.DataKeyPairSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec((Amazon.KeyManagementService.DataKeyPairSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S26_GenerateDataKeyPairRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3292,7 +3292,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_KeyPairSpec(software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec value) { @@ -3300,7 +3300,7 @@ public static Amazon.KeyManagementService.DataKeyPairSpec FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IDataKeyPairSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_KeyPairSpec(Amazon.KeyManagementService.DataKeyPairSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec((Amazon.KeyManagementService.DataKeyPairSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DataKeyPairSpec(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S42_GenerateDataKeyPairWithoutPlaintextRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3356,7 +3356,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S22_GenerateDataKeyRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -3444,7 +3444,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S38_GenerateDataKeyWithoutPlaintextRequest__M17_EncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -3508,7 +3508,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S18 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M5_KeyId(Dafny.ISequence value) { @@ -3516,7 +3516,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M12_MacAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec value) { @@ -3524,7 +3524,7 @@ public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M12_MacAlgorithm(Amazon.KeyManagementService.MacAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec((Amazon.KeyManagementService.MacAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GenerateMacRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3612,7 +3612,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetKeyPolicyRequest__M10_PolicyName(Wrappers_Compile._IOption> value) { @@ -3644,7 +3644,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_GetKeyRotationS } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_GetKeyRotationStatusRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S28_GetKeyRotationStatusResponse__M18_KeyRotationEnabled(Wrappers_Compile._IOption value) { @@ -3692,7 +3692,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersFo } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static Amazon.KeyManagementService.AlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M17_WrappingAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IAlgorithmSpec value) { @@ -3700,7 +3700,7 @@ public static Amazon.KeyManagementService.AlgorithmSpec FromDafny_N3_com__N9_ama } public static software.amazon.cryptography.services.kms.internaldafny.types._IAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M17_WrappingAlgorithm(Amazon.KeyManagementService.AlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AlgorithmSpec((Amazon.KeyManagementService.AlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AlgorithmSpec(value); } public static Amazon.KeyManagementService.WrappingKeySpec FromDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M15_WrappingKeySpec(software.amazon.cryptography.services.kms.internaldafny.types._IWrappingKeySpec value) { @@ -3708,7 +3708,7 @@ public static Amazon.KeyManagementService.WrappingKeySpec FromDafny_N3_com__N9_a } public static software.amazon.cryptography.services.kms.internaldafny.types._IWrappingKeySpec ToDafny_N3_com__N9_amazonaws__N3_kms__S29_GetParametersForImportRequest__M15_WrappingKeySpec(Amazon.KeyManagementService.WrappingKeySpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_WrappingKeySpec((Amazon.KeyManagementService.WrappingKeySpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_WrappingKeySpec(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S30_GetParametersForImportResponse__M5_KeyId(Wrappers_Compile._IOption> value) { @@ -3748,7 +3748,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S19_GetPublicKeyRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -3828,7 +3828,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMateri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M11_ImportToken(Dafny.ISequence value) { @@ -3836,7 +3836,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M11_ImportToken(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M20_EncryptedKeyMaterial(Dafny.ISequence value) { @@ -3844,7 +3844,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S24 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M20_EncryptedKeyMaterial(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); } public static System.DateTime? FromDafny_N3_com__N9_amazonaws__N3_kms__S24_ImportKeyMaterialRequest__M7_ValidTo(Wrappers_Compile._IOption> value) { @@ -4068,7 +4068,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsReque } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S17_ListGrantsRequest__M7_GrantId(Wrappers_Compile._IOption> value) { @@ -4116,7 +4116,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPolicies } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S22_ListKeyPoliciesRequest__M5_Limit(Wrappers_Compile._IOption value) { @@ -4164,7 +4164,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotation } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListKeyRotationsRequest__M5_Limit(Wrappers_Compile._IOption value) { @@ -4252,7 +4252,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTag } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S23_ListResourceTagsRequest__M5_Limit(Wrappers_Compile._IOption value) { @@ -4316,7 +4316,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M10_PolicyName(Wrappers_Compile._IOption> value) { @@ -4332,7 +4332,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M6_Policy(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_PolicyType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_PolicyType(value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S19_PutKeyPolicyRequest__M30_BypassPolicyLockoutSafetyCheck(Wrappers_Compile._IOption value) { @@ -4348,7 +4348,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M14_CiphertextBlob(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M23_SourceEncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -4372,7 +4372,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptReques } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M16_DestinationKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S16_ReEncryptRequest__M28_DestinationEncryptionContext(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -4460,7 +4460,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M13_ReplicaRegion(Dafny.ISequence value) { @@ -4468,7 +4468,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyReq } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M13_ReplicaRegion(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S19_ReplicateKeyRequest__M6_Policy(Wrappers_Compile._IOption> value) { @@ -4564,7 +4564,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M7_GrantId(Dafny.ISequence value) { @@ -4572,7 +4572,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M7_GrantId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S11_GrantIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S11_GrantIdType(value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RevokeGrantRequest__M6_DryRun(Wrappers_Compile._IOption value) { @@ -4588,7 +4588,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S24_RotateKeyOnDema } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S24_RotateKeyOnDemandRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S25_RotateKeyOnDemandResponse__M5_KeyId(Wrappers_Compile._IOption> value) { @@ -4604,7 +4604,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDele } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static int? FromDafny_N3_com__N9_amazonaws__N3_kms__S26_ScheduleKeyDeletionRequest__M19_PendingWindowInDays(Wrappers_Compile._IOption value) { @@ -4652,7 +4652,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M5 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M7_Message(Dafny.ISequence value) { @@ -4660,7 +4660,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S11 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); } public static Amazon.KeyManagementService.MessageType FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M11_MessageType(Wrappers_Compile._IOption value) { @@ -4684,7 +4684,7 @@ public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M16_SigningAlgorithm(Amazon.KeyManagementService.SigningAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec((Amazon.KeyManagementService.SigningAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(value); } public static bool? FromDafny_N3_com__N9_amazonaws__N3_kms__S11_SignRequest__M6_DryRun(Wrappers_Compile._IOption value) { @@ -4732,7 +4732,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequest__M4_Tags(Dafny.ISequence value) { @@ -4740,7 +4740,7 @@ public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_Ta } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_TagResourceRequest__M4_Tags(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S29_UnsupportedOperationException__M7_message(Wrappers_Compile._IOption> value) { @@ -4756,7 +4756,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRequest__M7_TagKeys(Dafny.ISequence> value) { @@ -4764,7 +4764,7 @@ public static System.Collections.Generic.List FromDafny_N3_com__N9_amazo } public static Dafny.ISequence> ToDafny_N3_com__N9_amazonaws__N3_kms__S20_UntagResourceRequest__M7_TagKeys(System.Collections.Generic.List value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList((System.Collections.Generic.List)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M9_AliasName(Dafny.ISequence value) { @@ -4772,7 +4772,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M9_AliasName(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_AliasNameType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M11_TargetKeyId(Dafny.ISequence value) { @@ -4780,7 +4780,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S18_UpdateAliasRequest__M11_TargetKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_CustomKeyStoreId(Dafny.ISequence value) { @@ -4788,7 +4788,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKey } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M16_CustomKeyStoreId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_CustomKeyStoreIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateCustomKeyStoreRequest__M21_NewCustomKeyStoreName(Wrappers_Compile._IOption> value) { @@ -4860,7 +4860,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescriptionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescriptionRequest__M11_Description(Dafny.ISequence value) { @@ -4868,7 +4868,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescri } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S27_UpdateKeyDescriptionRequest__M11_Description(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DescriptionType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S15_DescriptionType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M5_KeyId(Dafny.ISequence value) { @@ -4876,7 +4876,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M13_PrimaryRegion(Dafny.ISequence value) { @@ -4884,7 +4884,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRe } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S26_UpdatePrimaryRegionRequest__M13_PrimaryRegion(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_RegionType(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M7_Message(Dafny.ISequence value) { @@ -4892,7 +4892,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M5_KeyId(Dafny.ISequence value) { @@ -4900,7 +4900,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacReques } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M12_MacAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec value) { @@ -4908,7 +4908,7 @@ public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M12_MacAlgorithm(Amazon.KeyManagementService.MacAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec((Amazon.KeyManagementService.MacAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M3_Mac(Dafny.ISequence value) { @@ -4916,7 +4916,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S16 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M3_Mac(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S16_VerifyMacRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -4964,7 +4964,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M7_Message(Dafny.ISequence value) { @@ -4972,7 +4972,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M7_Message(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(value); } public static Amazon.KeyManagementService.MessageType FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_MessageType(Wrappers_Compile._IOption value) { @@ -4988,7 +4988,7 @@ public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M9_Signature(System.IO.MemoryStream value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType((System.IO.MemoryStream)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(value); } public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M16_SigningAlgorithm(software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec value) { @@ -4996,7 +4996,7 @@ public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M16_SigningAlgorithm(Amazon.KeyManagementService.SigningAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec((Amazon.KeyManagementService.SigningAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(value); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S13_VerifyRequest__M11_GrantTokens(Wrappers_Compile._IOption>> value) { @@ -5257,8 +5257,8 @@ public static Amazon.KeyManagementService.Model.GrantConstraints FromDafny_N3_co public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantConstraints ToDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints(Amazon.KeyManagementService.Model.GrantConstraints value) { - System.Collections.Generic.Dictionary var_encryptionContextSubset = (System.Collections.Generic.Dictionary)value.EncryptionContextSubset; - System.Collections.Generic.Dictionary var_encryptionContextEquals = (System.Collections.Generic.Dictionary)value.EncryptionContextEquals; + System.Collections.Generic.Dictionary var_encryptionContextSubset = value.EncryptionContextSubset; + System.Collections.Generic.Dictionary var_encryptionContextEquals = value.EncryptionContextEquals; return new software.amazon.cryptography.services.kms.internaldafny.types.GrantConstraints(ToDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints__M23_EncryptionContextSubset(var_encryptionContextSubset), ToDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints__M23_EncryptionContextEquals(var_encryptionContextEquals)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenList(Dafny.ISequence> value) @@ -5372,30 +5372,30 @@ public static Amazon.KeyManagementService.Model.KeyMetadata FromDafny_N3_com__N9 public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyMetadata ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata(Amazon.KeyManagementService.Model.KeyMetadata value) { - string var_aWSAccountId = (string)value.AWSAccountId; - string var_arn = (string)value.Arn; - System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; - bool? var_enabled = (bool?)value.Enabled; - string var_description = (string)value.Description; - Amazon.KeyManagementService.KeyUsageType var_keyUsage = (Amazon.KeyManagementService.KeyUsageType)value.KeyUsage; - Amazon.KeyManagementService.KeyState var_keyState = (Amazon.KeyManagementService.KeyState)value.KeyState; - System.DateTime? var_deletionDate = (System.DateTime?)value.DeletionDate; - System.DateTime? var_validTo = (System.DateTime?)value.ValidTo; - Amazon.KeyManagementService.OriginType var_origin = (Amazon.KeyManagementService.OriginType)value.Origin; - string var_customKeyStoreId = (string)value.CustomKeyStoreId; - string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; - Amazon.KeyManagementService.ExpirationModelType var_expirationModel = (Amazon.KeyManagementService.ExpirationModelType)value.ExpirationModel; - Amazon.KeyManagementService.KeyManagerType var_keyManager = (Amazon.KeyManagementService.KeyManagerType)value.KeyManager; - Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = (Amazon.KeyManagementService.CustomerMasterKeySpec)value.CustomerMasterKeySpec; - Amazon.KeyManagementService.KeySpec var_keySpec = (Amazon.KeyManagementService.KeySpec)value.KeySpec; - System.Collections.Generic.List var_encryptionAlgorithms = (System.Collections.Generic.List)value.EncryptionAlgorithms; - System.Collections.Generic.List var_signingAlgorithms = (System.Collections.Generic.List)value.SigningAlgorithms; - System.Collections.Generic.List var_keyAgreementAlgorithms = (System.Collections.Generic.List)value.KeyAgreementAlgorithms; - bool? var_multiRegion = (bool?)value.MultiRegion; - Amazon.KeyManagementService.Model.MultiRegionConfiguration var_multiRegionConfiguration = (Amazon.KeyManagementService.Model.MultiRegionConfiguration)value.MultiRegionConfiguration; - int? var_pendingDeletionWindowInDays = (int?)value.PendingDeletionWindowInDays; - System.Collections.Generic.List var_macAlgorithms = (System.Collections.Generic.List)value.MacAlgorithms; - Amazon.KeyManagementService.Model.XksKeyConfigurationType var_xksKeyConfiguration = (Amazon.KeyManagementService.Model.XksKeyConfigurationType)value.XksKeyConfiguration; + string var_aWSAccountId = value.AWSAccountId; + string var_arn = value.Arn; + System.DateTime? var_creationDate = value.CreationDate; + bool? var_enabled = value.Enabled; + string var_description = value.Description; + Amazon.KeyManagementService.KeyUsageType var_keyUsage = value.KeyUsage; + Amazon.KeyManagementService.KeyState var_keyState = value.KeyState; + System.DateTime? var_deletionDate = value.DeletionDate; + System.DateTime? var_validTo = value.ValidTo; + Amazon.KeyManagementService.OriginType var_origin = value.Origin; + string var_customKeyStoreId = value.CustomKeyStoreId; + string var_cloudHsmClusterId = value.CloudHsmClusterId; + Amazon.KeyManagementService.ExpirationModelType var_expirationModel = value.ExpirationModel; + Amazon.KeyManagementService.KeyManagerType var_keyManager = value.KeyManager; + Amazon.KeyManagementService.CustomerMasterKeySpec var_customerMasterKeySpec = value.CustomerMasterKeySpec; + Amazon.KeyManagementService.KeySpec var_keySpec = value.KeySpec; + System.Collections.Generic.List var_encryptionAlgorithms = value.EncryptionAlgorithms; + System.Collections.Generic.List var_signingAlgorithms = value.SigningAlgorithms; + System.Collections.Generic.List var_keyAgreementAlgorithms = value.KeyAgreementAlgorithms; + bool? var_multiRegion = value.MultiRegion; + Amazon.KeyManagementService.Model.MultiRegionConfiguration var_multiRegionConfiguration = value.MultiRegionConfiguration; + int? var_pendingDeletionWindowInDays = value.PendingDeletionWindowInDays; + System.Collections.Generic.List var_macAlgorithms = value.MacAlgorithms; + Amazon.KeyManagementService.Model.XksKeyConfigurationType var_xksKeyConfiguration = value.XksKeyConfiguration; return new software.amazon.cryptography.services.kms.internaldafny.types.KeyMetadata(ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_AWSAccountId(var_aWSAccountId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M5_KeyId(value.KeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M3_Arn(var_arn), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M7_Enabled(var_enabled), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M11_Description(var_description), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M8_KeyUsage(var_keyUsage), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M8_KeyState(var_keyState), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_DeletionDate(var_deletionDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M7_ValidTo(var_validTo), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M6_Origin(var_origin), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M15_ExpirationModel(var_expirationModel), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M10_KeyManager(var_keyManager), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M21_CustomerMasterKeySpec(var_customerMasterKeySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M7_KeySpec(var_keySpec), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M20_EncryptionAlgorithms(var_encryptionAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M17_SigningAlgorithms(var_signingAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M22_KeyAgreementAlgorithms(var_keyAgreementAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M11_MultiRegion(var_multiRegion), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M24_MultiRegionConfiguration(var_multiRegionConfiguration), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M27_PendingDeletionWindowInDays(var_pendingDeletionWindowInDays), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M13_MacAlgorithms(var_macAlgorithms), ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M19_XksKeyConfiguration(var_xksKeyConfiguration)); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S14_CiphertextType(Dafny.ISequence value) @@ -5429,8 +5429,8 @@ public static Amazon.KeyManagementService.Model.RecipientInfo FromDafny_N3_com__ public static software.amazon.cryptography.services.kms.internaldafny.types._IRecipientInfo ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo(Amazon.KeyManagementService.Model.RecipientInfo value) { - Amazon.KeyManagementService.KeyEncryptionMechanism var_keyEncryptionAlgorithm = (Amazon.KeyManagementService.KeyEncryptionMechanism)value.KeyEncryptionAlgorithm; - System.IO.MemoryStream var_attestationDocument = (System.IO.MemoryStream)value.AttestationDocument; + Amazon.KeyManagementService.KeyEncryptionMechanism var_keyEncryptionAlgorithm = value.KeyEncryptionAlgorithm; + System.IO.MemoryStream var_attestationDocument = value.AttestationDocument; return new software.amazon.cryptography.services.kms.internaldafny.types.RecipientInfo(ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo__M22_KeyEncryptionAlgorithm(var_keyEncryptionAlgorithm), ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo__M19_AttestationDocument(var_attestationDocument)); } public static System.IO.MemoryStream FromDafny_N3_com__N9_amazonaws__N3_kms__S13_PlaintextType(Dafny.ISequence value) @@ -5613,7 +5613,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthent } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthenticationCredentialType__M11_AccessKeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyAuthenticationAccessKeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyAuthenticationAccessKeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthenticationCredentialType__M18_RawSecretAccessKey(Dafny.ISequence value) { @@ -5621,7 +5621,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthent } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S36_XksProxyAuthenticationCredentialType__M18_RawSecretAccessKey(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S44_XksProxyAuthenticationRawSecretAccessKeyType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S44_XksProxyAuthenticationRawSecretAccessKeyType(value); } public static Amazon.KeyManagementService.GrantOperation FromDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IGrantOperation value) { @@ -5629,7 +5629,7 @@ public static Amazon.KeyManagementService.GrantOperation FromDafny_N3_com__N9_am } public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantOperation ToDafny_N3_com__N9_amazonaws__N3_kms__S18_GrantOperationList__M6_member(Amazon.KeyManagementService.GrantOperation value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantOperation((Amazon.KeyManagementService.GrantOperation)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantOperation(value); } public static System.Collections.Generic.Dictionary FromDafny_N3_com__N9_amazonaws__N3_kms__S16_GrantConstraints__M23_EncryptionContextSubset(Wrappers_Compile._IOption, Dafny.ISequence>> value) { @@ -5653,7 +5653,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenList_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantTokenType(value); } public static Amazon.KeyManagementService.Model.Tag FromDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._ITag value) { @@ -5661,7 +5661,7 @@ public static Amazon.KeyManagementService.Model.Tag FromDafny_N3_com__N9_amazona } public static software.amazon.cryptography.services.kms.internaldafny.types._ITag ToDafny_N3_com__N9_amazonaws__N3_kms__S7_TagList__M6_member(Amazon.KeyManagementService.Model.Tag value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag((Amazon.KeyManagementService.Model.Tag)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M12_AWSAccountId(Wrappers_Compile._IOption> value) { @@ -5677,7 +5677,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M5 } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M5_KeyId(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S9_KeyIdType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S11_KeyMetadata__M3_Arn(Wrappers_Compile._IOption> value) { @@ -5869,7 +5869,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionConte } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionContextType__M3_key(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_EncryptionContextKey((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_EncryptionContextKey(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionContextType__M5_value(Dafny.ISequence value) { @@ -5877,7 +5877,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionConte } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S21_EncryptionContextType__M5_value(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_EncryptionContextValue((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S22_EncryptionContextValue(value); } public static Amazon.KeyManagementService.KeyEncryptionMechanism FromDafny_N3_com__N9_amazonaws__N3_kms__S13_RecipientInfo__M22_KeyEncryptionAlgorithm(Wrappers_Compile._IOption value) { @@ -5901,7 +5901,7 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoresListEntry FromDaf } public static software.amazon.cryptography.services.kms.internaldafny.types._ICustomKeyStoresListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S19_CustomKeyStoresList__M6_member(Amazon.KeyManagementService.Model.CustomKeyStoresListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry((Amazon.KeyManagementService.Model.CustomKeyStoresListEntry)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry(value); } public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S27_EncryptionAlgorithmSpecList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec value) { @@ -5909,7 +5909,7 @@ public static Amazon.KeyManagementService.EncryptionAlgorithmSpec FromDafny_N3_c } public static software.amazon.cryptography.services.kms.internaldafny.types._IEncryptionAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S27_EncryptionAlgorithmSpecList__M6_member(Amazon.KeyManagementService.EncryptionAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec((Amazon.KeyManagementService.EncryptionAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S23_EncryptionAlgorithmSpec(value); } public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S24_SigningAlgorithmSpecList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec value) { @@ -5917,7 +5917,7 @@ public static Amazon.KeyManagementService.SigningAlgorithmSpec FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._ISigningAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S24_SigningAlgorithmSpecList__M6_member(Amazon.KeyManagementService.SigningAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec((Amazon.KeyManagementService.SigningAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S20_SigningAlgorithmSpec(value); } public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3_com__N9_amazonaws__N3_kms__S29_KeyAgreementAlgorithmSpecList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec value) { @@ -5925,7 +5925,7 @@ public static Amazon.KeyManagementService.KeyAgreementAlgorithmSpec FromDafny_N3 } public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyAgreementAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S29_KeyAgreementAlgorithmSpecList__M6_member(Amazon.KeyManagementService.KeyAgreementAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec((Amazon.KeyManagementService.KeyAgreementAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S25_KeyAgreementAlgorithmSpec(value); } public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S9_AliasList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry value) { @@ -5933,7 +5933,7 @@ public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S9_AliasList__M6_member(Amazon.KeyManagementService.Model.AliasListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry((Amazon.KeyManagementService.Model.AliasListEntry)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry(value); } public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S9_GrantList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry value) { @@ -5941,7 +5941,7 @@ public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S9_GrantList__M6_member(Amazon.KeyManagementService.Model.GrantListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry((Amazon.KeyManagementService.Model.GrantListEntry)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameList__M6_member(Dafny.ISequence value) { @@ -5949,7 +5949,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameList_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_PolicyNameType(value); } public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S13_RotationsList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry value) { @@ -5957,7 +5957,7 @@ public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S13_RotationsList__M6_member(Amazon.KeyManagementService.Model.RotationsListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry((Amazon.KeyManagementService.Model.RotationsListEntry)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry(value); } public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S7_KeyList__M6_member(software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry value) { @@ -5965,7 +5965,7 @@ public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N } public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S7_KeyList__M6_member(Amazon.KeyManagementService.Model.KeyListEntry value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry((Amazon.KeyManagementService.Model.KeyListEntry)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList__M6_member(Dafny.ISequence value) { @@ -5973,7 +5973,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList__M6_ } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyList__M6_member(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S37_XksProxyAuthenticationAccessKeyIdType(Dafny.ISequence value) { @@ -6027,9 +6027,9 @@ public static Amazon.KeyManagementService.Model.MultiRegionConfiguration FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._IMultiRegionConfiguration ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration(Amazon.KeyManagementService.Model.MultiRegionConfiguration value) { - Amazon.KeyManagementService.MultiRegionKeyType var_multiRegionKeyType = (Amazon.KeyManagementService.MultiRegionKeyType)value.MultiRegionKeyType; - Amazon.KeyManagementService.Model.MultiRegionKey var_primaryKey = (Amazon.KeyManagementService.Model.MultiRegionKey)value.PrimaryKey; - System.Collections.Generic.List var_replicaKeys = (System.Collections.Generic.List)value.ReplicaKeys; + Amazon.KeyManagementService.MultiRegionKeyType var_multiRegionKeyType = value.MultiRegionKeyType; + Amazon.KeyManagementService.Model.MultiRegionKey var_primaryKey = value.PrimaryKey; + System.Collections.Generic.List var_replicaKeys = value.ReplicaKeys; return new software.amazon.cryptography.services.kms.internaldafny.types.MultiRegionConfiguration(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M18_MultiRegionKeyType(var_multiRegionKeyType), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M10_PrimaryKey(var_primaryKey), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M11_ReplicaKeys(var_replicaKeys)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S20_MacAlgorithmSpecList(Dafny.ISequence value) @@ -6047,7 +6047,7 @@ public static Amazon.KeyManagementService.Model.XksKeyConfigurationType FromDafn public static software.amazon.cryptography.services.kms.internaldafny.types._IXksKeyConfigurationType ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyConfigurationType(Amazon.KeyManagementService.Model.XksKeyConfigurationType value) { - string var_id = (string)value.Id; + string var_id = value.Id; return new software.amazon.cryptography.services.kms.internaldafny.types.XksKeyConfigurationType(ToDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyConfigurationType__M2_Id(var_id)); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S20_EncryptionContextKey(Dafny.ISequence value) @@ -6094,15 +6094,15 @@ public static Amazon.KeyManagementService.Model.CustomKeyStoresListEntry FromDaf public static software.amazon.cryptography.services.kms.internaldafny.types._ICustomKeyStoresListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry(Amazon.KeyManagementService.Model.CustomKeyStoresListEntry value) { - string var_customKeyStoreId = (string)value.CustomKeyStoreId; - string var_customKeyStoreName = (string)value.CustomKeyStoreName; - string var_cloudHsmClusterId = (string)value.CloudHsmClusterId; - string var_trustAnchorCertificate = (string)value.TrustAnchorCertificate; - Amazon.KeyManagementService.ConnectionStateType var_connectionState = (Amazon.KeyManagementService.ConnectionStateType)value.ConnectionState; - Amazon.KeyManagementService.ConnectionErrorCodeType var_connectionErrorCode = (Amazon.KeyManagementService.ConnectionErrorCodeType)value.ConnectionErrorCode; - System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; - Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = (Amazon.KeyManagementService.CustomKeyStoreType)value.CustomKeyStoreType; - Amazon.KeyManagementService.Model.XksProxyConfigurationType var_xksProxyConfiguration = (Amazon.KeyManagementService.Model.XksProxyConfigurationType)value.XksProxyConfiguration; + string var_customKeyStoreId = value.CustomKeyStoreId; + string var_customKeyStoreName = value.CustomKeyStoreName; + string var_cloudHsmClusterId = value.CloudHsmClusterId; + string var_trustAnchorCertificate = value.TrustAnchorCertificate; + Amazon.KeyManagementService.ConnectionStateType var_connectionState = value.ConnectionState; + Amazon.KeyManagementService.ConnectionErrorCodeType var_connectionErrorCode = value.ConnectionErrorCode; + System.DateTime? var_creationDate = value.CreationDate; + Amazon.KeyManagementService.CustomKeyStoreType var_customKeyStoreType = value.CustomKeyStoreType; + Amazon.KeyManagementService.Model.XksProxyConfigurationType var_xksProxyConfiguration = value.XksProxyConfiguration; return new software.amazon.cryptography.services.kms.internaldafny.types.CustomKeyStoresListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M16_CustomKeyStoreId(var_customKeyStoreId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M18_CustomKeyStoreName(var_customKeyStoreName), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M17_CloudHsmClusterId(var_cloudHsmClusterId), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M22_TrustAnchorCertificate(var_trustAnchorCertificate), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M15_ConnectionState(var_connectionState), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M19_ConnectionErrorCode(var_connectionErrorCode), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M18_CustomKeyStoreType(var_customKeyStoreType), ToDafny_N3_com__N9_amazonaws__N3_kms__S24_CustomKeyStoresListEntry__M21_XksProxyConfiguration(var_xksProxyConfiguration)); } public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry value) @@ -6116,11 +6116,11 @@ public static Amazon.KeyManagementService.Model.AliasListEntry FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IAliasListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry(Amazon.KeyManagementService.Model.AliasListEntry value) { - string var_aliasName = (string)value.AliasName; - string var_aliasArn = (string)value.AliasArn; - string var_targetKeyId = (string)value.TargetKeyId; - System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; - System.DateTime? var_lastUpdatedDate = (System.DateTime?)value.LastUpdatedDate; + string var_aliasName = value.AliasName; + string var_aliasArn = value.AliasArn; + string var_targetKeyId = value.TargetKeyId; + System.DateTime? var_creationDate = value.CreationDate; + System.DateTime? var_lastUpdatedDate = value.LastUpdatedDate; return new software.amazon.cryptography.services.kms.internaldafny.types.AliasListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M9_AliasName(var_aliasName), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M8_AliasArn(var_aliasArn), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M11_TargetKeyId(var_targetKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_AliasListEntry__M15_LastUpdatedDate(var_lastUpdatedDate)); } public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry value) @@ -6138,15 +6138,15 @@ public static Amazon.KeyManagementService.Model.GrantListEntry FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IGrantListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry(Amazon.KeyManagementService.Model.GrantListEntry value) { - string var_keyId = (string)value.KeyId; - string var_grantId = (string)value.GrantId; - string var_name = (string)value.Name; - System.DateTime? var_creationDate = (System.DateTime?)value.CreationDate; - string var_granteePrincipal = (string)value.GranteePrincipal; - string var_retiringPrincipal = (string)value.RetiringPrincipal; - string var_issuingAccount = (string)value.IssuingAccount; - System.Collections.Generic.List var_operations = (System.Collections.Generic.List)value.Operations; - Amazon.KeyManagementService.Model.GrantConstraints var_constraints = (Amazon.KeyManagementService.Model.GrantConstraints)value.Constraints; + string var_keyId = value.KeyId; + string var_grantId = value.GrantId; + string var_name = value.Name; + System.DateTime? var_creationDate = value.CreationDate; + string var_granteePrincipal = value.GranteePrincipal; + string var_retiringPrincipal = value.RetiringPrincipal; + string var_issuingAccount = value.IssuingAccount; + System.Collections.Generic.List var_operations = value.Operations; + Amazon.KeyManagementService.Model.GrantConstraints var_constraints = value.Constraints; return new software.amazon.cryptography.services.kms.internaldafny.types.GrantListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M7_GrantId(var_grantId), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M4_Name(var_name), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M12_CreationDate(var_creationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M16_GranteePrincipal(var_granteePrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M17_RetiringPrincipal(var_retiringPrincipal), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M14_IssuingAccount(var_issuingAccount), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M10_Operations(var_operations), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_GrantListEntry__M11_Constraints(var_constraints)); } public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry value) @@ -6158,9 +6158,9 @@ public static Amazon.KeyManagementService.Model.RotationsListEntry FromDafny_N3_ public static software.amazon.cryptography.services.kms.internaldafny.types._IRotationsListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry(Amazon.KeyManagementService.Model.RotationsListEntry value) { - string var_keyId = (string)value.KeyId; - System.DateTime? var_rotationDate = (System.DateTime?)value.RotationDate; - Amazon.KeyManagementService.RotationType var_rotationType = (Amazon.KeyManagementService.RotationType)value.RotationType; + string var_keyId = value.KeyId; + System.DateTime? var_rotationDate = value.RotationDate; + Amazon.KeyManagementService.RotationType var_rotationType = value.RotationType; return new software.amazon.cryptography.services.kms.internaldafny.types.RotationsListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry__M12_RotationDate(var_rotationDate), ToDafny_N3_com__N9_amazonaws__N3_kms__S18_RotationsListEntry__M12_RotationType(var_rotationType)); } public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry(software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry value) @@ -6171,8 +6171,8 @@ public static Amazon.KeyManagementService.Model.KeyListEntry FromDafny_N3_com__N public static software.amazon.cryptography.services.kms.internaldafny.types._IKeyListEntry ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry(Amazon.KeyManagementService.Model.KeyListEntry value) { - string var_keyId = (string)value.KeyId; - string var_keyArn = (string)value.KeyArn; + string var_keyId = value.KeyId; + string var_keyArn = value.KeyArn; return new software.amazon.cryptography.services.kms.internaldafny.types.KeyListEntry(ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry__M5_KeyId(var_keyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S12_KeyListEntry__M6_KeyArn(var_keyArn)); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType(Dafny.ISequence value) @@ -6189,7 +6189,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M6_TagKey(D } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M6_TagKey(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S10_TagKeyType(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M8_TagValue(Dafny.ISequence value) { @@ -6197,7 +6197,7 @@ public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M8_TagValue } public static Dafny.ISequence ToDafny_N3_com__N9_amazonaws__N3_kms__S3_Tag__M8_TagValue(string value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagValueType((string)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S12_TagValueType(value); } public static Amazon.KeyManagementService.MultiRegionKeyType FromDafny_N3_com__N9_amazonaws__N3_kms__S24_MultiRegionConfiguration__M18_MultiRegionKeyType(Wrappers_Compile._IOption value) { @@ -6229,7 +6229,7 @@ public static Amazon.KeyManagementService.MacAlgorithmSpec FromDafny_N3_com__N9_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMacAlgorithmSpec ToDafny_N3_com__N9_amazonaws__N3_kms__S20_MacAlgorithmSpecList__M6_member(Amazon.KeyManagementService.MacAlgorithmSpec value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec((Amazon.KeyManagementService.MacAlgorithmSpec)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S16_MacAlgorithmSpec(value); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S23_XksKeyConfigurationType__M2_Id(Wrappers_Compile._IOption> value) { @@ -6479,8 +6479,8 @@ public static Amazon.KeyManagementService.Model.MultiRegionKey FromDafny_N3_com_ public static software.amazon.cryptography.services.kms.internaldafny.types._IMultiRegionKey ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey(Amazon.KeyManagementService.Model.MultiRegionKey value) { - string var_arn = (string)value.Arn; - string var_region = (string)value.Region; + string var_arn = value.Arn; + string var_region = value.Region; return new software.amazon.cryptography.services.kms.internaldafny.types.MultiRegionKey(ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey__M3_Arn(var_arn), ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey__M6_Region(var_region)); } public static System.Collections.Generic.List FromDafny_N3_com__N9_amazonaws__N3_kms__S18_MultiRegionKeyList(Dafny.ISequence value) @@ -6502,11 +6502,11 @@ public static Amazon.KeyManagementService.Model.XksProxyConfigurationType FromDa public static software.amazon.cryptography.services.kms.internaldafny.types._IXksProxyConfigurationType ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType(Amazon.KeyManagementService.Model.XksProxyConfigurationType value) { - Amazon.KeyManagementService.XksProxyConnectivityType var_connectivity = (Amazon.KeyManagementService.XksProxyConnectivityType)value.Connectivity; - string var_accessKeyId = (string)value.AccessKeyId; - string var_uriEndpoint = (string)value.UriEndpoint; - string var_uriPath = (string)value.UriPath; - string var_vpcEndpointServiceName = (string)value.VpcEndpointServiceName; + Amazon.KeyManagementService.XksProxyConnectivityType var_connectivity = value.Connectivity; + string var_accessKeyId = value.AccessKeyId; + string var_uriEndpoint = value.UriEndpoint; + string var_uriPath = value.UriPath; + string var_vpcEndpointServiceName = value.VpcEndpointServiceName; return new software.amazon.cryptography.services.kms.internaldafny.types.XksProxyConfigurationType(ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M12_Connectivity(var_connectivity), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M11_AccessKeyId(var_accessKeyId), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M11_UriEndpoint(var_uriEndpoint), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M7_UriPath(var_uriPath), ToDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M22_VpcEndpointServiceName(var_vpcEndpointServiceName)); } public static string FromDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey__M3_Arn(Wrappers_Compile._IOption> value) @@ -6531,7 +6531,7 @@ public static Amazon.KeyManagementService.Model.MultiRegionKey FromDafny_N3_com_ } public static software.amazon.cryptography.services.kms.internaldafny.types._IMultiRegionKey ToDafny_N3_com__N9_amazonaws__N3_kms__S18_MultiRegionKeyList__M6_member(Amazon.KeyManagementService.Model.MultiRegionKey value) { - return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey((Amazon.KeyManagementService.Model.MultiRegionKey)value); + return ToDafny_N3_com__N9_amazonaws__N3_kms__S14_MultiRegionKey(value); } public static Amazon.KeyManagementService.XksProxyConnectivityType FromDafny_N3_com__N9_amazonaws__N3_kms__S25_XksProxyConfigurationType__M12_Connectivity(Wrappers_Compile._IOption value) { From 7d7239c372aba6085bfa5427a70b049738055149 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Fri, 16 May 2025 09:54:06 -0700 Subject: [PATCH 11/48] m --- .../internaldafny/extern/DafnyLibraries.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py index d20779c51f..2cd230b3de 100644 --- a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py +++ b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py @@ -26,6 +26,9 @@ def Unlock(self): class MutableMap(smithy_dafny_standard_library.internaldafny.generated.DafnyLibraries.MutableMapTrait): def ctor__(self): pass + + def content(self): + return self.map def __init__(self) -> None: self.map = dict() From 424e347029fbf8fb686a5a814010115ae26c4596 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Fri, 16 May 2025 09:55:12 -0700 Subject: [PATCH 12/48] m --- .../internaldafny/extern/DafnyLibraries.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py index 2cd230b3de..85edb33757 100644 --- a/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py +++ b/StandardLibrary/runtimes/python/src/smithy_dafny_standard_library/internaldafny/extern/DafnyLibraries.py @@ -28,7 +28,7 @@ def ctor__(self): pass def content(self): - return self.map + return _dafny.Map(self.map) def __init__(self) -> None: self.map = dict() From 06eab8d8ae76d2f435b08746782764ddbd587e61 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 20 May 2025 16:24:56 -0700 Subject: [PATCH 13/48] m --- smithy-dafny | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithy-dafny b/smithy-dafny index 68f9667b87..ef3841d619 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit 68f9667b87eec1e63c15858b76fe6db9218b5d79 +Subproject commit ef3841d61920bfc917d052a6a1a6f92d01b861e9 From 81753a2958ba440b51f2ba84b687a4c48a91ec3a Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Wed, 21 May 2025 20:30:29 -0700 Subject: [PATCH 14/48] Java 17 for codegen --- .github/workflows/library_go_tests.yml | 6 ++++++ .github/workflows/library_java_tests.yml | 6 ++++++ .github/workflows/library_net_tests.yml | 6 ++++++ .github/workflows/library_rust_tests.yml | 2 +- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/library_go_tests.yml b/.github/workflows/library_go_tests.yml index 9406872b89..4659c2dac7 100644 --- a/.github/workflows/library_go_tests.yml +++ b/.github/workflows/library_go_tests.yml @@ -68,6 +68,12 @@ jobs: with: dafny-version: ${{ inputs.dafny }} + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 + with: + distribution: "corretto" + java-version: "17" + - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/library_java_tests.yml b/.github/workflows/library_java_tests.yml index b5b9ca72cd..779b1bf365 100644 --- a/.github/workflows/library_java_tests.yml +++ b/.github/workflows/library_java_tests.yml @@ -65,6 +65,12 @@ jobs: with: dafny-version: ${{ inputs.dafny }} + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 + with: + distribution: "corretto" + java-version: "17" + - name: Install Smithy-Dafny codegen dependencies if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index 104e5adc22..42a3a3cd2c 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -68,6 +68,12 @@ jobs: with: dafny-version: ${{ inputs.dafny }} + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 + with: + distribution: "corretto" + java-version: "17" + - name: Install Smithy-Dafny codegen dependencies if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index 525e2de172..8cc0b198e9 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -62,7 +62,7 @@ jobs: - name: Setup Dafny uses: ./.github/actions/setup_dafny with: - dafny-version: nightly-2025-01-30-7db1e5f + dafny-version: ${{ inputs.dafny }} - name: Setup Java 17 for codegen uses: actions/setup-java@v3 From 4d98dc339f4d2cddf09e87e31ca2b4dbc3c7772c Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 22 May 2025 09:34:48 -0700 Subject: [PATCH 15/48] m --- .../boto3_conversions.py | 115 +++++++++--------- .../smithygenerated/com_amazonaws_kms/shim.py | 6 +- .../models.py | 4 +- smithy-dafny | 2 +- 4 files changed, 65 insertions(+), 62 deletions(-) diff --git a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py index 7009fb998e..aa532ee895 100644 --- a/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py +++ b/ComAmazonawsDynamodb/runtimes/python/src/aws_cryptography_internal_dynamodb/smithygenerated/com_amazonaws_dynamodb/boto3_conversions.py @@ -3,6 +3,7 @@ # Do not modify this file. This file is machine generated, and any changes to it will be overwritten. import aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter +from copy import deepcopy class InternalBoto3DynamoDBFormatConverter: @@ -19,7 +20,7 @@ def BatchExecuteStatementInput(self, boto3_input) -> dict: ) def BatchExecuteStatementOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchExecuteStatementOutput( @@ -35,7 +36,7 @@ def BatchGetItemInput(self, boto3_input) -> dict: ) def BatchGetItemOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchGetItemOutput( @@ -51,7 +52,7 @@ def BatchWriteItemInput(self, boto3_input) -> dict: ) def BatchWriteItemOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_BatchWriteItemOutput( @@ -67,7 +68,7 @@ def CreateBackupInput(self, boto3_input) -> dict: ) def CreateBackupOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateBackupOutput( @@ -83,7 +84,7 @@ def CreateGlobalTableInput(self, boto3_input) -> dict: ) def CreateGlobalTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateGlobalTableOutput( @@ -99,7 +100,7 @@ def CreateTableInput(self, boto3_input) -> dict: ) def CreateTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_CreateTableOutput( @@ -115,7 +116,7 @@ def DeleteBackupInput(self, boto3_input) -> dict: ) def DeleteBackupOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteBackupOutput( @@ -131,7 +132,7 @@ def DeleteItemInput(self, boto3_input) -> dict: ) def DeleteItemOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteItemOutput( @@ -147,7 +148,7 @@ def DeleteResourcePolicyInput(self, boto3_input) -> dict: ) def DeleteResourcePolicyOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteResourcePolicyOutput( @@ -163,7 +164,7 @@ def DeleteTableInput(self, boto3_input) -> dict: ) def DeleteTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DeleteTableOutput( @@ -179,7 +180,7 @@ def DescribeBackupInput(self, boto3_input) -> dict: ) def DescribeBackupOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeBackupOutput( @@ -195,7 +196,7 @@ def DescribeContinuousBackupsInput(self, boto3_input) -> dict: ) def DescribeContinuousBackupsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeContinuousBackupsOutput( @@ -211,7 +212,7 @@ def DescribeContributorInsightsInput(self, boto3_input) -> dict: ) def DescribeContributorInsightsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeContributorInsightsOutput( @@ -227,7 +228,7 @@ def DescribeEndpointsRequest(self, boto3_input) -> dict: ) def DescribeEndpointsResponse(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeEndpointsResponse( @@ -243,7 +244,7 @@ def DescribeExportInput(self, boto3_input) -> dict: ) def DescribeExportOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeExportOutput( @@ -259,7 +260,7 @@ def DescribeGlobalTableInput(self, boto3_input) -> dict: ) def DescribeGlobalTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeGlobalTableOutput( @@ -275,7 +276,7 @@ def DescribeGlobalTableSettingsInput(self, boto3_input) -> dict: ) def DescribeGlobalTableSettingsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeGlobalTableSettingsOutput( @@ -291,7 +292,7 @@ def DescribeImportInput(self, boto3_input) -> dict: ) def DescribeImportOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeImportOutput( @@ -307,7 +308,7 @@ def DescribeKinesisStreamingDestinationInput(self, boto3_input) -> dict: ) def DescribeKinesisStreamingDestinationOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeKinesisStreamingDestinationOutput( @@ -323,7 +324,7 @@ def DescribeLimitsInput(self, boto3_input) -> dict: ) def DescribeLimitsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeLimitsOutput( @@ -339,7 +340,7 @@ def DescribeTableInput(self, boto3_input) -> dict: ) def DescribeTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTableOutput( @@ -355,7 +356,7 @@ def DescribeTableReplicaAutoScalingInput(self, boto3_input) -> dict: ) def DescribeTableReplicaAutoScalingOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTableReplicaAutoScalingOutput( @@ -371,7 +372,7 @@ def DescribeTimeToLiveInput(self, boto3_input) -> dict: ) def DescribeTimeToLiveOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DescribeTimeToLiveOutput( @@ -387,7 +388,7 @@ def DisableKinesisStreamingDestinationInput(self, boto3_input) -> dict: ) def DisableKinesisStreamingDestinationOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_DisableKinesisStreamingDestinationOutput( @@ -403,7 +404,7 @@ def EnableKinesisStreamingDestinationInput(self, boto3_input) -> dict: ) def EnableKinesisStreamingDestinationOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_EnableKinesisStreamingDestinationOutput( @@ -419,7 +420,7 @@ def ExecuteStatementInput(self, boto3_input) -> dict: ) def ExecuteStatementOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExecuteStatementOutput( @@ -435,7 +436,7 @@ def ExecuteTransactionInput(self, boto3_input) -> dict: ) def ExecuteTransactionOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExecuteTransactionOutput( @@ -451,7 +452,7 @@ def ExportTableToPointInTimeInput(self, boto3_input) -> dict: ) def ExportTableToPointInTimeOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ExportTableToPointInTimeOutput( @@ -467,7 +468,7 @@ def GetItemInput(self, boto3_input) -> dict: ) def GetItemOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GetItemOutput( @@ -483,7 +484,7 @@ def GetResourcePolicyInput(self, boto3_input) -> dict: ) def GetResourcePolicyOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_GetResourcePolicyOutput( @@ -499,7 +500,7 @@ def ImportTableInput(self, boto3_input) -> dict: ) def ImportTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ImportTableOutput( @@ -515,7 +516,7 @@ def ListBackupsInput(self, boto3_input) -> dict: ) def ListBackupsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListBackupsOutput( @@ -531,7 +532,7 @@ def ListContributorInsightsInput(self, boto3_input) -> dict: ) def ListContributorInsightsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListContributorInsightsOutput( @@ -547,7 +548,7 @@ def ListExportsInput(self, boto3_input) -> dict: ) def ListExportsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListExportsOutput( @@ -563,7 +564,7 @@ def ListGlobalTablesInput(self, boto3_input) -> dict: ) def ListGlobalTablesOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListGlobalTablesOutput( @@ -579,7 +580,7 @@ def ListImportsInput(self, boto3_input) -> dict: ) def ListImportsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListImportsOutput( @@ -595,7 +596,7 @@ def ListTablesInput(self, boto3_input) -> dict: ) def ListTablesOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListTablesOutput( @@ -611,7 +612,7 @@ def ListTagsOfResourceInput(self, boto3_input) -> dict: ) def ListTagsOfResourceOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ListTagsOfResourceOutput( @@ -627,7 +628,7 @@ def PutItemInput(self, boto3_input) -> dict: ) def PutItemOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutItemOutput( @@ -643,7 +644,7 @@ def PutResourcePolicyInput(self, boto3_input) -> dict: ) def PutResourcePolicyOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_PutResourcePolicyOutput( @@ -659,7 +660,7 @@ def QueryInput(self, boto3_input) -> dict: ) def QueryOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_QueryOutput( @@ -675,7 +676,7 @@ def RestoreTableFromBackupInput(self, boto3_input) -> dict: ) def RestoreTableFromBackupOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreTableFromBackupOutput( @@ -691,7 +692,7 @@ def RestoreTableToPointInTimeInput(self, boto3_input) -> dict: ) def RestoreTableToPointInTimeOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_RestoreTableToPointInTimeOutput( @@ -707,7 +708,7 @@ def ScanInput(self, boto3_input) -> dict: ) def ScanOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_ScanOutput( @@ -723,7 +724,7 @@ def TagResourceInput(self, boto3_input) -> dict: ) def Unit(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return None @@ -737,7 +738,7 @@ def TransactGetItemsInput(self, boto3_input) -> dict: ) def TransactGetItemsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactGetItemsOutput( @@ -753,7 +754,7 @@ def TransactWriteItemsInput(self, boto3_input) -> dict: ) def TransactWriteItemsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_TransactWriteItemsOutput( @@ -769,7 +770,7 @@ def UntagResourceInput(self, boto3_input) -> dict: ) def Unit(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return None @@ -783,7 +784,7 @@ def UpdateContinuousBackupsInput(self, boto3_input) -> dict: ) def UpdateContinuousBackupsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateContinuousBackupsOutput( @@ -799,7 +800,7 @@ def UpdateContributorInsightsInput(self, boto3_input) -> dict: ) def UpdateContributorInsightsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateContributorInsightsOutput( @@ -815,7 +816,7 @@ def UpdateGlobalTableInput(self, boto3_input) -> dict: ) def UpdateGlobalTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalTableOutput( @@ -831,7 +832,7 @@ def UpdateGlobalTableSettingsInput(self, boto3_input) -> dict: ) def UpdateGlobalTableSettingsOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateGlobalTableSettingsOutput( @@ -847,7 +848,7 @@ def UpdateItemInput(self, boto3_input) -> dict: ) def UpdateItemOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateItemOutput( @@ -863,7 +864,7 @@ def UpdateKinesisStreamingDestinationInput(self, boto3_input) -> dict: ) def UpdateKinesisStreamingDestinationOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateKinesisStreamingDestinationOutput( @@ -879,7 +880,7 @@ def UpdateTableInput(self, boto3_input) -> dict: ) def UpdateTableOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTableOutput( @@ -895,7 +896,7 @@ def UpdateTableReplicaAutoScalingInput(self, boto3_input) -> dict: ) def UpdateTableReplicaAutoScalingOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTableReplicaAutoScalingOutput( @@ -911,7 +912,7 @@ def UpdateTimeToLiveInput(self, boto3_input) -> dict: ) def UpdateTimeToLiveOutput(self, boto3_input) -> dict: - original_request = boto3_input + original_request = deepcopy(boto3_input) item_handler = self._item_handler condition_handler = self._condition_handler return aws_cryptography_internal_dynamodb.smithygenerated.com_amazonaws_dynamodb.aws_sdk_format_converter.com_amazonaws_dynamodb_UpdateTimeToLiveOutput( diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py index 79a83136c0..08f32bec9b 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py @@ -107,8 +107,10 @@ def _sdk_error_to_dafny_error(e: ClientError): - """Converts the provided native Smithy-modelled error into the - corresponding Dafny error.""" + """ + Converts the provided native Smithy-modelled error + into the corresponding Dafny error. + """ if e.response["Error"]["Code"] == "AlreadyExistsException": return aws_cryptography_internal_kms.smithygenerated.com_amazonaws_kms.aws_sdk_to_dafny.com_amazonaws_kms_AlreadyExistsException( e.response diff --git a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py index b3d7d9fcc3..7faf1161f9 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py +++ b/TestVectorsAwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptography_materialproviders_test_vectors/smithygenerated/aws_cryptography_materialproviderstestvectorkeys/models.py @@ -447,13 +447,13 @@ def __eq__(self, other: Any) -> bool: class KmsRsaKeyring: key_id: str - encryption_algorithm: dict[str, Any] + encryption_algorithm: str def __init__( self, *, key_id: str, - encryption_algorithm: dict[str, Any], + encryption_algorithm: str, ): self.key_id = key_id self.encryption_algorithm = encryption_algorithm diff --git a/smithy-dafny b/smithy-dafny index ef3841d619..d8ba2137b7 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit ef3841d61920bfc917d052a6a1a6f92d01b861e9 +Subproject commit d8ba2137b7ef85fdfda9a9a505e884e219630ac2 From 0515dc974d93577d296683d24b015b8bed61b7b9 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 22 May 2025 09:36:11 -0700 Subject: [PATCH 16/48] m --- .../aws_cryptography_keystore/config.py | 4 ++-- .../aws_cryptography_keystore/models.py | 12 ++++++------ .../aws_cryptography_materialproviders/models.py | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py index 3ea1005114..c79bcff34a 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/config.py @@ -55,7 +55,7 @@ def __init__( class KeyStoreConfig(Config): - ddb_table_name: dict[str, Any] + ddb_table_name: str kms_configuration: KMSConfiguration logical_key_store_name: str id: Optional[str] @@ -66,7 +66,7 @@ class KeyStoreConfig(Config): def __init__( self, *, - ddb_table_name: dict[str, Any], + ddb_table_name: str, kms_configuration: KMSConfiguration, logical_key_store_name: str, id: Optional[str] = None, diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py index 382fa332bd..04a8ec989e 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py @@ -280,12 +280,12 @@ def __eq__(self, other: Any) -> bool: class CreateKeyStoreOutput: - table_arn: dict[str, Any] + table_arn: str def __init__( self, *, - table_arn: dict[str, Any], + table_arn: str, ): """Outputs for Key Store DynamoDB table creation. @@ -640,12 +640,12 @@ def __eq__(self, other: Any) -> bool: class MRDiscovery: - region: dict[str, Any] + region: str def __init__( self, *, - region: dict[str, Any], + region: str, ): """ :param region: Any MRK ARN discovered will have its region replaced with this. @@ -881,7 +881,7 @@ def _kms_configuration_from_dict(d: Dict[str, Any]) -> KMSConfiguration: class GetKeyStoreInfoOutput: key_store_id: str - key_store_name: dict[str, Any] + key_store_name: str logical_key_store_name: str grant_tokens: list[str] kms_configuration: KMSConfiguration @@ -890,7 +890,7 @@ def __init__( self, *, key_store_id: str, - key_store_name: dict[str, Any], + key_store_name: str, logical_key_store_name: str, grant_tokens: list[str], kms_configuration: KMSConfiguration, diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py index 0ea76a3ebe..1202708e72 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_materialproviders/models.py @@ -3059,7 +3059,7 @@ def __eq__(self, other: Any) -> bool: class CreateAwsKmsRsaKeyringInput: public_key: Optional[bytes | bytearray] kms_key_id: str - encryption_algorithm: dict[str, Any] + encryption_algorithm: str kms_client: Optional[BaseClient] grant_tokens: Optional[list[str]] @@ -3067,7 +3067,7 @@ def __init__( self, *, kms_key_id: str, - encryption_algorithm: dict[str, Any], + encryption_algorithm: str, public_key: Optional[bytes | bytearray] = None, kms_client: Optional[BaseClient] = None, grant_tokens: Optional[list[str]] = None, From f3335165d6b9bdc4e1929c1656612e7827169a80 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 10:34:19 -0700 Subject: [PATCH 17/48] Clean up additional codegen dependencies --- .../action.yml | 19 +++++++++++++++++++ .github/actions/polymorph_codegen/action.yml | 6 ------ .github/workflows/library_java_tests.yml | 6 ------ .github/workflows/library_net_tests.yml | 6 ------ .github/workflows/library_rust_tests.yml | 6 ------ 5 files changed, 19 insertions(+), 24 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 809a321bd8..c7d2622744 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -30,3 +30,22 @@ runs: python -m pip install --upgrade pip python -m pip install --upgrade black python -m pip install --upgrade docformatter + + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 + with: + distribution: "corretto" + java-version: "17" + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Install Go imports + run: | + go install golang.org/x/tools/cmd/goimports@latest + + + + diff --git a/.github/actions/polymorph_codegen/action.yml b/.github/actions/polymorph_codegen/action.yml index 0c55cfc9e8..9518487dd6 100644 --- a/.github/actions/polymorph_codegen/action.yml +++ b/.github/actions/polymorph_codegen/action.yml @@ -46,12 +46,6 @@ outputs: runs: using: "composite" steps: - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/library_java_tests.yml b/.github/workflows/library_java_tests.yml index 779b1bf365..b5b9ca72cd 100644 --- a/.github/workflows/library_java_tests.yml +++ b/.github/workflows/library_java_tests.yml @@ -65,12 +65,6 @@ jobs: with: dafny-version: ${{ inputs.dafny }} - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - name: Install Smithy-Dafny codegen dependencies if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index 42a3a3cd2c..104e5adc22 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -68,12 +68,6 @@ jobs: with: dafny-version: ${{ inputs.dafny }} - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - name: Install Smithy-Dafny codegen dependencies if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index 8cc0b198e9..da2a1e4e2e 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -64,12 +64,6 @@ jobs: with: dafny-version: ${{ inputs.dafny }} - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' uses: ilammy/setup-nasm@v1 From 7d79fcbff829346908fc20500d301d99d39fb42e Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 22 May 2025 10:35:30 -0700 Subject: [PATCH 18/48] m --- .../smithygenerated/aws_cryptography_keystore/models.py | 4 ++-- smithy-dafny | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py index 04a8ec989e..665891aad1 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/models.py @@ -699,7 +699,7 @@ class KMSConfigurationKmsKeyArn: MUST strictly equal this value to be considered valid. """ - def __init__(self, value: "dict[str, Any]"): + def __init__(self, value: str): if (value is not None) and (len(value) < 1): raise ValueError("The size of value must be greater than or equal to 1") @@ -736,7 +736,7 @@ class KMSConfigurationKmsMRKeyArn: as kmsKeyArn. """ - def __init__(self, value: "dict[str, Any]"): + def __init__(self, value: str): if (value is not None) and (len(value) < 1): raise ValueError("The size of value must be greater than or equal to 1") diff --git a/smithy-dafny b/smithy-dafny index d8ba2137b7..36a49d0389 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit d8ba2137b7ef85fdfda9a9a505e884e219630ac2 +Subproject commit 36a49d0389d09fb449f72a5a3200252c97ad293c From 6c31404d24b460de2fe15fa0c351b14bcb5240bf Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 10:47:07 -0700 Subject: [PATCH 19/48] Tabs --- .../install_smithy_dafny_codegen_dependencies/action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index c7d2622744..821d76569e 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -38,9 +38,9 @@ runs: java-version: "17" - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} - name: Install Go imports run: | From 8bf936a5d50d0d3668d29f4e8ae5e2e2a18223b9 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 10:52:24 -0700 Subject: [PATCH 20/48] Shell --- .../actions/install_smithy_dafny_codegen_dependencies/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 821d76569e..46f934fd43 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -43,6 +43,7 @@ runs: go-version: ${{ matrix.go-version }} - name: Install Go imports + shell: bash run: | go install golang.org/x/tools/cmd/goimports@latest From 56f26b206d35b55e480a8e45c42ed74b3a9bddc1 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 11:01:53 -0700 Subject: [PATCH 21/48] Ordering --- .../action.yml | 12 ++++++------ .github/workflows/library_codegen.yml | 15 --------------- 2 files changed, 6 insertions(+), 21 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 46f934fd43..8746bf5e63 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -8,6 +8,12 @@ description: "Install Java package dependencies required to run Smithy-Dafny cod runs: using: "composite" steps: + - name: Setup Java 17 for codegen + uses: actions/setup-java@v3 + with: + distribution: "corretto" + java-version: "17" + - name: Install smithy-dafny-codegen Rust dependencies locally uses: gradle/gradle-build-action@v2 with: @@ -31,12 +37,6 @@ runs: python -m pip install --upgrade black python -m pip install --upgrade docformatter - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/library_codegen.yml b/.github/workflows/library_codegen.yml index 0a727b92e0..b4b7c60aac 100644 --- a/.github/workflows/library_codegen.yml +++ b/.github/workflows/library_codegen.yml @@ -66,21 +66,6 @@ jobs: - name: Create temporary global.json run: echo '{"sdk":{"rollForward":"latestFeature","version":"6.0.0"}}' > ./global.json - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - - name: Install Go imports - run: | - go install golang.org/x/tools/cmd/goimports@latest - - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies From d54b2fbfcdcee9def0c7986c6f2e411c5b651a76 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 11:12:56 -0700 Subject: [PATCH 22/48] Go version --- .../install_smithy_dafny_codegen_dependencies/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 8746bf5e63..c7629082d6 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -40,7 +40,7 @@ runs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: ${{ matrix.go-version }} + go-version: "1.23" - name: Install Go imports shell: bash From 5056984a299051e65a15db5ed6345086f0ea802e Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 12:23:11 -0700 Subject: [PATCH 23/48] =?UTF-8?q?Update=20smithy-dafny=20(to=20use=20?= =?UTF-8?q?=E2=80=94enforce-determinism)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- smithy-dafny | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithy-dafny b/smithy-dafny index 2f83e28ad9..36a8c87ec0 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit 2f83e28ad9532b24c93d2229476c9a268355d338 +Subproject commit 36a8c87ec0a02b9f095f805d550461a7654831f9 From 20240d05dbc732fc64ffb69b745f7d7a80065797 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 12:26:42 -0700 Subject: [PATCH 24/48] Fix dafny version in interop tests --- .github/workflows/library_interop_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index ecfffdde45..ea3697e2da 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -310,7 +310,7 @@ jobs: if: ${{ inputs.regenerate-code }} uses: ./.github/actions/polymorph_codegen with: - dafny: ${{ inputs.dafny }} + dafny: ${{ env.DAFNY_VERSION }} library: ${{ matrix.library }} diff-generated-code: false From 96df4a3d3aa84a82747550e96343ec6c64bcf5cd Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 22 May 2025 13:24:52 -0700 Subject: [PATCH 25/48] m --- .../internaldafny/extern/Com_Amazonaws_Kms.py | 27 ++++++++++++------- .../internaldafny/extern/__init__.py | 2 +- .../smithygenerated/com_amazonaws_kms/shim.py | 6 ++--- .../test/internaldafny/test_dafny_wrapper.py | 5 ++-- smithy-dafny | 2 +- 5 files changed, 25 insertions(+), 17 deletions(-) diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py index 16127204dd..c14c351ceb 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py @@ -5,7 +5,9 @@ from boto3.session import Session from smithy_dafny_standard_library.internaldafny.generated.Wrappers import Option_Some -from aws_cryptography_internal_kms.smithygenerated.com_amazonaws_kms.shim import KMSClientShim +from aws_cryptography_internal_kms.smithygenerated.com_amazonaws_kms.shim import ( + KMSClientShim, +) from aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms import * import aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms @@ -13,6 +15,7 @@ # Persist this across calls; this doesn't change available_aws_regions: list[str] = None + def get_available_aws_regions(): global available_aws_regions if available_aws_regions is not None: @@ -20,14 +23,15 @@ def get_available_aws_regions(): available_aws_regions = Session().get_available_regions("kms") return available_aws_regions -class default__(aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__): + +class default__( + aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__ +): @staticmethod - def KMSClient(boto_client = None, region = None): + def KMSClient(boto_client=None, region=None): if boto_client is None: if region is not None and region in get_available_aws_regions(): - boto_config = Config( - region_name=region - ) + boto_config = Config(region_name=region) boto_client = boto3.client("kms", config=boto_config) else: # If no region is provided, @@ -36,7 +40,7 @@ def KMSClient(boto_client = None, region = None): region = boto_client.meta.region_name wrapped_client = KMSClientShim(boto_client, region) return Wrappers.Result_Success(wrapped_client) - + @staticmethod def KMSClientForRegion(region: _dafny.Seq): region_string = _dafny.string_of(region) @@ -50,11 +54,16 @@ def RegionMatch(client, region): try: assert isinstance(client, KMSClientShim) except AssertionError: - raise TypeError("Client provided to RegionMatch is not a KMSClientShim: " + client) + raise TypeError( + "Client provided to RegionMatch is not a KMSClientShim: " + client + ) # Since client is a KMSClientShim, we can reach into its _impl, which is a boto3 client, # then into the client's .meta.region_name attribute client_region_name = client._impl.meta.region_name return Option_Some(region.VerbatimString(False) == client_region_name) -aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__ = default__ + +aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__ = ( + default__ +) diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py index 396e3164c7..6ac0e9d949 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py @@ -1,3 +1,3 @@ from . import ( Com_Amazonaws_Kms, -) \ No newline at end of file +) diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py index 08f32bec9b..79a83136c0 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/smithygenerated/com_amazonaws_kms/shim.py @@ -107,10 +107,8 @@ def _sdk_error_to_dafny_error(e: ClientError): - """ - Converts the provided native Smithy-modelled error - into the corresponding Dafny error. - """ + """Converts the provided native Smithy-modelled error into the + corresponding Dafny error.""" if e.response["Error"]["Code"] == "AlreadyExistsException": return aws_cryptography_internal_kms.smithygenerated.com_amazonaws_kms.aws_sdk_to_dafny.com_amazonaws_kms_AlreadyExistsException( e.response diff --git a/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py b/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py index 6622cc3c34..3f98d441c1 100644 --- a/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py +++ b/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py @@ -10,10 +10,11 @@ import sys -internaldafny_dir = '/'.join(__file__.split("/")[:-1]) +internaldafny_dir = "/".join(__file__.split("/")[:-1]) sys.path.append(internaldafny_dir + "/extern") sys.path.append(internaldafny_dir + "/generated") + def test_dafny(): - from .generated import __main__ \ No newline at end of file + from .generated import __main__ diff --git a/smithy-dafny b/smithy-dafny index 36a49d0389..f1c7d77a0a 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit 36a49d0389d09fb449f72a5a3200252c97ad293c +Subproject commit f1c7d77a0ab2dfe3167b9ca5509deab420095ce1 From c760e1f560b098aa7f5fcde7822db97c99acff4d Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Thu, 22 May 2025 14:11:32 -0700 Subject: [PATCH 26/48] m --- smithy-dafny | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smithy-dafny b/smithy-dafny index f1c7d77a0a..dff149caf9 160000 --- a/smithy-dafny +++ b/smithy-dafny @@ -1 +1 @@ -Subproject commit f1c7d77a0ab2dfe3167b9ca5509deab420095ce1 +Subproject commit dff149caf9d85f31f947d24d300695c2a3480750 From ef4abc43164275d484631ea9b79e6de3926c9a27 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 14:40:54 -0700 Subject: [PATCH 27/48] Always install codegen CLI dependencies (for `if-dafny-at-least`) --- .github/workflows/library_codegen.yml | 3 --- .github/workflows/library_dafny_verification.yml | 1 - .github/workflows/library_format.yml | 1 - .github/workflows/library_interop_tests.yml | 15 +-------------- .github/workflows/library_java_tests.yml | 1 - .github/workflows/library_net_tests.yml | 1 - 6 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/workflows/library_codegen.yml b/.github/workflows/library_codegen.yml index b4b7c60aac..988b92f8fc 100644 --- a/.github/workflows/library_codegen.yml +++ b/.github/workflows/library_codegen.yml @@ -66,9 +66,6 @@ jobs: - name: Create temporary global.json run: echo '{"sdk":{"rollForward":"latestFeature","version":"6.0.0"}}' > ./global.json - - name: Install Smithy-Dafny codegen dependencies - uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - - uses: ./.github/actions/polymorph_codegen with: dafny: ${{ env.DAFNY_VERSION }} diff --git a/.github/workflows/library_dafny_verification.yml b/.github/workflows/library_dafny_verification.yml index c5857b811f..b6edca15e8 100644 --- a/.github/workflows/library_dafny_verification.yml +++ b/.github/workflows/library_dafny_verification.yml @@ -53,7 +53,6 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/library_format.yml b/.github/workflows/library_format.yml index 1ddbb23664..786d2baac8 100644 --- a/.github/workflows/library_format.yml +++ b/.github/workflows/library_format.yml @@ -54,7 +54,6 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index ea3697e2da..ab36807be4 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -109,8 +109,7 @@ jobs: with: dafny-version: ${{ inputs.dafny }} - - name: Regenerate code using smithy-dafny if necessary - if: ${{ inputs.regenerate-code }} + - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary @@ -149,10 +148,6 @@ jobs: CORES=$(node -e 'console.log(os.cpus().length)') make transpile_python - - name: Install Smithy-Dafny codegen dependencies - if: matrix.language == 'rust' - uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - # We do not check in Rust polymorph code - name: Run make polymorph_rust if: matrix.language == 'rust' @@ -302,10 +297,6 @@ jobs: with: dafny-version: ${{ inputs.dafny }} - - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} - uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - - name: Regenerate code using smithy-dafny if necessary if: ${{ inputs.regenerate-code }} uses: ./.github/actions/polymorph_codegen @@ -342,10 +333,6 @@ jobs: CORES=$(node -e 'console.log(os.cpus().length)') make transpile_python - - name: Install Smithy-Dafny codegen dependencies - if: matrix.decrypting_language == 'rust' - uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - # TODO: Remove this after checking in Rust polymorph code - name: Run make polymorph_rust if: matrix.decrypting_language == 'rust' diff --git a/.github/workflows/library_java_tests.yml b/.github/workflows/library_java_tests.yml index b5b9ca72cd..ccf1331ded 100644 --- a/.github/workflows/library_java_tests.yml +++ b/.github/workflows/library_java_tests.yml @@ -66,7 +66,6 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index 104e5adc22..3d4332970c 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -69,7 +69,6 @@ jobs: dafny-version: ${{ inputs.dafny }} - name: Install Smithy-Dafny codegen dependencies - if: ${{ inputs.regenerate-code }} uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - name: Regenerate code using smithy-dafny if necessary From dd545f3b8100cd9490e6f84d4ef6e3873c522fb9 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 15:28:58 -0700 Subject: [PATCH 28/48] use Makefile target, missing calls --- .../action.yml | 19 ++++--------------- .github/workflows/library_go_tests.yml | 3 +++ .github/workflows/library_python_tests.yml | 3 +++ 3 files changed, 10 insertions(+), 15 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index c7629082d6..4d2ef15643 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -14,17 +14,10 @@ runs: distribution: "corretto" java-version: "17" - - name: Install smithy-dafny-codegen Rust dependencies locally - uses: gradle/gradle-build-action@v2 - with: - arguments: :codegen-client:pTML :codegen-core:pTML :rust-runtime:pTML - build-root-directory: smithy-dafny/smithy-dafny-codegen-modules/smithy-rs - - - name: Install smithy-dafny-codegen Python dependencies locally - uses: gradle/gradle-build-action@v2 - with: - arguments: :smithy-python-codegen:pTML - build-root-directory: smithy-dafny/codegen/smithy-dafny-codegen-modules/smithy-python/codegen + - name: Install smithy-dafny-codegen dependencies locally + shell: bash + run: | + make -C smithy-dafny mvn_local_deploy_polymorph_dependencies - name: Setup Python, black, and docformatter for code formatting uses: actions/setup-python@v4 @@ -46,7 +39,3 @@ runs: shell: bash run: | go install golang.org/x/tools/cmd/goimports@latest - - - - diff --git a/.github/workflows/library_go_tests.yml b/.github/workflows/library_go_tests.yml index 4659c2dac7..7a634cf953 100644 --- a/.github/workflows/library_go_tests.yml +++ b/.github/workflows/library_go_tests.yml @@ -83,6 +83,9 @@ jobs: run: | go install golang.org/x/tools/cmd/goimports@latest + - name: Install Smithy-Dafny codegen dependencies + uses: ./.github/actions/install_smithy_dafny_codegen_dependencies + - name: Build ${{ matrix.library }} implementation working-directory: ./${{ matrix.library }} run: | diff --git a/.github/workflows/library_python_tests.yml b/.github/workflows/library_python_tests.yml index 7b74904821..a151a54ed7 100644 --- a/.github/workflows/library_python_tests.yml +++ b/.github/workflows/library_python_tests.yml @@ -78,6 +78,9 @@ jobs: pip install --upgrade tox pip install poetry + - name: Install Smithy-Dafny codegen dependencies + uses: ./.github/actions/install_smithy_dafny_codegen_dependencies + - name: Build ${{ matrix.library }} implementation working-directory: ./${{ matrix.library }} run: | From 2350bc162dcd45418dc393e1f9f72fa4bdbca801 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 17:05:29 -0700 Subject: [PATCH 29/48] Debugging --- .../install_smithy_dafny_codegen_dependencies/action.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 4d2ef15643..54fede34e7 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -39,3 +39,8 @@ runs: shell: bash run: | go install golang.org/x/tools/cmd/goimports@latest + + - name: Force Gradle download? + shell: bash + run: | + make -C StandardLibrary setup_net From 7ed6a6a5c1a6e9e0d96d7d50317fbad9af25e1d6 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 17:40:29 -0700 Subject: [PATCH 30/48] Revert some things --- .github/workflows/library_go_tests.yml | 6 ------ .github/workflows/library_interop_tests.yml | 3 +++ .github/workflows/library_rust_tests.yml | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/library_go_tests.yml b/.github/workflows/library_go_tests.yml index 7a634cf953..2494e5a7f4 100644 --- a/.github/workflows/library_go_tests.yml +++ b/.github/workflows/library_go_tests.yml @@ -68,12 +68,6 @@ jobs: with: dafny-version: ${{ inputs.dafny }} - - name: Setup Java 17 for codegen - uses: actions/setup-java@v3 - with: - distribution: "corretto" - java-version: "17" - - name: Install Go uses: actions/setup-go@v5 with: diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index ab36807be4..7b29433efc 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -297,6 +297,9 @@ jobs: with: dafny-version: ${{ inputs.dafny }} + - name: Install Smithy-Dafny codegen dependencies + uses: ./.github/actions/install_smithy_dafny_codegen_dependencies + - name: Regenerate code using smithy-dafny if necessary if: ${{ inputs.regenerate-code }} uses: ./.github/actions/polymorph_codegen diff --git a/.github/workflows/library_rust_tests.yml b/.github/workflows/library_rust_tests.yml index da2a1e4e2e..b64f246417 100644 --- a/.github/workflows/library_rust_tests.yml +++ b/.github/workflows/library_rust_tests.yml @@ -62,7 +62,7 @@ jobs: - name: Setup Dafny uses: ./.github/actions/setup_dafny with: - dafny-version: ${{ inputs.dafny }} + dafny-version: nightly-2025-01-30-7db1e5f - name: Setup NASM for Windows (aws-lc-sys) if: matrix.os == 'windows-latest' From a9d015e294fea71280e02dfebfcee89d47ec9d7f Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Thu, 22 May 2025 18:20:28 -0700 Subject: [PATCH 31/48] format etc. --- .../install_smithy_dafny_codegen_dependencies/action.yml | 5 +++-- .github/workflows/library_go_tests.yml | 2 +- .github/workflows/library_interop_tests.yml | 4 ++-- .github/workflows/library_python_tests.yml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml index 54fede34e7..2d6e285e33 100644 --- a/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml +++ b/.github/actions/install_smithy_dafny_codegen_dependencies/action.yml @@ -13,7 +13,7 @@ runs: with: distribution: "corretto" java-version: "17" - + - name: Install smithy-dafny-codegen dependencies locally shell: bash run: | @@ -40,7 +40,8 @@ runs: run: | go install golang.org/x/tools/cmd/goimports@latest - - name: Force Gradle download? + # Without this the if-dafny-at-least command includes "Downloading ..." output + - name: Arbitrary makefile target to force downloading Gradle shell: bash run: | make -C StandardLibrary setup_net diff --git a/.github/workflows/library_go_tests.yml b/.github/workflows/library_go_tests.yml index 2494e5a7f4..130129019f 100644 --- a/.github/workflows/library_go_tests.yml +++ b/.github/workflows/library_go_tests.yml @@ -79,7 +79,7 @@ jobs: - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - + - name: Build ${{ matrix.library }} implementation working-directory: ./${{ matrix.library }} run: | diff --git a/.github/workflows/library_interop_tests.yml b/.github/workflows/library_interop_tests.yml index 7b29433efc..f95b4603fa 100644 --- a/.github/workflows/library_interop_tests.yml +++ b/.github/workflows/library_interop_tests.yml @@ -116,7 +116,7 @@ jobs: if: ${{ inputs.regenerate-code }} uses: ./.github/actions/polymorph_codegen with: - dafny: ${{ inputs.dafny }} + dafny: ${{ env.DAFNY_VERSION }} library: ${{ matrix.library }} diff-generated-code: false @@ -299,7 +299,7 @@ jobs: - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - + - name: Regenerate code using smithy-dafny if necessary if: ${{ inputs.regenerate-code }} uses: ./.github/actions/polymorph_codegen diff --git a/.github/workflows/library_python_tests.yml b/.github/workflows/library_python_tests.yml index a151a54ed7..f21864402e 100644 --- a/.github/workflows/library_python_tests.yml +++ b/.github/workflows/library_python_tests.yml @@ -80,7 +80,7 @@ jobs: - name: Install Smithy-Dafny codegen dependencies uses: ./.github/actions/install_smithy_dafny_codegen_dependencies - + - name: Build ${{ matrix.library }} implementation working-directory: ./${{ matrix.library }} run: | From edb7eb7717d50875dc29a5f5d38147330787e7b4 Mon Sep 17 00:00:00 2001 From: Robin Salkeld Date: Fri, 23 May 2025 09:09:02 -0700 Subject: [PATCH 32/48] =?UTF-8?q?Don=E2=80=99t=20checking=20formatting=20i?= =?UTF-8?q?n=20nightly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/nightly_dafny.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/nightly_dafny.yml b/.github/workflows/nightly_dafny.yml index 7d37ab8c7d..525aca2513 100644 --- a/.github/workflows/nightly_dafny.yml +++ b/.github/workflows/nightly_dafny.yml @@ -15,13 +15,9 @@ jobs: # Don't run the cron builds on forks if: github.event_name != 'schedule' || github.repository_owner == 'aws' uses: ./.github/workflows/dafny_version.yaml - dafny-nightly-format: - # Don't run the cron builds on forks - if: github.event_name != 'schedule' || github.repository_owner == 'aws' - uses: ./.github/workflows/library_format.yml - with: - dafny: "nightly-latest" - regenerate-code: true + # Don't run library_format.yml as new versions of Dafny + # often change auto-formatting slightly, + # so we often failures that aren't really meaningful. dafny-nightly-verification: # Don't run the cron builds on forks if: github.event_name != 'schedule' || github.repository_owner == 'aws' From a821bc493a1e63aa54f74828326d0723e6c2d6ea Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 11:35:51 -0700 Subject: [PATCH 33/48] m --- .../dafnyruntimepython-4.10.1-py3-none-any.whl | Bin 6581 -> 0 bytes StandardLibrary/runtimes/python/pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl diff --git a/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl b/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl deleted file mode 100644 index 40f823af7bb1b94c68256b64b5fb1a7bcbaa1ede..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6581 zcmb7JWl&t}mTjD%L4v!xyM+!Ar12nWtZ`_Z#x*qV4#5fTP6+OrK=42Zf(9o*2o`j> z@72tG@6Ma5JLlA{UEhzrYS-Fl?NhZrO%MtyF#rI-1bmOQGl(=vIh%VtSt0=dM34EE zkDI%dBZLYcw5Jxdz5$9JuaBH&n$a)=Fp|yE6B9rTz%GBuHXT- z=vYb~XNrF}5?RV7{v^J8pAAz(chUXst&R(>Bke`$w$cxYy_%k5BJ3r8{fuY{vo$`2 zJZY5GSw2@K4Z}#ZirVg})EsE-n7~%#4!fVTK1wHVy%G_-O7W(!O zYUl1EQutq?&zCteIVD|ZZ)mzSlPU>TQhI@tL?LrH?Yq^#@SUv6MO!JC5*=51J!wdfaLrVZT?ynCR6kqiHC@|} zmLJ;fiC}o%J8ogx6Dq2YBU7zxi4U9lNcN1poTDl8MtCkb7dO#ioCK(#!1XY8WRSf#c( z#Z0p48}b8-7~zUOR2sOZwTh~2xk3_(21tZ^5cm_-#i$K+o3e;p#4pYwi>VDs9hCUO zEKSh3Mq39fs9JBf+xY40LuB~%&o<4V*gOHSKy$*%va%khFtor5Ix$t-jb3zICteY4 zp!zxlQm$P;7Cw-lvKSZrAs1zt4hDkAg)p^i9*r#D}Q?2pgo=&#Dw$|B^cp2mR- zHqgAYDRU(Fc1EZ!J-O92X6tENb)NT|9QDyWU7f$ojSRkd`SZOdaQHHqukZ7V>=qF5 zNP1rpF~@u?k>>=i!DtH_a)pzH8u`sYGQr9=eN+^ve!nJWMEjd!*z9z2Q|G>eFzGxU zWNhEd#oFq=W?Z-uH1x1dMtDXt4@!M9ve;$`nONQ%aro%8_eCHP5B4{ zN0!;T&~aly{~UEAE-AI_);zgl%E;}SUi?ZP{oRtzCp5ZNUENfxG~;Ge>z8W^9GSaP zh2R(I5;@eEA%{iy+lTYX%CPL@F7sazA0CABBXEp7`QBVXWsapGTzY&G_=eb@2u<1$ z389OK`Vxk1m;!^Isn18+{w^)|ck9^-C3&+PBUXz73ZB z5S8;pyJ>vYo`m1)fH4T&27}bOPMC2YdzC(eTG4Pa@*vIM zz)=G*0^iRFt;Af3;!T^wIGTk<&V5ut>STZ@zRKcmI%h1Bwbn{FsJUWPu8KOt zr&Gwq^PL=Ed*vL7DNI2}SKBVk*U)ValsElRy!ez*SY1esvOK%MN=yEz^6Vyzgxc>Y zHfCVW-SxzJU~{wSp0kWwA^ z)l8C?ngHFAqM#Jiz_YX+4nLKimw0Zm)C;zf$ZeruB{M9R%Na2uiN(5&J(9|>L^=(v zTpMFOMA50{Q`0PuYGq#m_ik$NCo~wIVWn&?)C{lc#V7KWi^oX*Y?Z9$pgDzc~$!|ZbCQOjFk+=5)kp~i`A`5dn z`-hGew2vyJob$O{6HUz8v z^@#tQ#OSQrh2wJx=f*Qdy875l=pp&c>npxtvVyUTO$^kTigR;TIgXZk)K7z?xpAlC zaU3S*@-^(UXz5N6?C0%LVdwRWEzNsynH(N(3but5AwExMVND^vrx7{TmO3vs`Sm`% z{P~7TO=2}I9*-b3wuNgy&121FW`4c=Tgr#1)n>2W6(B0ILL?|=@z9yDiSjfjeQMm@hJXSuYnD<2C1|k|FVneljSWy8 z4^&WAS8%7k2`nTNcwUgfz8r{Nid_;O5b#K|HzaiF3a|0T_B8CwHG*Mzk}0nBzXxYQ_VF-h{Sar?s;tv_ZEP1xr{q4E&DK@6`Jc zfUkT>yViXiR28+un>Gj4XHsk8^u=P#F zS;Jn9H9$P z=^8Z{Uwayt&FPqxD4%|!s2C5%_)*>tb`U5-=%Ja~#{L%6JslA?_p88dC|H}*O-BqC zBu;k;=FOwT`2OWHLKmR#)jCw z%o@Vwo3suA%1N7V>yz%fkz2WO3lnd}#vW+$$BNX% z-X2Z^Jt0iK&vcV3ONr%<>wz4UnqMDk11kX1o1?7 zot-I0)g?EcaB}6>qrMlCiBU~fR9M9qHq_hicc}I+9snfG^s$!TJ-Cx!;mzOi2&TPy zmrbhP)Z0@B-<}C>jzbM@u89;?=u6m~z`XkD6_9u@m3A{jfJHq<60C1tVpyxWh0eN0 z-S0%ncLrhO3|461X&#V>x$<;%D?84r{>p8+Vg-?ooA17{KD0D=yk-6~2h>s^N^V6fmM^=IToexf7{ls|Z{&U7 zTp#HZAS(2=3Oc}IF1#seQNwXly;_Z8N}HV*^w9&a}^04zh`5>5dZ8f0BLMdv<_u&}VI{eG`COiK`kaw{BUc&!?bW0A^THa0 zFgwvJ+{so`JaLvT*q~8}uZ7L{GmoGcI94x)6Cn#*pbMmTQVW zsje6K*`&O`LBP4Sn{sAz?D{AtIo(3V?xg9BzzECo`^KgrvQjg+zDHQD10HWg{^#wp zHqjLvk&%_zo|A#O)S8vBvZx3u-m({jTJ1J1H)d{aLyFB4*@?&|&(oC8;|fA)(J5?( zhdxoViFLPJZZng}B^+9hb@rj*sH=4XPbKc&KP)UC$G&M^N$(x*s+KY71|%R+jmY1c z1St)Kz4h{x#r0kwAYMW=mN%prlAK}ikz!O&hviVegt~YYW~wf5MxlMfXbs9Cg5L@W z)3Gp(G{4d+mWDY!PqO5p->i_~y7lry{e=~@e6Qx`^GY(#m|73U%jxe^sv(Ut10Bfx zG-8#@G=RBH28%wMyY+7>s26U$&nzjB*jEj(u1(As=Au!cLaYY*+#J<8-(x5Yfy0ld zT!$Kcdq@<#)H>-lMo&mNdRnm#Z=6}FEgwc%o`JhZ7!- zjA0pFsXOt3Z5IxsN`R|9K)sLLYf4*sGZp=oA_c!HO}91tk7|APeXU9JfnEe6Om8!M ztghip7w3XE4L1AR^efl>>=wT0b~HV9i%Z#uNBk|%8?!q`lou#|#QNNNNaQ!}BpN-H z7W5jMV(`z&S>b8xx86XPKq!6!5e^ok0cO^R+5Z=nBXAja_T);6^QM; z3pa-FB1%7v$qmLk1$Ojn+u6SwTlwPkfu?J$Vx6Jo-K+|0EB>iOryNbE#{~h+Ll07S z?$AbjDv29$iv3eQg3zDTPf(occUO74R_}7VcY3xI22C&DF`D*y5%`f`Ozp+c@G@Q) zUw)}zxrmq@%u)dOp3KueWOU@KbsqTo$mDEH_k^Upl)3#wGZW(3nK|c(C0S4P53U`x zf|Ob7dm$}WmC|Gz&SgeslETmK^{Bq2k$y?B;a@_KLN=+toIkm=U$aI6qBnWiu6DT7 zYw!wS2b1S>?{*(jh#TZU>T}`t!6zif_m@5fA>WNJ7BWOmJ)Ue(5Gf8^(jsNOBwC&n zOmr7CPm_f&AQ1MQm)SU-e!o|ZbSJ7(yWVnK7IOX8%Mj&Din__NNn2I|9tWipJpKoD z2Jyn`+n!pt3zxQGu05fE2TKfIu&7ZI(~>lv%~>ho8)Y8-#`md3oqR|0Q}sB#cI0KM z(l_B=_nsyc@^@(;>-`e>-n^dburU+-tsj6R9vX7J4V>zhEpx@AE74z}3-Vr`*-1uR zB^!P3B-_!vRL5wf@jAV}E|J-?>qi0i#nK3IPCaOmAY~?k#p3F%^R6p1{QzJ#Q}$KMB6q0Ii$_pRB9vYBZ} zIq~|U*&ev>`1bpU+W^nTq9A7URN6rk$*MITaFnP}@fsTE5_J*o*Qo;RxTcMK1Ll|| zOZrn=9GGZBFC$KxMMkXJA#b{+X8yArima)AejuID37@?9U>VGoIsV|iSp7{Q!|3Iv zUSE~qoVl9lROpm%TIqW{wOdszo0%Aa1xp zNBhMK%R>l~idqll3~boh1Na4!7?9Uj>WH}06rbxjJX^?Pzey(>sHZ#jrxR>XL?j#R z<5LbMbr)Hm!i=g+?^;!lhIs#-PL69*cB4lc4IhL3Z_=r+q@bXRJ*lKNF^vo2=J-55 z*`&=kC%6XFm;iCBaErfnQZ|#)qvux|aT#*3(-XeMt=sm$>Yxs}B|2JE7cXoj|Sb17G z@VI-sW7l%=C{M)gL~AIkeyaM8{1<#L5M!R`@)InW4uZ0;QBC7PFsyFpL51W(AXJON zCtZ$Vi_2I9vFQ*#YsOcIvin|Mu-4 zXYh}w82(544=(<{0{kb>`=8|iKr#G}P4T}S@PDoUPdnw$`mM)%g#XWm`782Y<@G1B z(6hgX{137H751-^_!D;FZ^HhYK>iB<{9 diff --git a/StandardLibrary/runtimes/python/pyproject.toml b/StandardLibrary/runtimes/python/pyproject.toml index 0252c9cf83..9a0cf23c15 100644 --- a/StandardLibrary/runtimes/python/pyproject.toml +++ b/StandardLibrary/runtimes/python/pyproject.toml @@ -18,7 +18,7 @@ include = [ python = "^3.11.0" pytz = ">=2023.3.post1, <2025.0.0" # TODO: Longer-term, write something to pull this in from the project's project.properties file -DafnyRuntimePython = {path = "dafnyruntimepython-4.10.1-py3-none-any.whl"} +DafnyRuntimePython = {path = "dafnyruntimepython-4.9.0"} # Package testing From e57ed52a7d4d68361664b3740364a9d73caa1d0e Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 11:36:15 -0700 Subject: [PATCH 34/48] m --- StandardLibrary/runtimes/python/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/StandardLibrary/runtimes/python/pyproject.toml b/StandardLibrary/runtimes/python/pyproject.toml index 9a0cf23c15..4906a8723a 100644 --- a/StandardLibrary/runtimes/python/pyproject.toml +++ b/StandardLibrary/runtimes/python/pyproject.toml @@ -18,7 +18,7 @@ include = [ python = "^3.11.0" pytz = ">=2023.3.post1, <2025.0.0" # TODO: Longer-term, write something to pull this in from the project's project.properties file -DafnyRuntimePython = {path = "dafnyruntimepython-4.9.0"} +DafnyRuntimePython = "4.9.0" # Package testing From 2e51ccc9e100839b82f5015566f349e5d7ba1608 Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 11:36:57 -0700 Subject: [PATCH 35/48] m --- .../internaldafny/generated/dafny_src-py.dtr | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr index 4ff8791824..13809cd289 100644 --- a/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr +++ b/AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/internaldafny/generated/dafny_src-py.dtr @@ -66,12 +66,21 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.Keyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.CanonicalEncryptionContext] +[options_by_module.MultiKeyring] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.AwsKmsMrkAreUnique] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.Constants] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.MaterialWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" +[options_by_module.CanonicalEncryptionContext] +legacy-module-names = false +python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.IntermediateKeyWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" @@ -81,28 +90,28 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.ErrorMessages] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawAESKeyring] +[options_by_module.AwsKmsKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.Constants] +[options_by_module.StrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.EcdhEdkWrapping] +[options_by_module.AwsKmsDiscoveryKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawECDHKeyring] +[options_by_module.DiscoveryMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.RawRSAKeyring] +[options_by_module.AwsKmsMrkDiscoveryKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsKeyring] +[options_by_module.MrkAwareDiscoveryMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsDiscoveryKeyring] +[options_by_module.AwsKmsMrkKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsEcdhKeyring] +[options_by_module.MrkAwareStrictMultiKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.LocalCMC] @@ -123,31 +132,22 @@ python-module-name = "aws_cryptographic_material_providers.internaldafny.generat [options_by_module.AwsKmsHierarchicalKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkDiscoveryKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.AwsKmsRsaKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MultiKeyring] -legacy-module-names = false -python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.AwsKmsMrkAreUnique] +[options_by_module.EcdhEdkWrapping] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.StrictMultiKeyring] +[options_by_module.RawECDHKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.DiscoveryMultiKeyring] +[options_by_module.AwsKmsEcdhKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareDiscoveryMultiKeyring] +[options_by_module.RawAESKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" -[options_by_module.MrkAwareStrictMultiKeyring] +[options_by_module.RawRSAKeyring] legacy-module-names = false python-module-name = "aws_cryptographic_material_providers.internaldafny.generated" [options_by_module.CMM] From 0ea04270d12acace0efe518b230db719fb24306a Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 11:37:59 -0700 Subject: [PATCH 36/48] m --- .../internaldafny/extern/Com_Amazonaws_Kms.py | 27 +++++++------------ .../internaldafny/extern/__init__.py | 2 +- .../test/internaldafny/test_dafny_wrapper.py | 5 ++-- 3 files changed, 12 insertions(+), 22 deletions(-) diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py index c14c351ceb..16127204dd 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/Com_Amazonaws_Kms.py @@ -5,9 +5,7 @@ from boto3.session import Session from smithy_dafny_standard_library.internaldafny.generated.Wrappers import Option_Some -from aws_cryptography_internal_kms.smithygenerated.com_amazonaws_kms.shim import ( - KMSClientShim, -) +from aws_cryptography_internal_kms.smithygenerated.com_amazonaws_kms.shim import KMSClientShim from aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms import * import aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms @@ -15,7 +13,6 @@ # Persist this across calls; this doesn't change available_aws_regions: list[str] = None - def get_available_aws_regions(): global available_aws_regions if available_aws_regions is not None: @@ -23,15 +20,14 @@ def get_available_aws_regions(): available_aws_regions = Session().get_available_regions("kms") return available_aws_regions - -class default__( - aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__ -): +class default__(aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__): @staticmethod - def KMSClient(boto_client=None, region=None): + def KMSClient(boto_client = None, region = None): if boto_client is None: if region is not None and region in get_available_aws_regions(): - boto_config = Config(region_name=region) + boto_config = Config( + region_name=region + ) boto_client = boto3.client("kms", config=boto_config) else: # If no region is provided, @@ -40,7 +36,7 @@ def KMSClient(boto_client=None, region=None): region = boto_client.meta.region_name wrapped_client = KMSClientShim(boto_client, region) return Wrappers.Result_Success(wrapped_client) - + @staticmethod def KMSClientForRegion(region: _dafny.Seq): region_string = _dafny.string_of(region) @@ -54,16 +50,11 @@ def RegionMatch(client, region): try: assert isinstance(client, KMSClientShim) except AssertionError: - raise TypeError( - "Client provided to RegionMatch is not a KMSClientShim: " + client - ) + raise TypeError("Client provided to RegionMatch is not a KMSClientShim: " + client) # Since client is a KMSClientShim, we can reach into its _impl, which is a boto3 client, # then into the client's .meta.region_name attribute client_region_name = client._impl.meta.region_name return Option_Some(region.VerbatimString(False) == client_region_name) - -aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__ = ( - default__ -) +aws_cryptography_internal_kms.internaldafny.generated.Com_Amazonaws_Kms.default__ = default__ diff --git a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py index 6ac0e9d949..396e3164c7 100644 --- a/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py +++ b/ComAmazonawsKms/runtimes/python/src/aws_cryptography_internal_kms/internaldafny/extern/__init__.py @@ -1,3 +1,3 @@ from . import ( Com_Amazonaws_Kms, -) +) \ No newline at end of file diff --git a/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py b/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py index 3f98d441c1..6622cc3c34 100644 --- a/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py +++ b/ComAmazonawsKms/runtimes/python/test/internaldafny/test_dafny_wrapper.py @@ -10,11 +10,10 @@ import sys -internaldafny_dir = "/".join(__file__.split("/")[:-1]) +internaldafny_dir = '/'.join(__file__.split("/")[:-1]) sys.path.append(internaldafny_dir + "/extern") sys.path.append(internaldafny_dir + "/generated") - def test_dafny(): - from .generated import __main__ + from .generated import __main__ \ No newline at end of file From 1fa8a4a67485f32b01adb3b250e783a59c58bf1e Mon Sep 17 00:00:00 2001 From: Lucas McDonald Date: Tue, 27 May 2025 11:39:38 -0700 Subject: [PATCH 37/48] m --- .../dafnyruntimepython-4.10.1-py3-none-any.whl | Bin 0 -> 6581 bytes StandardLibrary/runtimes/python/pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl diff --git a/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl b/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..40f823af7bb1b94c68256b64b5fb1a7bcbaa1ede GIT binary patch literal 6581 zcmb7JWl&t}mTjD%L4v!xyM+!Ar12nWtZ`_Z#x*qV4#5fTP6+OrK=42Zf(9o*2o`j> z@72tG@6Ma5JLlA{UEhzrYS-Fl?NhZrO%MtyF#rI-1bmOQGl(=vIh%VtSt0=dM34EE zkDI%dBZLYcw5Jxdz5$9JuaBH&n$a)=Fp|yE6B9rTz%GBuHXT- z=vYb~XNrF}5?RV7{v^J8pAAz(chUXst&R(>Bke`$w$cxYy_%k5BJ3r8{fuY{vo$`2 zJZY5GSw2@K4Z}#ZirVg})EsE-n7~%#4!fVTK1wHVy%G_-O7W(!O zYUl1EQutq?&zCteIVD|ZZ)mzSlPU>TQhI@tL?LrH?Yq^#@SUv6MO!JC5*=51J!wdfaLrVZT?ynCR6kqiHC@|} zmLJ;fiC}o%J8ogx6Dq2YBU7zxi4U9lNcN1poTDl8MtCkb7dO#ioCK(#!1XY8WRSf#c( z#Z0p48}b8-7~zUOR2sOZwTh~2xk3_(21tZ^5cm_-#i$K+o3e;p#4pYwi>VDs9hCUO zEKSh3Mq39fs9JBf+xY40LuB~%&o<4V*gOHSKy$*%va%khFtor5Ix$t-jb3zICteY4 zp!zxlQm$P;7Cw-lvKSZrAs1zt4hDkAg)p^i9*r#D}Q?2pgo=&#Dw$|B^cp2mR- zHqgAYDRU(Fc1EZ!J-O92X6tENb)NT|9QDyWU7f$ojSRkd`SZOdaQHHqukZ7V>=qF5 zNP1rpF~@u?k>>=i!DtH_a)pzH8u`sYGQr9=eN+^ve!nJWMEjd!*z9z2Q|G>eFzGxU zWNhEd#oFq=W?Z-uH1x1dMtDXt4@!M9ve;$`nONQ%aro%8_eCHP5B4{ zN0!;T&~aly{~UEAE-AI_);zgl%E;}SUi?ZP{oRtzCp5ZNUENfxG~;Ge>z8W^9GSaP zh2R(I5;@eEA%{iy+lTYX%CPL@F7sazA0CABBXEp7`QBVXWsapGTzY&G_=eb@2u<1$ z389OK`Vxk1m;!^Isn18+{w^)|ck9^-C3&+PBUXz73ZB z5S8;pyJ>vYo`m1)fH4T&27}bOPMC2YdzC(eTG4Pa@*vIM zz)=G*0^iRFt;Af3;!T^wIGTk<&V5ut>STZ@zRKcmI%h1Bwbn{FsJUWPu8KOt zr&Gwq^PL=Ed*vL7DNI2}SKBVk*U)ValsElRy!ez*SY1esvOK%MN=yEz^6Vyzgxc>Y zHfCVW-SxzJU~{wSp0kWwA^ z)l8C?ngHFAqM#Jiz_YX+4nLKimw0Zm)C;zf$ZeruB{M9R%Na2uiN(5&J(9|>L^=(v zTpMFOMA50{Q`0PuYGq#m_ik$NCo~wIVWn&?)C{lc#V7KWi^oX*Y?Z9$pgDzc~$!|ZbCQOjFk+=5)kp~i`A`5dn z`-hGew2vyJob$O{6HUz8v z^@#tQ#OSQrh2wJx=f*Qdy875l=pp&c>npxtvVyUTO$^kTigR;TIgXZk)K7z?xpAlC zaU3S*@-^(UXz5N6?C0%LVdwRWEzNsynH(N(3but5AwExMVND^vrx7{TmO3vs`Sm`% z{P~7TO=2}I9*-b3wuNgy&121FW`4c=Tgr#1)n>2W6(B0ILL?|=@z9yDiSjfjeQMm@hJXSuYnD<2C1|k|FVneljSWy8 z4^&WAS8%7k2`nTNcwUgfz8r{Nid_;O5b#K|HzaiF3a|0T_B8CwHG*Mzk}0nBzXxYQ_VF-h{Sar?s;tv_ZEP1xr{q4E&DK@6`Jc zfUkT>yViXiR28+un>Gj4XHsk8^u=P#F zS;Jn9H9$P z=^8Z{Uwayt&FPqxD4%|!s2C5%_)*>tb`U5-=%Ja~#{L%6JslA?_p88dC|H}*O-BqC zBu;k;=FOwT`2OWHLKmR#)jCw z%o@Vwo3suA%1N7V>yz%fkz2WO3lnd}#vW+$$BNX% z-X2Z^Jt0iK&vcV3ONr%<>wz4UnqMDk11kX1o1?7 zot-I0)g?EcaB}6>qrMlCiBU~fR9M9qHq_hicc}I+9snfG^s$!TJ-Cx!;mzOi2&TPy zmrbhP)Z0@B-<}C>jzbM@u89;?=u6m~z`XkD6_9u@m3A{jfJHq<60C1tVpyxWh0eN0 z-S0%ncLrhO3|461X&#V>x$<;%D?84r{>p8+Vg-?ooA17{KD0D=yk-6~2h>s^N^V6fmM^=IToexf7{ls|Z{&U7 zTp#HZAS(2=3Oc}IF1#seQNwXly;_Z8N}HV*^w9&a}^04zh`5>5dZ8f0BLMdv<_u&}VI{eG`COiK`kaw{BUc&!?bW0A^THa0 zFgwvJ+{so`JaLvT*q~8}uZ7L{GmoGcI94x)6Cn#*pbMmTQVW zsje6K*`&O`LBP4Sn{sAz?D{AtIo(3V?xg9BzzECo`^KgrvQjg+zDHQD10HWg{^#wp zHqjLvk&%_zo|A#O)S8vBvZx3u-m({jTJ1J1H)d{aLyFB4*@?&|&(oC8;|fA)(J5?( zhdxoViFLPJZZng}B^+9hb@rj*sH=4XPbKc&KP)UC$G&M^N$(x*s+KY71|%R+jmY1c z1St)Kz4h{x#r0kwAYMW=mN%prlAK}ikz!O&hviVegt~YYW~wf5MxlMfXbs9Cg5L@W z)3Gp(G{4d+mWDY!PqO5p->i_~y7lry{e=~@e6Qx`^GY(#m|73U%jxe^sv(Ut10Bfx zG-8#@G=RBH28%wMyY+7>s26U$&nzjB*jEj(u1(As=Au!cLaYY*+#J<8-(x5Yfy0ld zT!$Kcdq@<#)H>-lMo&mNdRnm#Z=6}FEgwc%o`JhZ7!- zjA0pFsXOt3Z5IxsN`R|9K)sLLYf4*sGZp=oA_c!HO}91tk7|APeXU9JfnEe6Om8!M ztghip7w3XE4L1AR^efl>>=wT0b~HV9i%Z#uNBk|%8?!q`lou#|#QNNNNaQ!}BpN-H z7W5jMV(`z&S>b8xx86XPKq!6!5e^ok0cO^R+5Z=nBXAja_T);6^QM; z3pa-FB1%7v$qmLk1$Ojn+u6SwTlwPkfu?J$Vx6Jo-K+|0EB>iOryNbE#{~h+Ll07S z?$AbjDv29$iv3eQg3zDTPf(occUO74R_}7VcY3xI22C&DF`D*y5%`f`Ozp+c@G@Q) zUw)}zxrmq@%u)dOp3KueWOU@KbsqTo$mDEH_k^Upl)3#wGZW(3nK|c(C0S4P53U`x zf|Ob7dm$}WmC|Gz&SgeslETmK^{Bq2k$y?B;a@_KLN=+toIkm=U$aI6qBnWiu6DT7 zYw!wS2b1S>?{*(jh#TZU>T}`t!6zif_m@5fA>WNJ7BWOmJ)Ue(5Gf8^(jsNOBwC&n zOmr7CPm_f&AQ1MQm)SU-e!o|ZbSJ7(yWVnK7IOX8%Mj&Din__NNn2I|9tWipJpKoD z2Jyn`+n!pt3zxQGu05fE2TKfIu&7ZI(~>lv%~>ho8)Y8-#`md3oqR|0Q}sB#cI0KM z(l_B=_nsyc@^@(;>-`e>-n^dburU+-tsj6R9vX7J4V>zhEpx@AE74z}3-Vr`*-1uR zB^!P3B-_!vRL5wf@jAV}E|J-?>qi0i#nK3IPCaOmAY~?k#p3F%^R6p1{QzJ#Q}$KMB6q0Ii$_pRB9vYBZ} zIq~|U*&ev>`1bpU+W^nTq9A7URN6rk$*MITaFnP}@fsTE5_J*o*Qo;RxTcMK1Ll|| zOZrn=9GGZBFC$KxMMkXJA#b{+X8yArima)AejuID37@?9U>VGoIsV|iSp7{Q!|3Iv zUSE~qoVl9lROpm%TIqW{wOdszo0%Aa1xp zNBhMK%R>l~idqll3~boh1Na4!7?9Uj>WH}06rbxjJX^?Pzey(>sHZ#jrxR>XL?j#R z<5LbMbr)Hm!i=g+?^;!lhIs#-PL69*cB4lc4IhL3Z_=r+q@bXRJ*lKNF^vo2=J-55 z*`&=kC%6XFm;iCBaErfnQZ|#)qvux|aT#*3(-XeMt=sm$>Yxs}B|2JE7cXoj|Sb17G z@VI-sW7l%=C{M)gL~AIkeyaM8{1<#L5M!R`@)InW4uZ0;QBC7PFsyFpL51W(AXJON zCtZ$Vi_2I9vFQ*#YsOcIvin|Mu-4 zXYh}w82(544=(<{0{kb>`=8|iKr#G}P4T}S@PDoUPdnw$`mM)%g#XWm`782Y<@G1B z(6hgX{137H751-^_!D;FZ^HhYK>iB<{9 literal 0 HcmV?d00001 diff --git a/StandardLibrary/runtimes/python/pyproject.toml b/StandardLibrary/runtimes/python/pyproject.toml index 4906a8723a..0252c9cf83 100644 --- a/StandardLibrary/runtimes/python/pyproject.toml +++ b/StandardLibrary/runtimes/python/pyproject.toml @@ -18,7 +18,7 @@ include = [ python = "^3.11.0" pytz = ">=2023.3.post1, <2025.0.0" # TODO: Longer-term, write something to pull this in from the project's project.properties file -DafnyRuntimePython = "4.9.0" +DafnyRuntimePython = {path = "dafnyruntimepython-4.10.1-py3-none-any.whl"} # Package testing From 7aa21acbcabff1654d25b4dfa022e558e94672e1 Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:33:28 -0700 Subject: [PATCH 38/48] Bump to DafnyRuntimePython - "4.11.0" --- .../dafnyruntimepython-4.10.1-py3-none-any.whl | Bin 6581 -> 0 bytes StandardLibrary/runtimes/python/pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl diff --git a/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl b/StandardLibrary/runtimes/python/dafnyruntimepython-4.10.1-py3-none-any.whl deleted file mode 100644 index 40f823af7bb1b94c68256b64b5fb1a7bcbaa1ede..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6581 zcmb7JWl&t}mTjD%L4v!xyM+!Ar12nWtZ`_Z#x*qV4#5fTP6+OrK=42Zf(9o*2o`j> z@72tG@6Ma5JLlA{UEhzrYS-Fl?NhZrO%MtyF#rI-1bmOQGl(=vIh%VtSt0=dM34EE zkDI%dBZLYcw5Jxdz5$9JuaBH&n$a)=Fp|yE6B9rTz%GBuHXT- z=vYb~XNrF}5?RV7{v^J8pAAz(chUXst&R(>Bke`$w$cxYy_%k5BJ3r8{fuY{vo$`2 zJZY5GSw2@K4Z}#ZirVg})EsE-n7~%#4!fVTK1wHVy%G_-O7W(!O zYUl1EQutq?&zCteIVD|ZZ)mzSlPU>TQhI@tL?LrH?Yq^#@SUv6MO!JC5*=51J!wdfaLrVZT?ynCR6kqiHC@|} zmLJ;fiC}o%J8ogx6Dq2YBU7zxi4U9lNcN1poTDl8MtCkb7dO#ioCK(#!1XY8WRSf#c( z#Z0p48}b8-7~zUOR2sOZwTh~2xk3_(21tZ^5cm_-#i$K+o3e;p#4pYwi>VDs9hCUO zEKSh3Mq39fs9JBf+xY40LuB~%&o<4V*gOHSKy$*%va%khFtor5Ix$t-jb3zICteY4 zp!zxlQm$P;7Cw-lvKSZrAs1zt4hDkAg)p^i9*r#D}Q?2pgo=&#Dw$|B^cp2mR- zHqgAYDRU(Fc1EZ!J-O92X6tENb)NT|9QDyWU7f$ojSRkd`SZOdaQHHqukZ7V>=qF5 zNP1rpF~@u?k>>=i!DtH_a)pzH8u`sYGQr9=eN+^ve!nJWMEjd!*z9z2Q|G>eFzGxU zWNhEd#oFq=W?Z-uH1x1dMtDXt4@!M9ve;$`nONQ%aro%8_eCHP5B4{ zN0!;T&~aly{~UEAE-AI_);zgl%E;}SUi?ZP{oRtzCp5ZNUENfxG~;Ge>z8W^9GSaP zh2R(I5;@eEA%{iy+lTYX%CPL@F7sazA0CABBXEp7`QBVXWsapGTzY&G_=eb@2u<1$ z389OK`Vxk1m;!^Isn18+{w^)|ck9^-C3&+PBUXz73ZB z5S8;pyJ>vYo`m1)fH4T&27}bOPMC2YdzC(eTG4Pa@*vIM zz)=G*0^iRFt;Af3;!T^wIGTk<&V5ut>STZ@zRKcmI%h1Bwbn{FsJUWPu8KOt zr&Gwq^PL=Ed*vL7DNI2}SKBVk*U)ValsElRy!ez*SY1esvOK%MN=yEz^6Vyzgxc>Y zHfCVW-SxzJU~{wSp0kWwA^ z)l8C?ngHFAqM#Jiz_YX+4nLKimw0Zm)C;zf$ZeruB{M9R%Na2uiN(5&J(9|>L^=(v zTpMFOMA50{Q`0PuYGq#m_ik$NCo~wIVWn&?)C{lc#V7KWi^oX*Y?Z9$pgDzc~$!|ZbCQOjFk+=5)kp~i`A`5dn z`-hGew2vyJob$O{6HUz8v z^@#tQ#OSQrh2wJx=f*Qdy875l=pp&c>npxtvVyUTO$^kTigR;TIgXZk)K7z?xpAlC zaU3S*@-^(UXz5N6?C0%LVdwRWEzNsynH(N(3but5AwExMVND^vrx7{TmO3vs`Sm`% z{P~7TO=2}I9*-b3wuNgy&121FW`4c=Tgr#1)n>2W6(B0ILL?|=@z9yDiSjfjeQMm@hJXSuYnD<2C1|k|FVneljSWy8 z4^&WAS8%7k2`nTNcwUgfz8r{Nid_;O5b#K|HzaiF3a|0T_B8CwHG*Mzk}0nBzXxYQ_VF-h{Sar?s;tv_ZEP1xr{q4E&DK@6`Jc zfUkT>yViXiR28+un>Gj4XHsk8^u=P#F zS;Jn9H9$P z=^8Z{Uwayt&FPqxD4%|!s2C5%_)*>tb`U5-=%Ja~#{L%6JslA?_p88dC|H}*O-BqC zBu;k;=FOwT`2OWHLKmR#)jCw z%o@Vwo3suA%1N7V>yz%fkz2WO3lnd}#vW+$$BNX% z-X2Z^Jt0iK&vcV3ONr%<>wz4UnqMDk11kX1o1?7 zot-I0)g?EcaB}6>qrMlCiBU~fR9M9qHq_hicc}I+9snfG^s$!TJ-Cx!;mzOi2&TPy zmrbhP)Z0@B-<}C>jzbM@u89;?=u6m~z`XkD6_9u@m3A{jfJHq<60C1tVpyxWh0eN0 z-S0%ncLrhO3|461X&#V>x$<;%D?84r{>p8+Vg-?ooA17{KD0D=yk-6~2h>s^N^V6fmM^=IToexf7{ls|Z{&U7 zTp#HZAS(2=3Oc}IF1#seQNwXly;_Z8N}HV*^w9&a}^04zh`5>5dZ8f0BLMdv<_u&}VI{eG`COiK`kaw{BUc&!?bW0A^THa0 zFgwvJ+{so`JaLvT*q~8}uZ7L{GmoGcI94x)6Cn#*pbMmTQVW zsje6K*`&O`LBP4Sn{sAz?D{AtIo(3V?xg9BzzECo`^KgrvQjg+zDHQD10HWg{^#wp zHqjLvk&%_zo|A#O)S8vBvZx3u-m({jTJ1J1H)d{aLyFB4*@?&|&(oC8;|fA)(J5?( zhdxoViFLPJZZng}B^+9hb@rj*sH=4XPbKc&KP)UC$G&M^N$(x*s+KY71|%R+jmY1c z1St)Kz4h{x#r0kwAYMW=mN%prlAK}ikz!O&hviVegt~YYW~wf5MxlMfXbs9Cg5L@W z)3Gp(G{4d+mWDY!PqO5p->i_~y7lry{e=~@e6Qx`^GY(#m|73U%jxe^sv(Ut10Bfx zG-8#@G=RBH28%wMyY+7>s26U$&nzjB*jEj(u1(As=Au!cLaYY*+#J<8-(x5Yfy0ld zT!$Kcdq@<#)H>-lMo&mNdRnm#Z=6}FEgwc%o`JhZ7!- zjA0pFsXOt3Z5IxsN`R|9K)sLLYf4*sGZp=oA_c!HO}91tk7|APeXU9JfnEe6Om8!M ztghip7w3XE4L1AR^efl>>=wT0b~HV9i%Z#uNBk|%8?!q`lou#|#QNNNNaQ!}BpN-H z7W5jMV(`z&S>b8xx86XPKq!6!5e^ok0cO^R+5Z=nBXAja_T);6^QM; z3pa-FB1%7v$qmLk1$Ojn+u6SwTlwPkfu?J$Vx6Jo-K+|0EB>iOryNbE#{~h+Ll07S z?$AbjDv29$iv3eQg3zDTPf(occUO74R_}7VcY3xI22C&DF`D*y5%`f`Ozp+c@G@Q) zUw)}zxrmq@%u)dOp3KueWOU@KbsqTo$mDEH_k^Upl)3#wGZW(3nK|c(C0S4P53U`x zf|Ob7dm$}WmC|Gz&SgeslETmK^{Bq2k$y?B;a@_KLN=+toIkm=U$aI6qBnWiu6DT7 zYw!wS2b1S>?{*(jh#TZU>T}`t!6zif_m@5fA>WNJ7BWOmJ)Ue(5Gf8^(jsNOBwC&n zOmr7CPm_f&AQ1MQm)SU-e!o|ZbSJ7(yWVnK7IOX8%Mj&Din__NNn2I|9tWipJpKoD z2Jyn`+n!pt3zxQGu05fE2TKfIu&7ZI(~>lv%~>ho8)Y8-#`md3oqR|0Q}sB#cI0KM z(l_B=_nsyc@^@(;>-`e>-n^dburU+-tsj6R9vX7J4V>zhEpx@AE74z}3-Vr`*-1uR zB^!P3B-_!vRL5wf@jAV}E|J-?>qi0i#nK3IPCaOmAY~?k#p3F%^R6p1{QzJ#Q}$KMB6q0Ii$_pRB9vYBZ} zIq~|U*&ev>`1bpU+W^nTq9A7URN6rk$*MITaFnP}@fsTE5_J*o*Qo;RxTcMK1Ll|| zOZrn=9GGZBFC$KxMMkXJA#b{+X8yArima)AejuID37@?9U>VGoIsV|iSp7{Q!|3Iv zUSE~qoVl9lROpm%TIqW{wOdszo0%Aa1xp zNBhMK%R>l~idqll3~boh1Na4!7?9Uj>WH}06rbxjJX^?Pzey(>sHZ#jrxR>XL?j#R z<5LbMbr)Hm!i=g+?^;!lhIs#-PL69*cB4lc4IhL3Z_=r+q@bXRJ*lKNF^vo2=J-55 z*`&=kC%6XFm;iCBaErfnQZ|#)qvux|aT#*3(-XeMt=sm$>Yxs}B|2JE7cXoj|Sb17G z@VI-sW7l%=C{M)gL~AIkeyaM8{1<#L5M!R`@)InW4uZ0;QBC7PFsyFpL51W(AXJON zCtZ$Vi_2I9vFQ*#YsOcIvin|Mu-4 zXYh}w82(544=(<{0{kb>`=8|iKr#G}P4T}S@PDoUPdnw$`mM)%g#XWm`782Y<@G1B z(6hgX{137H751-^_!D;FZ^HhYK>iB<{9 diff --git a/StandardLibrary/runtimes/python/pyproject.toml b/StandardLibrary/runtimes/python/pyproject.toml index e5c6f19b5b..e758c983fc 100644 --- a/StandardLibrary/runtimes/python/pyproject.toml +++ b/StandardLibrary/runtimes/python/pyproject.toml @@ -18,7 +18,7 @@ include = [ python = "^3.11.0" pytz = ">=2023.3.post1, <2026.0.0" # TODO: Longer-term, write something to pull this in from the project's project.properties file -DafnyRuntimePython = {path = "dafnyruntimepython-4.10.1-py3-none-any.whl"} +DafnyRuntimePython = "4.11.0" # Package testing From 8592f801e54679e6daf2eb5607d5f18ebd3dbd9c Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Mon, 22 Sep 2025 13:30:55 -0700 Subject: [PATCH 39/48] bump dafny version to 4.11 --- project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.properties b/project.properties index 5d11f69e27..6e4e1c568c 100644 --- a/project.properties +++ b/project.properties @@ -5,7 +5,7 @@ # export `export `cat ./aws-cryptographic-material-providers-library-dafny/project.properties` # The Java project include this file as a Gradle properties # And the Dotnet projects include and parse this file. -dafnyVersion=4.9.0 -dafnyVerifyVersion=4.9.1 +dafnyVersion=4.11.0 +dafnyVerifyVersion=4.11.0 dafnyRustVersion=nightly-2025-01-30-7db1e5f mplVersion=1.11.1-SNAPSHOT From 9f638b4fe5d2322a3b2dbc43ebf9b58ffdfe120d Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:43:30 +0000 Subject: [PATCH 40/48] chore(dafny): polymorph --- .../AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy | 2 +- .../dafny/KeyVectors/src/CmmFromKeyDescription.dfy | 2 +- .../dafny/KeyVectors/src/KeyDescription.dfy | 4 ++-- .../dafny/KeyVectors/src/KeyMaterial.dfy | 4 ++-- .../dafny/KeyVectors/src/KeyringFromKeyDescription.dfy | 2 +- .../dafny/KeyVectors/src/KeysVectorOperations.dfy | 4 ++-- .../src/ParseJsonManifests.dfy | 4 ++-- .../src/TestManifests.dfy | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy index 201cf7476b..9d75c176f7 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy @@ -11,7 +11,7 @@ module {:extern "software.amazon.cryptography.materialproviderstestvectorkeys.in import opened UTF8 import AwsCryptographyMaterialProvidersTypes import ComAmazonawsKmsTypes - // Generic helpers for verification of mock/unit tests. + // Generic helpers for verification of mock/unit tests. datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) // Begin Generated Types diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/CmmFromKeyDescription.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/CmmFromKeyDescription.dfy index 8c9fb7ddb7..1a225caf24 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/CmmFromKeyDescription.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/CmmFromKeyDescription.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 include "../Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy" - // Yes this is including from somewhere else. +// Yes this is including from somewhere else. include "../../TestVectorsAwsCryptographicMaterialProviders/src/LibraryIndex.dfy" include "KeyringFromKeyDescription.dfy" diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyDescription.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyDescription.dfy index 62757d8912..937a65876e 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyDescription.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyDescription.dfy @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 include "../Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy" - // Yes, this is reaching across. - // ideally all these functions would exist in the STD Library. +// Yes, this is reaching across. +// ideally all these functions would exist in the STD Library. include "../../TestVectorsAwsCryptographicMaterialProviders/src/JSONHelpers.dfy" module {:options "-functionSyntax:4"} KeyDescription { diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyMaterial.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyMaterial.dfy index 4254d9f7f3..1440c7578e 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyMaterial.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyMaterial.dfy @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 include "../Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy" - // Yes, this is reaching across. - // ideally all these functions would exist in the STD Library. +// Yes, this is reaching across. +// ideally all these functions would exist in the STD Library. include "../../TestVectorsAwsCryptographicMaterialProviders/src/JSONHelpers.dfy" module {:options "-functionSyntax:4"} KeyMaterial { diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyringFromKeyDescription.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyringFromKeyDescription.dfy index 48fd2150a4..c62c89bd0a 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyringFromKeyDescription.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeyringFromKeyDescription.dfy @@ -2,7 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 include "../Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy" - // Yes this is including from somewhere else. +// Yes this is including from somewhere else. include "../../TestVectorsAwsCryptographicMaterialProviders/src/LibraryIndex.dfy" include "KeyMaterial.dfy" include "CreateStaticKeyrings.dfy" diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeysVectorOperations.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeysVectorOperations.dfy index b12f4b63b8..266e32d11f 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeysVectorOperations.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/KeyVectors/src/KeysVectorOperations.dfy @@ -2,8 +2,8 @@ // SPDX-License-Identifier: Apache-2.0 include "../Model/AwsCryptographyMaterialProvidersTestVectorKeysTypes.dfy" - // Yes, this is reaching across. - // ideally all these functions would exist in the STD Library. +// Yes, this is reaching across. +// ideally all these functions would exist in the STD Library. include "../../TestVectorsAwsCryptographicMaterialProviders/src/LibraryIndex.dfy" include "../../TestVectorsAwsCryptographicMaterialProviders/src/JSONHelpers.dfy" include "KeyDescription.dfy" diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/ParseJsonManifests.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/ParseJsonManifests.dfy index 0c30ef191b..f244779f07 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/ParseJsonManifests.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/ParseJsonManifests.dfy @@ -25,8 +25,8 @@ module {:options "-functionSyntax:4"} ParseJsonManifests { import CompleteVectors import KeyVectors import KeyVectorsTypes = AwsCryptographyMaterialProvidersTestVectorKeysTypes - // This is a HACK! - // This is *ONLY* because this is wrapping the MPL + // This is a HACK! + // This is *ONLY* because this is wrapping the MPL import AlgorithmSuites function BuildEncryptTestVector(keys: KeyVectors.KeyVectorsClient, obj: seq<(string, JSON)>) diff --git a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy index 6420f5bba0..6a2dc83d2b 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy +++ b/TestVectorsAwsCryptographicMaterialProviders/dafny/TestVectorsAwsCryptographicMaterialProviders/src/TestManifests.dfy @@ -4,7 +4,7 @@ include "TestVectors.dfy" include "ParseJsonManifests.dfy" include "MplManifestOptions.dfy" - // TODO it would be nice to have this included somehow... +// TODO it would be nice to have this included somehow... include "../../KeyVectors/src/Index.dfy" include "../../../../StandardLibrary/src/Time.dfy" From 64975d0df27110b37c5451fc6ac25ff1994f651a Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:47:29 +0000 Subject: [PATCH 41/48] chore(dafny): polymorph --- .../Model/AwsCryptographyMaterialProvidersTypes.dfy | 2 +- .../Model/AwsCryptographyKeyStoreTypes.dfy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy index af51e21e8b..a6a72d7288 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/Model/AwsCryptographyMaterialProvidersTypes.dfy @@ -15,7 +15,7 @@ module {:extern "software.amazon.cryptography.materialproviders.internaldafny.ty import AwsCryptographyPrimitivesTypes import ComAmazonawsDynamodbTypes import ComAmazonawsKmsTypes - // Generic helpers for verification of mock/unit tests. + // Generic helpers for verification of mock/unit tests. datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) // Begin Generated Types diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy index a371045798..74138cd537 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/Model/AwsCryptographyKeyStoreTypes.dfy @@ -11,7 +11,7 @@ module {:extern "software.amazon.cryptography.keystore.internaldafny.types" } Aw import opened UTF8 import ComAmazonawsDynamodbTypes import ComAmazonawsKmsTypes - // Generic helpers for verification of mock/unit tests. + // Generic helpers for verification of mock/unit tests. datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) // Begin Generated Types From ad3dcb74a77549d5c995cde15ec2ea79b570c258 Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:50:05 +0000 Subject: [PATCH 42/48] chore(dafny): polymorph --- ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy b/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy index b5c3c9fe41..dc6583e076 100644 --- a/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy +++ b/ComAmazonawsDynamodb/Model/ComAmazonawsDynamodbTypes.dfy @@ -7,7 +7,7 @@ module {:extern "software.amazon.cryptography.services.dynamodb.internaldafny.ty import opened Wrappers import opened StandardLibrary.UInt import opened UTF8 - // Generic helpers for verification of mock/unit tests. + // Generic helpers for verification of mock/unit tests. datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) // Begin Generated Types From ca594a8e690ab9d8b58a6aa6bcd0d3160f54bca7 Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:51:00 +0000 Subject: [PATCH 43/48] chore(dafny): polymorph --- .../Model/AwsCryptographyPrimitivesTypes.dfy | 2 +- ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy b/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy index 7714244df6..9149137f13 100644 --- a/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy +++ b/AwsCryptographyPrimitives/Model/AwsCryptographyPrimitivesTypes.dfy @@ -7,7 +7,7 @@ module {:extern "software.amazon.cryptography.primitives.internaldafny.types" } import opened Wrappers import opened StandardLibrary.UInt import opened UTF8 - // Generic helpers for verification of mock/unit tests. + // Generic helpers for verification of mock/unit tests. datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) // Begin Generated Types diff --git a/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy b/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy index ff5520a289..057dade5d4 100644 --- a/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy +++ b/ComAmazonawsKms/Model/ComAmazonawsKmsTypes.dfy @@ -7,7 +7,7 @@ module {:extern "software.amazon.cryptography.services.kms.internaldafny.types" import opened Wrappers import opened StandardLibrary.UInt import opened UTF8 - // Generic helpers for verification of mock/unit tests. + // Generic helpers for verification of mock/unit tests. datatype DafnyCallEvent = DafnyCallEvent(input: I, output: O) // Begin Generated Types From b7273301b21989c6b3b3f2d837dd27ac9ba3d698 Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:23:04 +0000 Subject: [PATCH 44/48] chore: standard library polymorph --- StandardLibrary/src/Actions.dfy | 8 ++++---- StandardLibrary/src/GetOpt.dfy | 4 ++-- .../test/TestComputeSetToOrderedSequenceCharLess.dfy | 2 +- .../test/TestComputeSetToOrderedSequenceUInt8Less.dfy | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/StandardLibrary/src/Actions.dfy b/StandardLibrary/src/Actions.dfy index 536676873e..22212ddf3d 100644 --- a/StandardLibrary/src/Actions.dfy +++ b/StandardLibrary/src/Actions.dfy @@ -349,14 +349,14 @@ module Actions { if res.Success? then && Last(attemptsState).output.Success? && Last(attemptsState).output.value == res.value - // This is the engine that can be used to hoist proof obligations + // This is the engine that can be used to hoist proof obligations && action.Ensures( Last(attemptsState).input, Last(attemptsState).output, DropLast(attemptsState)) - // Attempts are made until there is a success - // so attempts will be made up of failures - // with one final Success at the end. + // Attempts are made until there is a success + // so attempts will be made up of failures + // with one final Success at the end. && forall i | 0 <= i < |DropLast(attemptsState)| :: attemptsState[i].output.Failure? diff --git a/StandardLibrary/src/GetOpt.dfy b/StandardLibrary/src/GetOpt.dfy index 54f344f609..4881f9bd10 100644 --- a/StandardLibrary/src/GetOpt.dfy +++ b/StandardLibrary/src/GetOpt.dfy @@ -104,11 +104,11 @@ Not Future Directions : */ include "../../libraries/src/Wrappers.dfy" - //include "../../../../submodules/MaterialProviders/libraries/src/Collections/Sequences/Seq.dfy" +//include "../../../../submodules/MaterialProviders/libraries/src/Collections/Sequences/Seq.dfy" module {:options "-functionSyntax:4"} GetOpt { import opened Wrappers - // import Seq, replace when repaired + // import Seq, replace when repaired method Example(args : seq) returns (output : Result) requires 0 < |args| diff --git a/StandardLibrary/test/TestComputeSetToOrderedSequenceCharLess.dfy b/StandardLibrary/test/TestComputeSetToOrderedSequenceCharLess.dfy index fdabe9edc6..0055f16e8a 100644 --- a/StandardLibrary/test/TestComputeSetToOrderedSequenceCharLess.dfy +++ b/StandardLibrary/test/TestComputeSetToOrderedSequenceCharLess.dfy @@ -3,7 +3,7 @@ include "../src/StandardLibrary.dfy" include "../src/Sets.dfy" - // Just to make sure we don't conflict with dafny-lang/libraries' Sets.dfy +// Just to make sure we don't conflict with dafny-lang/libraries' Sets.dfy include "../../libraries/src/Collections/Sets/Sets.dfy" diff --git a/StandardLibrary/test/TestComputeSetToOrderedSequenceUInt8Less.dfy b/StandardLibrary/test/TestComputeSetToOrderedSequenceUInt8Less.dfy index 15818ef331..57c2fd2676 100644 --- a/StandardLibrary/test/TestComputeSetToOrderedSequenceUInt8Less.dfy +++ b/StandardLibrary/test/TestComputeSetToOrderedSequenceUInt8Less.dfy @@ -4,7 +4,7 @@ include "../src/StandardLibrary.dfy" include "../src/Sets.dfy" include "../src/Time.dfy" - // Just to make sure we don't conflict with dafny-lang/libraries' Sets.dfy +// Just to make sure we don't conflict with dafny-lang/libraries' Sets.dfy include "../../libraries/src/Collections/Sets/Sets.dfy" // This function is commonly used for sorting From 7ac1b5888d413c32492716a3008f4e5b638ebcae Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Tue, 23 Sep 2025 17:28:03 +0000 Subject: [PATCH 45/48] bump dafny --- AwsCryptographicMaterialProviders/project.properties | 4 ++-- AwsCryptographyPrimitives/project.properties | 4 ++-- ComAmazonawsDynamodb/project.properties | 4 ++-- ComAmazonawsKms/project.properties | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/AwsCryptographicMaterialProviders/project.properties b/AwsCryptographicMaterialProviders/project.properties index 55d988fe1b..59404672e2 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.9.0 -dafnyRuntimeJavaVersion=4.9.0 +dafnyVersion=4.11.0 +dafnyRuntimeJavaVersion=4.11.0 diff --git a/AwsCryptographyPrimitives/project.properties b/AwsCryptographyPrimitives/project.properties index 55d988fe1b..59404672e2 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.9.0 -dafnyRuntimeJavaVersion=4.9.0 +dafnyVersion=4.11.0 +dafnyRuntimeJavaVersion=4.11.0 diff --git a/ComAmazonawsDynamodb/project.properties b/ComAmazonawsDynamodb/project.properties index 55d988fe1b..59404672e2 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.9.0 -dafnyRuntimeJavaVersion=4.9.0 +dafnyVersion=4.11.0 +dafnyRuntimeJavaVersion=4.11.0 diff --git a/ComAmazonawsKms/project.properties b/ComAmazonawsKms/project.properties index 55d988fe1b..59404672e2 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.9.0 -dafnyRuntimeJavaVersion=4.9.0 +dafnyVersion=4.11.0 +dafnyRuntimeJavaVersion=4.11.0 From faf5f7ac22b04354e6fc6c7272b3c4c52c29cc6c Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Tue, 23 Sep 2025 11:44:09 -0700 Subject: [PATCH 46/48] bump dafny version to 4.11 --- .../project.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TestVectorsAwsCryptographicMaterialProviders/project.properties b/TestVectorsAwsCryptographicMaterialProviders/project.properties index 55d988fe1b..59404672e2 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/project.properties +++ b/TestVectorsAwsCryptographicMaterialProviders/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.9.0 -dafnyRuntimeJavaVersion=4.9.0 +dafnyVersion=4.11.0 +dafnyRuntimeJavaVersion=4.11.0 From f41ef682cd693bf0925e78ae61a4a13269119e38 Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Tue, 23 Sep 2025 12:06:12 -0700 Subject: [PATCH 47/48] bump dafny version to 4.11 --- AwsCryptographicMaterialProviders/project.properties | 4 ++-- AwsCryptographyPrimitives/project.properties | 4 ++-- ComAmazonawsDynamodb/project.properties | 4 ++-- ComAmazonawsKms/project.properties | 4 ++-- .../project.properties | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/AwsCryptographicMaterialProviders/project.properties b/AwsCryptographicMaterialProviders/project.properties index 59404672e2..55d988fe1b 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.11.0 -dafnyRuntimeJavaVersion=4.11.0 +dafnyVersion=4.9.0 +dafnyRuntimeJavaVersion=4.9.0 diff --git a/AwsCryptographyPrimitives/project.properties b/AwsCryptographyPrimitives/project.properties index 59404672e2..55d988fe1b 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.11.0 -dafnyRuntimeJavaVersion=4.11.0 +dafnyVersion=4.9.0 +dafnyRuntimeJavaVersion=4.9.0 diff --git a/ComAmazonawsDynamodb/project.properties b/ComAmazonawsDynamodb/project.properties index 59404672e2..55d988fe1b 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.11.0 -dafnyRuntimeJavaVersion=4.11.0 +dafnyVersion=4.9.0 +dafnyRuntimeJavaVersion=4.9.0 diff --git a/ComAmazonawsKms/project.properties b/ComAmazonawsKms/project.properties index 59404672e2..55d988fe1b 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.11.0 -dafnyRuntimeJavaVersion=4.11.0 +dafnyVersion=4.9.0 +dafnyRuntimeJavaVersion=4.9.0 diff --git a/TestVectorsAwsCryptographicMaterialProviders/project.properties b/TestVectorsAwsCryptographicMaterialProviders/project.properties index 59404672e2..55d988fe1b 100644 --- a/TestVectorsAwsCryptographicMaterialProviders/project.properties +++ b/TestVectorsAwsCryptographicMaterialProviders/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.11.0 -dafnyRuntimeJavaVersion=4.11.0 +dafnyVersion=4.9.0 +dafnyRuntimeJavaVersion=4.9.0 From 951ad891eccd93d291f7483de1004d125b40018a Mon Sep 17 00:00:00 2001 From: Darwin Chowdary <39110935+imabhichow@users.noreply.github.com> Date: Tue, 23 Sep 2025 12:50:57 -0700 Subject: [PATCH 48/48] format --- .../src/AlgorithmSuites.dfy | 24 ++-- .../src/CMCs/LocalCMC.dfy | 16 +-- .../src/CMCs/StormTracker.dfy | 8 +- .../src/CMM.dfy | 30 ++--- .../src/CMMs/DefaultCMM.dfy | 88 ++++++------- .../src/CMMs/RequiredEncryptionContextCMM.dfy | 10 +- .../src/Commitment.dfy | 36 +++--- .../src/Defaults.dfy | 6 +- .../src/KeyWrapping/EcdhEdkWrapping.dfy | 28 ++--- .../src/KeyWrapping/EdkWrapping.dfy | 8 +- .../src/Keyring.dfy | 2 +- .../AwsKms/AwsKmsDiscoveryKeyring.dfy | 54 ++++---- .../src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy | 4 +- .../src/Keyrings/AwsKms/AwsKmsKeyring.dfy | 74 +++++------ .../AwsKms/AwsKmsMrkDiscoveryKeyring.dfy | 22 ++-- .../src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy | 70 +++++------ .../Keyrings/AwsKms/DiscoveryMultiKeyring.dfy | 10 +- .../AwsKms/MrkAwareDiscoveryMultiKeyring.dfy | 10 +- .../AwsKms/MrkAwareStrictMultiKeyring.dfy | 12 +- .../Keyrings/AwsKms/StrictMultiKeyring.dfy | 12 +- .../src/Keyrings/MultiKeyring.dfy | 16 +-- .../src/Keyrings/RawAESKeyring.dfy | 18 +-- .../src/Materials.dfy | 118 +++++++++--------- .../src/AwsCryptographyKeyStoreOperations.dfy | 10 +- .../src/CreateKeyStoreTable.dfy | 30 ++--- .../src/CreateKeys.dfy | 10 +- .../AwsCryptographyKeyStore/src/GetKeys.dfy | 28 ++--- .../AwsCryptographyKeyStore/src/Structure.dfy | 118 +++++++++--------- 28 files changed, 436 insertions(+), 436 deletions(-) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/AlgorithmSuites.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/AlgorithmSuites.dfy index 74f74a9634..bc58deb71c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/AlgorithmSuites.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/AlgorithmSuites.dfy @@ -82,26 +82,26 @@ module AlgorithmSuites { // If there is a KDF, the output length MUST match the encrypt length && (a.kdf.HKDF? ==> && a.kdf.HKDF.outputKeyLength == a.encrypt.AES_GCM.keyLength) - // If there is a signature, there MUST be a KDF + // If there is a signature, there MUST be a KDF && (a.signature.ECDSA? ==> a.kdf.HKDF?) - // If there is commitment, the KDF MUST match + // If there is commitment, the KDF MUST match && (a.commitment.HKDF? ==> && a.commitment.HKDF.saltLength == 32 && a.commitment == a.kdf) - // If there is a IntermediateKeyWrapping, the KDFs MUST match + // If there is a IntermediateKeyWrapping, the KDFs MUST match && (a.edkWrapping.IntermediateKeyWrapping? ==> && a.kdf.HKDF? && a.edkWrapping.IntermediateKeyWrapping.keyEncryptionKeyKdf == a.kdf && a.edkWrapping.IntermediateKeyWrapping.macKeyKdf == a.kdf) - // If there is a KDF and no commitment then salt MUST be 0 + // If there is a KDF and no commitment then salt MUST be 0 && (a.kdf.HKDF? && a.commitment.None? ==> a.kdf.HKDF.saltLength == 0) - //= aws-encryption-sdk-specification/framework/algorithm-suites.md#algorithm-suites-signature-settings - //= type=implication - //# An algorithm suite with a symmetric signature algorithm MUST use [intermediate key wrapping](#intermediate-key-wrapping). - // - // If the algorithm suite includes an symmetric signature algorithm: - //= aws-encryption-sdk-specification/framework/algorithm-suites.md#symmetric-signature-algorithm - //# - The algorithm suite MUST also use [Intermediate Key Wrapping](#intermediate-key-wrapping). + //= aws-encryption-sdk-specification/framework/algorithm-suites.md#algorithm-suites-signature-settings + //= type=implication + //# An algorithm suite with a symmetric signature algorithm MUST use [intermediate key wrapping](#intermediate-key-wrapping). + // + // If the algorithm suite includes an symmetric signature algorithm: + //= aws-encryption-sdk-specification/framework/algorithm-suites.md#symmetric-signature-algorithm + //# - The algorithm suite MUST also use [Intermediate Key Wrapping](#intermediate-key-wrapping). && (!a.symmetricSignature.None? ==> && a.edkWrapping.IntermediateKeyWrapping?) } @@ -119,7 +119,7 @@ module AlgorithmSuites { { // Adheres to constraints for all algorithm suites && AlgorithmSuiteInfo?(a) - // All ESDK encrypt with AES_GCM + // All ESDK encrypt with AES_GCM && SupportedESDKEncrypt?(a.encrypt) // Specification for each supported ESDK Algorithm Suite diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy index 05bdf5d772..4c80069e7d 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/LocalCMC.dfy @@ -344,7 +344,7 @@ module {:options "/functionSyntax:4" } LocalCMC { && this in InternalModifies && queue in InternalModifies && cache in InternalModifies - // I want to say that `queue.Items` is somehow in InternalModifies + // I want to say that `queue.Items` is somehow in InternalModifies && (forall i <- queue.Items :: i in InternalModifies) && Invariant() } @@ -353,15 +353,15 @@ module {:options "/functionSyntax:4" } LocalCMC { reads this, queue, queue.Items, cache { && queue.Invariant() - // The cache is a cache of Cells, these Cells MUST be unique. - // The actual value that the Cell contains MAY be a duplicate. - // See the uniqueness comment on the DoublyLinkedList.Invariant. + // The cache is a cache of Cells, these Cells MUST be unique. + // The actual value that the Cell contains MAY be a duplicate. + // See the uniqueness comment on the DoublyLinkedList.Invariant. && MutableMapIsInjective(cache) - // Given that cache.Values and queue.Items are unique - // they MUST contain exactly the same elements. + // Given that cache.Values and queue.Items are unique + // they MUST contain exactly the same elements. && multiset(cache.Values()) == multiset(queue.Items) - // To remove the tail the key associated - // with the tail MUST be in the cache + // To remove the tail the key associated + // with the tail MUST be in the cache && (forall c <- queue.Items :: c.identifier in cache.Keys() && cache.Select(c.identifier) == c) && (ValueIsSafeBecauseItIsInMemory(cache.Size()); cache.Size() as uint64 <= entryCapacity) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTracker.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTracker.dfy index 897838ffb9..75813a4135 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTracker.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMCs/StormTracker.dfy @@ -197,10 +197,10 @@ module {:options "/functionSyntax:4" } StormTracker { ensures output ==> && result.expiryTime < 0x20C49BA5E353F7 - // The + 1 comes because (now / 1000) * 1000 <= now - // Consider (5001 / 1000) <= 5 - // (5001 / 1000) == 5 - // but 5 * 1000 < 5001 + // The + 1 comes because (now / 1000) * 1000 <= now + // Consider (5001 / 1000) <= 5 + // (5001 / 1000) == 5 + // but 5 * 1000 < 5001 && (result.expiryTime * 1000) - gracePeriod <= now < (result.expiryTime + 1) * 1000 { // This is just showing where this constant comes from diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy index be0c7217fe..f505ee0ac4 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMM.dfy @@ -36,10 +36,10 @@ module {:options "/functionSyntax:4" } CMM { //# - For every key in [Required Encryption Context Keys](structures.md#required-encryption-context-keys) //# there MUST be a matching key in the [Encryption Context](structures.md#encryption-context-1). && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.encryptionMaterials) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials - //= type=implication - //# - The [Required Encryption Context Keys](structures.md#required-encryption-context-keys) MUST be - //# a super set of the Required Encryption Context Keys in the [encryption materials request](#encryption-materials-request). + //= aws-encryption-sdk-specification/framework/cmm-interface.md#get-encryption-materials + //= type=implication + //# - The [Required Encryption Context Keys](structures.md#required-encryption-context-keys) MUST be + //# a super set of the Required Encryption Context Keys in the [encryption materials request](#encryption-materials-request). && RequiredEncryptionContextKeys?(input.requiredEncryptionContextKeys, output.value.encryptionMaterials) ghost predicate DecryptMaterialsEnsuresPublicly(input: Types.DecryptMaterialsInput, output: Result) @@ -57,19 +57,19 @@ module {:options "/functionSyntax:4" } CMM { //# - The decryption materials returned MUST follow the specification for [decryption-materials](structures.md#decryption-materials). //# - The value of the plaintext data key MUST be non-NULL. ==> Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) - //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) - //# in [decrypt materials request](#decrypt-materials-request). - //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) - //# and [Encryption Context](structures.md#encryption-context), - //# the values MUST be equal or the operation MUST fail. + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //# The CMM MUST validate the [Encryption Context](structures.md#encryption-context) + //# by comparing it to the customer supplied [Reproduced Encryption Context](structures.md#encryption-context) + //# in [decrypt materials request](#decrypt-materials-request). + //# For every key that exists in both [Reproduced Encryption Context](structures.md#encryption-context) + //# and [Encryption Context](structures.md#encryption-context), + //# the values MUST be equal or the operation MUST fail. && (output.Success? ==> ReproducedEncryptionContext?(input)) && (!ReproducedEncryptionContext?(input) ==> output.Failure?) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. && (output.Success? ==> EncryptionContextComplete(input, output.value.decryptionMaterials)) } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy index 90b47efe54..004869f20c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/DefaultCMM.dfy @@ -146,10 +146,10 @@ module DefaultCMM { //# value `base64-encoded public verification key` //# to the [encryption context](structures.md#encryption-context). && Materials.EC_PUBLIC_KEY_FIELD in output.value.encryptionMaterials.encryptionContext - //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials - //= type=implication - //# If the algorithm suite contains a [signing algorithm](algorithm-suites.md#signature-algorithm), - //# the default CMM MUST Generate a [signing key](structures.md#signing-key). + //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials + //= type=implication + //# If the algorithm suite contains a [signing algorithm](algorithm-suites.md#signature-algorithm), + //# the default CMM MUST Generate a [signing key](structures.md#signing-key). && output.value.encryptionMaterials.signingKey.Some? ) @@ -193,25 +193,25 @@ module DefaultCMM { && output.Success? ==> && |keyring.History.OnEncrypt| == |old(keyring.History.OnEncrypt)| + 1 - //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials - //= type=implication - //# On each call to Get Encryption Materials, - //# the default CMM MUST make a call to its [keyring's](#keyring) - //# [On Encrypt](keyring-interface.md#onencrypt) operation. + //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials + //= type=implication + //# On each call to Get Encryption Materials, + //# the default CMM MUST make a call to its [keyring's](#keyring) + //# [On Encrypt](keyring-interface.md#onencrypt) operation. && Seq.Last(keyring.History.OnEncrypt).output.Success? - //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials - //= type=implication - //# The default CMM MUST obtain the Plaintext Data Key from the - //# On Encrypt Response and include it in the - //# [encryption materials](structures.md#encryption-materials) returned. + //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials + //= type=implication + //# The default CMM MUST obtain the Plaintext Data Key from the + //# On Encrypt Response and include it in the + //# [encryption materials](structures.md#encryption-materials) returned. && Seq.Last(keyring.History.OnEncrypt).output.value.materials.plaintextDataKey == output.value.encryptionMaterials.plaintextDataKey - //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials - //= type=implication - //# The default CMM MUST obtain the - //# [Encrypted Data Keys](structures.md#encrypted-data-keys) - //# from the On Encrypt Response and include it - //# in the [encryption materials](structures.md#encryption-materials) returned. + //= aws-encryption-sdk-specification/framework/default-cmm.md#get-encryption-materials + //= type=implication + //# The default CMM MUST obtain the + //# [Encrypted Data Keys](structures.md#encrypted-data-keys) + //# from the On Encrypt Response and include it + //# in the [encryption materials](structures.md#encryption-materials) returned. && Seq.Last(keyring.History.OnEncrypt).output.value.materials.encryptedDataKeys == output.value.encryptionMaterials.encryptedDataKeys @@ -320,11 +320,11 @@ module DefaultCMM { && (output.Success? ==> && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) } @@ -421,18 +421,18 @@ module DefaultCMM { //# - If the decrypt materials request contains an algorithm suite, //# the decryption materials returned SHOULD contain the same algorithm suite. && input.algorithmSuiteId == output.value.decryptionMaterials.algorithmSuite.id - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# If the algorithm suite obtained from the decryption request contains a [signing algorithm](algorithm-suites.md#signature-algorithm), - //# the decryption materials MUST include the [signature verification key](structures.md#verification-key). + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# If the algorithm suite obtained from the decryption request contains a [signing algorithm](algorithm-suites.md#signature-algorithm), + //# the decryption materials MUST include the [signature verification key](structures.md#verification-key). && (output.value.decryptionMaterials.algorithmSuite.signature.ECDSA? ==> output.value.decryptionMaterials.verificationKey.Some?) && (0 < |output.value.decryptionMaterials.requiredEncryptionContextKeys| ==> input.reproducedEncryptionContext.Some?) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - This set MUST include all keys added to the decryption materials encryption context - //# that existed in the [decrypt materials request's](#decrypt-materials-request) reproduced encryption context - //# but did not exist in the [decrypt materials request's](#decrypt-materials-request) encryption context. + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - This set MUST include all keys added to the decryption materials encryption context + //# that existed in the [decrypt materials request's](#decrypt-materials-request) reproduced encryption context + //# but did not exist in the [decrypt materials request's](#decrypt-materials-request) encryption context. && (forall key <- output.value.decryptionMaterials.requiredEncryptionContextKeys :: && key !in input.encryptionContext @@ -442,17 +442,17 @@ module DefaultCMM { && output.Success? ==> && |keyring.History.OnDecrypt| == |old(keyring.History.OnDecrypt)| + 1 - //= aws-encryption-sdk-specification/framework/default-cmm.md#decrypt-materials - //= type=implication - //# On each call to Decrypt Materials, - //# the default CMM MUST make a call to its [keyring's](#keyring) - //# [On Decrypt](keyring-interface.md#ondecrypt) operation. + //= aws-encryption-sdk-specification/framework/default-cmm.md#decrypt-materials + //= type=implication + //# On each call to Decrypt Materials, + //# the default CMM MUST make a call to its [keyring's](#keyring) + //# [On Decrypt](keyring-interface.md#ondecrypt) operation. && Seq.Last(keyring.History.OnDecrypt).output.Success? - //= aws-encryption-sdk-specification/framework/default-cmm.md#decrypt-materials - //= type=implication - //# The default CMM MUST obtain the Plaintext Data Key from - //# the On Decrypt response and include it in the decrypt - //# materials returned. + //= aws-encryption-sdk-specification/framework/default-cmm.md#decrypt-materials + //= type=implication + //# The default CMM MUST obtain the Plaintext Data Key from + //# the On Decrypt response and include it in the decrypt + //# materials returned. && Seq.Last(keyring.History.OnDecrypt).output.value.materials.plaintextDataKey == output.value.decryptionMaterials.plaintextDataKey diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy index 9d762243ea..12cac8dabb 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/CMMs/RequiredEncryptionContextCMM.dfy @@ -230,11 +230,11 @@ module RequiredEncryptionContextCMM { && (output.Success? ==> && Materials.DecryptionMaterialsWithPlaintextDataKey(output.value.decryptionMaterials)) - //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials - //= type=implication - //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) - //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) - //# SHOULD be appended to the decryption materials. + //= aws-encryption-sdk-specification/framework/cmm-interface.md#decrypt-materials + //= type=implication + //# - All key-value pairs that exist in [Reproduced Encryption Context](structures.md#encryption-context) + //# but do not exist in encryption context on the [decrypt materials request](#decrypt-materials-request) + //# SHOULD be appended to the decryption materials. && (output.Success? ==> CMM.EncryptionContextComplete(input, output.value.decryptionMaterials)) } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Commitment.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Commitment.dfy index 6eb4d26477..b02ffabec6 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Commitment.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Commitment.dfy @@ -46,13 +46,13 @@ module Commitment { //= type=implication //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.ESDK(REQUIRE_ENCRYPT_ALLOW_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt - //= type=implication - //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True + //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt + //= type=implication + //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.ESDK(ESDKCommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt - //= type=implication - //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True + //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt + //= type=implication + //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.DBE(DBECommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) ) && var suite := AlgorithmSuites.GetSuite(algorithm); @@ -69,11 +69,11 @@ module Commitment { //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-allow-decrypt //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.ESDK(REQUIRE_ENCRYPT_ALLOW_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt - //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True + //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt + //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.ESDK(ESDKCommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt - //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True + //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt + //# - [Get Encryption Materials](./cmm-interface.md#get-encryption-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.DBE(DBECommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) ) && var suite := AlgorithmSuites.GetSuite(algorithm); @@ -137,9 +137,9 @@ module Commitment { //= type=implication //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.ESDK(ESDKCommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt - //= type=implication - //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True + //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt + //= type=implication + //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.DBE(DBECommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) ) && var suite := AlgorithmSuites.GetSuite(algorithm); @@ -156,8 +156,8 @@ module Commitment { //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.ESDK(ESDKCommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt - //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True + //= aws-encryption-sdk-specification/framework/commitment-policy.md#dbe-require-encrypt-require-decrypt + //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST only support algorithm suites that have a [Key Commitment](./algorithm-suites.md#algorithm-suites-encryption-key-derivation-settings) value of True || commitmentPolicy == CommitmentPolicy.DBE(DBECommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) ) && var suite := AlgorithmSuites.GetSuite(algorithm); @@ -175,9 +175,9 @@ module Commitment { //= type=implication //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST support all algorithm suites || commitmentPolicy == CommitmentPolicy.ESDK(FORBID_ENCRYPT_ALLOW_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-allow-decrypt - //= type=implication - //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST support all algorithm suites + //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-allow-decrypt + //= type=implication + //# - [Decrypt Materials](./cmm-interface.md#decrypt-materials) MUST support all algorithm suites || commitmentPolicy == CommitmentPolicy.ESDK(REQUIRE_ENCRYPT_ALLOW_DECRYPT) ) ) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Defaults.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Defaults.dfy index a1654316ee..c67cc0ad6f 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Defaults.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Defaults.dfy @@ -23,9 +23,9 @@ module Defaults { //= type=implication //# - `05 78` MUST be the default algorithm suite || commitmentPolicy == CommitmentPolicy.ESDK(REQUIRE_ENCRYPT_ALLOW_DECRYPT) - //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt - //= type=implication - //# - `05 78` MUST be the default algorithm suite + //= aws-encryption-sdk-specification/framework/commitment-policy.md#esdk-require-encrypt-require-decrypt + //= type=implication + //# - `05 78` MUST be the default algorithm suite || commitmentPolicy == CommitmentPolicy.ESDK(ESDKCommitmentPolicy.REQUIRE_ENCRYPT_REQUIRE_DECRYPT) ==> output == AlgorithmSuiteId.ESDK(ALG_AES_256_GCM_HKDF_SHA512_COMMIT_KEY_ECDSA_P384) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy index 98420cf572..43601f3fcc 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EcdhEdkWrapping.dfy @@ -360,23 +360,23 @@ module {:options "/functionSyntax:4" } EcdhEdkWrapping { ==> && Invariant() && 0 < |crypto.History.AESEncrypt| - //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#data-key-wrapping - //= type=implication - //# The keyring MUST encrypt the plaintext data key - //# using AES-GCM and use the shared wrapping key as the wrapping key. + //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#data-key-wrapping + //= type=implication + //# The keyring MUST encrypt the plaintext data key + //# using AES-GCM and use the shared wrapping key as the wrapping key. && Seq.Last(crypto.History.AESEncrypt).output.Success? && var AESEncryptInput := Seq.Last(crypto.History.AESEncrypt).input; && var AESEncryptOutput := Seq.Last(crypto.History.AESEncrypt).output.value; && var iv := seq(ECDH_AES_256_ENC_ALG.ivLength as nat, _ => 0); && AESEncryptInput.encAlg == ECDH_AES_256_ENC_ALG && AESEncryptInput.msg == input.plaintextMaterial - //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#data-key-wrapping - //= type=implication - //# - It MUST use a zeroed out 12 byte IV + //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#data-key-wrapping + //= type=implication + //# - It MUST use a zeroed out 12 byte IV && AESEncryptInput.iv == iv - //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#data-key-wrapping - //= type=implication - // - It MUST use the serialized [encryption context](structures.md#encryption-context-1) as the additional authenticated data (AAD). + //= aws-encryption-sdk-specification/framework/raw-ecdh-keyring.md#data-key-wrapping + //= type=implication + // - It MUST use the serialized [encryption context](structures.md#encryption-context-1) as the additional authenticated data (AAD). && AESEncryptInput.aad == fixedInfo && |res.value.wrappedMaterial| > |AESEncryptOutput.cipherText| + |AESEncryptOutput.authTag| } @@ -490,10 +490,10 @@ module {:options "/functionSyntax:4" } EcdhEdkWrapping { ) ensures res.Success? ==> && Last(crypto.History.KdfCounterMode).output.Success? - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-ecdh-keyring.md#onencrypt - //= type=implication - //# If they Key Derivation step succeeds it MUST produce - //# keying material with a length of 64 bytes. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-ecdh-keyring.md#onencrypt + //= type=implication + //# If they Key Derivation step succeeds it MUST produce + //# keying material with a length of 64 bytes. && |Last(crypto.History.KdfCounterMode).output.value| == KDF_EXPECTED_LEN as int && |res.value| == |Last(crypto.History.KdfCounterMode).output.value| { diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy index 2184b84b31..b7b720612b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/KeyWrapping/EdkWrapping.dfy @@ -73,7 +73,7 @@ module EdkWrapping { method WrapEdkMaterial( nameonly encryptionMaterials: Types.EncryptionMaterials, nameonly wrap: MaterialWrapping.WrapMaterial, - nameonly generateAndWrap: MaterialWrapping.GenerateAndWrapMaterial + nameonly generateAndWrap: MaterialWrapping.GenerateAndWrapMaterial ) returns (ret: Result, Types.Error>) requires wrap.Invariant() requires generateAndWrap.Invariant() @@ -177,7 +177,7 @@ module EdkWrapping { wrapInfo := ret.value.wrapInfo)), []) { - // It would be nice if we could require this. + // It would be nice if we could require this. :- Need(Materials.ValidEncryptionMaterials(encryptionMaterials), Types.AwsCryptographicMaterialProvidersException( message := "Invalid materials for encryption.")); @@ -241,7 +241,7 @@ module EdkWrapping { ); } else if (encryptionMaterials.plaintextDataKey.None? && encryptionMaterials.algorithmSuite.edkWrapping.IntermediateKeyWrapping?) { - // Generate pdk and wrap using Intermediate Key Wrapping + // Generate pdk and wrap using Intermediate Key Wrapping :- Need(encryptionMaterials.algorithmSuite.commitment.HKDF?, Types.AwsCryptographicMaterialProvidersException( message := "Invalid algorithm suite: suites with intermediate key wrapping must use key commitment.")); @@ -313,7 +313,7 @@ module EdkWrapping { Success(unwrapRes), []) { - // TODO require this + // TODO require this :- Need(Materials.ValidDecryptionMaterials(decryptionMaterials), Types.AwsCryptographicMaterialProvidersException( message := "Invalid materials for decryption.")); diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy index c98143c99d..58da4b25c4 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyring.dfy @@ -27,7 +27,7 @@ module {:options "/functionSyntax:4" } Keyring { output.Success? ==> && Materials.EncryptionMaterialsHasPlaintextDataKey(output.value.materials) - // See the details of ValidEncryptionMaterialsTransition for the following + // See the details of ValidEncryptionMaterialsTransition for the following //= aws-encryption-sdk-specification/framework/keyring-interface.md#generate-data-key //= type=implication diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy index b25688d0f0..701ae154ad 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsDiscoveryKeyring.dfy @@ -180,10 +180,10 @@ module AwsKmsDiscoveryKeyring { ==> && var stringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext).Extract(); && 0 < |client.History.Decrypt| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt - //= type=implication - //# - The length of the response’s `Plaintext` MUST equal the [key derivation input length](../algorithm-suites.md#key-derivation-input-length) - //# specified by the [algorithm suite](../algorithm-suites.md) included in the input [decryption materials](../structures.md#decryption-materials). + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt + //= type=implication + //# - The length of the response’s `Plaintext` MUST equal the [key derivation input length](../algorithm-suites.md#key-derivation-input-length) + //# specified by the [algorithm suite](../algorithm-suites.md) included in the input [decryption materials](../structures.md#decryption-materials). && AlgorithmSuites.GetEncryptKeyLength(input.materials.algorithmSuite) as nat == |res.value.materials.plaintextDataKey.value| && var LastDecrypt := Seq.Last(client.History.Decrypt); && LastDecrypt.output.Success? @@ -195,9 +195,9 @@ module AwsKmsDiscoveryKeyring { EdkWrapping.GetProviderWrappedMaterial(edk.ciphertext, res.value.materials.algorithmSuite); && maybeProviderWrappedMaterial.Success? && KMS.IsValid_CiphertextType(maybeProviderWrappedMaterial.value) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt - //= type=implication - //# - Its provider ID MUST exactly match the value “aws-kms”. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt + //= type=implication + //# - Its provider ID MUST exactly match the value “aws-kms”. && edk.keyProviderId == PROVIDER_ID && KMS.IsValid_KeyIdType(awsKmsKey) @@ -218,9 +218,9 @@ module AwsKmsDiscoveryKeyring { //= type=implication //# When calling [AWS KMS Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), the keyring MUST call with a request constructed as follows: == request - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt - //= type=implication - //# If the response does satisfy these requirements then OnDecrypt MUST do the following with the response: + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt + //= type=implication + //# If the response does satisfy these requirements then OnDecrypt MUST do the following with the response: && Seq.Last(client.History.Decrypt).output.value.Plaintext.Some? && ( input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? ==> @@ -349,9 +349,9 @@ module AwsKmsDiscoveryKeyring { returns (output: Result) ensures Ensures(edk, output) { - // The Keyring produces UTF8 providerInfo. - // If an `aws-kms` encrypted data key's providerInfo is not UTF8 - // this is an error, not simply an EDK to filter out. + // The Keyring produces UTF8 providerInfo. + // If an `aws-kms` encrypted data key's providerInfo is not UTF8 + // this is an error, not simply an EDK to filter out. :- Need(UTF8.ValidUTF8Seq(edk.keyProviderInfo), Types.AwsCryptographicMaterialProvidersException( message := "Invalid AWS KMS encoding, provider info is not UTF8.")); @@ -429,10 +429,10 @@ module AwsKmsDiscoveryKeyring { returns (res: Result, Types.Error>) ensures Ensures(edk, res) { - // This transform only works if the given EDK is a valid AWS KMS-generated EDK - // Ideally we would add these as pre-conditions on the method, but we're extending the - // ActionWithResult trait which does not have pre-conditions and we cannot make our - // implementation more restrictive. + // This transform only works if the given EDK is a valid AWS KMS-generated EDK + // Ideally we would add these as pre-conditions on the method, but we're extending the + // ActionWithResult trait which does not have pre-conditions and we cannot make our + // implementation more restrictive. :- Need(edk.keyProviderId == PROVIDER_ID, Types.AwsCryptographicMaterialProvidersException( message := "Encrypted data key was not generated by KMS")); @@ -507,12 +507,12 @@ module AwsKmsDiscoveryKeyring { && KMS.IsValid_KeyIdType(keyArn) && var maybeStringifiedEncCtx := StringifyEncryptionContext(materials.encryptionContext); && maybeStringifiedEncCtx.Success? - // Confirm that the materials we're about to output are a valid transition - // from the input materials + // Confirm that the materials we're about to output are a valid transition + // from the input materials && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) && 0 < |client.History.Decrypt| - // Confirm that we called KMS in the right way and correctly returned the values - // it gave us + // Confirm that we called KMS in the right way and correctly returned the values + // it gave us && KMS.DecryptRequest( KeyId := Some(keyArn), CiphertextBlob := maybeProviderWrappedMaterial.value, @@ -526,9 +526,9 @@ module AwsKmsDiscoveryKeyring { materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? ==> Seq.Last(client.History.Decrypt).output.value.Plaintext == res.value.plaintextDataKey) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt - //= type=implication - //# - The `KeyId` field in the response MUST equal the AWS KMS ARN from the provider info + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt + //= type=implication + //# - The `KeyId` field in the response MUST equal the AWS KMS ARN from the provider info && Seq.Last(client.History.Decrypt).output.value.KeyId == Some(keyArn) } @@ -584,9 +584,9 @@ module AwsKmsDiscoveryKeyring { //= type=implication //# - If a discovery filter is configured, its partition and the provider info partition MUST match. && discoveryFilter.value.partition == arn.partition - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt - //= type=implication - //# - If a discovery filter is configured, its set of accounts MUST contain the provider info account. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-discovery-keyring.md#ondecrypt + //= type=implication + //# - If a discovery filter is configured, its set of accounts MUST contain the provider info account. && discoveryFilter.value.accountIds <= [arn.account] { && match discoveryFilter { diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy index 798b5c927a..b54e13b517 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsEcdhKeyring.dfy @@ -186,8 +186,8 @@ module {:options "/functionSyntax:4" } AwsKmsEcdhKeyring { this.senderKmsKeyId.Some?, E("Keyring MUST be configured with a sender KMS Key ID") ); - // Impossible to hit on encrypt, but dafny has a hard time inferring that if we are not discovery we - // will have senderKmsKeyId. + // Impossible to hit on encrypt, but dafny has a hard time inferring that if we are not discovery we + // will have senderKmsKeyId. :- Need( this.senderPublicKey.Some?, E("Keyring MUST be configured with a senderPublicKey") diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy index 99ba43b24c..e0a4acd881 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsKeyring.dfy @@ -171,10 +171,10 @@ module AwsKmsKeyring { && var maybeStringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext); && maybeStringifiedEncCtx.Success? && 0 < |client.History.GenerateDataKey| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt - //= type=implication - //# If the keyring calls AWS KMS GenerateDataKeys, it MUST use the - //# configured AWS KMS client to make the call. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt + //= type=implication + //# If the keyring calls AWS KMS GenerateDataKeys, it MUST use the + //# configured AWS KMS client to make the call. && Last(client.History.GenerateDataKey).input //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt //= type=implication @@ -228,12 +228,12 @@ module AwsKmsKeyring { && KMS.IsValid_CiphertextType(maybeProviderWrappedMaterial.value) && |client.History.GenerateDataKey| > 0 && Last(client.History.GenerateDataKey).output.Success? - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt - //= type=implication - //# If the Generate Data Key call succeeds, OnEncrypt MUST verify that - //# the response `Plaintext` length matches the specification of the - //# [algorithm suite](../algorithm-suites.md)'s Key Derivation Input - //# Length field. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt + //= type=implication + //# If the Generate Data Key call succeeds, OnEncrypt MUST verify that + //# the response `Plaintext` length matches the specification of the + //# [algorithm suite](../algorithm-suites.md)'s Key Derivation Input + //# Length field. && AlgorithmSuites.GetEncryptKeyLength(algSuite) as int == |res.value.materials.plaintextDataKey.value| && ( exists returnedKeyId, kmsPlaintext @@ -245,8 +245,8 @@ module AwsKmsKeyring { Plaintext := Some(kmsPlaintext)) && (res.value.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? ==> kmsPlaintext == res.value.materials.plaintextDataKey.value) - // If using Intermediate Key wrapping, the plaintext will either be - // the intermediate key, or the input pdk + // If using Intermediate Key wrapping, the plaintext will either be + // the intermediate key, or the input pdk ) ) @@ -265,10 +265,10 @@ module AwsKmsKeyring { && StringifyEncryptionContext(input.materials.encryptionContext).Success? && var stringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext).Extract(); && 0 < |client.History.Encrypt| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt - //= type=implication - //# The keyring MUST call [AWS KMS Encrypt] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) using the configured AWS KMS client. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt + //= type=implication + //# The keyring MUST call [AWS KMS Encrypt] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) using the configured AWS KMS client. && Last(client.History.Encrypt).input //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#onencrypt //= type=implication @@ -447,13 +447,13 @@ module AwsKmsKeyring { && var maybeStringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext); && maybeStringifiedEncCtx.Success? && 0 < |client.History.Decrypt| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - The length of the response’s `Plaintext` MUST equal the - //# [key derivation input length](../algorithm-suites.md#key-derivation-input-length) - //# specified by the [algorithm suite](../algorithm-suites.md) - //# included in the input [decryption materials] - //# (../structures.md#decryption-materials). + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - The length of the response’s `Plaintext` MUST equal the + //# [key derivation input length](../algorithm-suites.md#key-derivation-input-length) + //# specified by the [algorithm suite](../algorithm-suites.md) + //# included in the input [decryption materials] + //# (../structures.md#decryption-materials). && AlgorithmSuites.GetEncryptKeyLength(input.materials.algorithmSuite) as nat == |res.value.materials.plaintextDataKey.value| && var LastDecrypt := Last(client.History.Decrypt); && LastDecrypt.output.Success? @@ -470,12 +470,12 @@ module AwsKmsKeyring { && maybeWrappedMaterial.Success? && edk.keyProviderId == PROVIDER_ID && KMS.IsValid_CiphertextType(maybeWrappedMaterial.value) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# When calling [AWS KMS Decrypt] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), - //# the keyring MUST call with a request constructed - //# as follows: + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# When calling [AWS KMS Decrypt] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), + //# the keyring MUST call with a request constructed + //# as follows: && KMS.DecryptRequest( //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt //= type=implication @@ -506,16 +506,16 @@ module AwsKmsKeyring { //# Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) //# with the configured AWS KMS client. == LastDecrypt.input - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - The `KeyId` field in the response MUST equal the configured AWS - //# KMS key identifier. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - The `KeyId` field in the response MUST equal the configured AWS + //# KMS key identifier. && LastDecrypt.output.value.KeyId == Some(awsKmsKey) ) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt - //= type=implication - //# - MUST immediately return the modified [decryption materials] - //# (../structures.md#decryption-materials). + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-keyring.md#ondecrypt + //= type=implication + //# - MUST immediately return the modified [decryption materials] + //# (../structures.md#decryption-materials). && ( input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? ==> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy index 96a5bd6eed..790077bf7c 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkDiscoveryKeyring.dfy @@ -218,9 +218,9 @@ module AwsKmsMrkDiscoveryKeyring { EdkWrapping.GetProviderWrappedMaterial(edk.ciphertext, output.value.materials.algorithmSuite); && maybeProviderWrappedMaterial.Success? && KMS.IsValid_CiphertextType(maybeProviderWrappedMaterial.value) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt - //= type=implication - //# - Its provider ID MUST exactly match the value “aws-kms”. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt + //= type=implication + //# - Its provider ID MUST exactly match the value “aws-kms”. && edk.keyProviderId == PROVIDER_ID && KMS.IsValid_KeyIdType(awsKmsKey) && var request := KMS.DecryptRequest( @@ -478,8 +478,8 @@ module AwsKmsMrkDiscoveryKeyring { && res.Success? ==> && Invariant() - // Confirm that the materials we're about to output are a valid transition - // from the input materials + // Confirm that the materials we're about to output are a valid transition + // from the input materials && Materials.DecryptionMaterialsTransitionIsValid(materials, res.value) // Confirm that all our input values were valid @@ -493,8 +493,8 @@ module AwsKmsMrkDiscoveryKeyring { && maybeStringifiedEncCtx.Success? && 0 < |client.History.Decrypt| - // Confirm that we called KMS in the right way and correctly returned the values - // it gave us + // Confirm that we called KMS in the right way and correctly returned the values + // it gave us && KMS.DecryptRequest( KeyId := Some(keyArn), CiphertextBlob := maybeProviderWrappedMaterial.value, @@ -593,10 +593,10 @@ module AwsKmsMrkDiscoveryKeyring { //# - If a discovery filter is configured, its partition and the //# provider info partition MUST match. && discoveryFilter.value.partition == arn.partition - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt - //= type=implication - //# - If a discovery filter is configured, its set of accounts MUST - //# contain the provider info account. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt + //= type=implication + //# - If a discovery filter is configured, its set of accounts MUST + //# contain the provider info account. && arn.account in discoveryFilter.value.accountIds //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-discovery-keyring.md#ondecrypt //= type=implication diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy index 6ccb57c327..b70a86372b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/AwsKmsMrkKeyring.dfy @@ -154,10 +154,10 @@ module AwsKmsMrkKeyring { && var maybeStringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext); && maybeStringifiedEncCtx.Success? && 0 < |client.History.GenerateDataKey| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt - //= type=implication - //# If the keyring calls AWS KMS GenerateDataKeys, it MUST use the - //# configured AWS KMS client to make the call. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt + //= type=implication + //# If the keyring calls AWS KMS GenerateDataKeys, it MUST use the + //# configured AWS KMS client to make the call. && Last(client.History.GenerateDataKey).input //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt //= type=implication @@ -203,12 +203,12 @@ module AwsKmsMrkKeyring { && GenerateResponse.CiphertextBlob.Some? && GenerateResponse.KeyId.Some? && UTF8.Encode(GenerateResponse.KeyId.value).Success? - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt - //= type=implication - //# If verified, OnEncrypt MUST do the following with the response - //# from [AWS KMS GenerateDataKey] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/ - //# API_GenerateDataKey.html): + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt + //= type=implication + //# If verified, OnEncrypt MUST do the following with the response + //# from [AWS KMS GenerateDataKey] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/ + //# API_GenerateDataKey.html): && |output.value.materials.encryptedDataKeys| == |input.materials.encryptedDataKeys| + 1 && KMS.IsValid_CiphertextType(Last(output.value.materials.encryptedDataKeys).ciphertext) && Last(output.value.materials.encryptedDataKeys).ciphertext @@ -240,10 +240,10 @@ module AwsKmsMrkKeyring { && var maybeStringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext); && maybeStringifiedEncCtx.Success? && 0 < |client.History.Encrypt| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt - //= type=implication - //# The keyring MUST call [AWS KMS Encrypt] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) using the configured AWS KMS client. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt + //= type=implication + //# The keyring MUST call [AWS KMS Encrypt] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/API_Encrypt.html) using the configured AWS KMS client. && Last(client.History.Encrypt).input //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt //= type=implication @@ -271,12 +271,12 @@ module AwsKmsMrkKeyring { && EncryptResponse.CiphertextBlob.Some? && EncryptResponse.KeyId.Some? && UTF8.Encode(EncryptResponse.KeyId.value).Success? - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt - //= type=implication - //# If verified, OnEncrypt MUST do the following with the - //# response from [AWS KMS Encrypt] - //# (https://docs.aws.amazon.com/kms/latest/APIReference/ - //# API_Encrypt.html): + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#onencrypt + //= type=implication + //# If verified, OnEncrypt MUST do the following with the + //# response from [AWS KMS Encrypt] + //# (https://docs.aws.amazon.com/kms/latest/APIReference/ + //# API_Encrypt.html): && |output.value.materials.encryptedDataKeys| == |input.materials.encryptedDataKeys| + 1 && Last(output.value.materials.encryptedDataKeys).ciphertext == EncryptResponse.CiphertextBlob.value @@ -454,13 +454,13 @@ module AwsKmsMrkKeyring { && var maybeStringifiedEncCtx := StringifyEncryptionContext(input.materials.encryptionContext); && maybeStringifiedEncCtx.Success? && 0 < |client.History.Decrypt| - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt - //= type=implication - //# - The length of the response’s `Plaintext` MUST equal the [key - //# derivation input length](../algorithm-suites.md#key-derivation- - //# input-length) specified by the [algorithm suite](../algorithm- - //# suites.md) included in the input [decryption materials] - //# (../structures.md#decryption-materials). + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt + //= type=implication + //# - The length of the response’s `Plaintext` MUST equal the [key + //# derivation input length](../algorithm-suites.md#key-derivation- + //# input-length) specified by the [algorithm suite](../algorithm- + //# suites.md) included in the input [decryption materials] + //# (../structures.md#decryption-materials). && var suite := input.materials.algorithmSuite; && AlgorithmSuites.GetEncryptKeyLength(suite) as nat == |output.value.materials.plaintextDataKey.value| && var LastDecrypt := Last(client.History.Decrypt); @@ -476,10 +476,10 @@ module AwsKmsMrkKeyring { && maybeWrappedMaterial.Success? && edk.keyProviderId == PROVIDER_ID && KMS.IsValid_CiphertextType(maybeWrappedMaterial.value) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt - //= type=implication - //# When calling [AWS KMS Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), - //# the keyring MUST call with a request constructed as follows: + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt + //= type=implication + //# When calling [AWS KMS Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html), + //# the keyring MUST call with a request constructed as follows: && KMS.DecryptRequest( KeyId := Some(awsKmsKey), CiphertextBlob := maybeWrappedMaterial.value, @@ -494,10 +494,10 @@ module AwsKmsMrkKeyring { //# Decrypt](https://docs.aws.amazon.com/kms/latest/APIReference/API_Decrypt.html) //# with the configured AWS KMS client. == LastDecrypt.input - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt - //= type=implication - //# - The `KeyId` field in the response MUST equal the configured AWS - //# KMS key identifier. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-keyring.md#ondecrypt + //= type=implication + //# - The `KeyId` field in the response MUST equal the configured AWS + //# KMS key identifier. && LastDecrypt.output.value.KeyId == Some(awsKmsKey) && ( input.materials.algorithmSuite.edkWrapping.DIRECT_KEY_WRAPPING? diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/DiscoveryMultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/DiscoveryMultiKeyring.dfy index 4449630c47..e5e9d3c705 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/DiscoveryMultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/DiscoveryMultiKeyring.dfy @@ -54,11 +54,11 @@ module DiscoveryMultiKeyring { //= type=implication //# If an empty set of Region is provided this function MUST fail. || |regions| == 0 - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-multi-keyrings.md#aws-kms-discovery-multi-keyring - //= type=implication - //# If - //# any element of the set of regions is null or an empty string this - //# function MUST fail. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-multi-keyrings.md#aws-kms-discovery-multi-keyring + //= type=implication + //# If + //# any element of the set of regions is null or an empty string this + //# function MUST fail. || (exists r | r in regions :: r == "") ==> output.Failure? diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareDiscoveryMultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareDiscoveryMultiKeyring.dfy index 93e5583104..3493440bdc 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareDiscoveryMultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareDiscoveryMultiKeyring.dfy @@ -53,11 +53,11 @@ module MrkAwareDiscoveryMultiKeyring { //= type=implication //# If an empty set of Region is provided this function MUST fail. || |regions| == 0 - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-multi-keyrings.md#aws-kms-mrk-discovery-multi-keyring - //= type=implication - //# If - //# any element of the set of regions is null or an empty string this - //# function MUST fail. + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-multi-keyrings.md#aws-kms-mrk-discovery-multi-keyring + //= type=implication + //# If + //# any element of the set of regions is null or an empty string this + //# function MUST fail. || (exists r | r in regions :: r == "") ==> output.Failure? diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareStrictMultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareStrictMultiKeyring.dfy index b49713c182..f6956a9563 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareStrictMultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/MrkAwareStrictMultiKeyring.dfy @@ -92,11 +92,11 @@ module MrkAwareStrictMultiKeyring { && (generator.None? ==> && output.value.generatorKeyring.None?) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-multi-keyrings.md#aws-kms-mrk-multi-keyring - //= type=implication - //# If there is a set of child identifiers then a set of [AWS KMS MRK - //# Keyring](aws-kms-mrk-keyring.md) MUST be created for each AWS KMS key - //# identifier by initialized each keyring with + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-mrk-multi-keyrings.md#aws-kms-mrk-multi-keyring + //= type=implication + //# If there is a set of child identifiers then a set of [AWS KMS MRK + //# Keyring](aws-kms-mrk-keyring.md) MUST be created for each AWS KMS key + //# identifier by initialized each keyring with && (awsKmsKeys.Some? ==> && |awsKmsKeys.value| == |output.value.childKeyrings| @@ -107,7 +107,7 @@ module MrkAwareStrictMultiKeyring { && var awsKmsChild := childKeyring as AwsKmsMrkKeyring.AwsKmsMrkKeyring; // AWS KMS key identifier && awsKmsChild.awsKmsKey == awsKmsKeys.value[index] - // The input list of AWS KMS grant tokens + // The input list of AWS KMS grant tokens && (grantTokens.Some? ==> awsKmsChild.grantTokens == grantTokens.value)) && (awsKmsKeys.None? ==> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/StrictMultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/StrictMultiKeyring.dfy index 83ce36389d..06065f7dc0 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/StrictMultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/AwsKms/StrictMultiKeyring.dfy @@ -85,11 +85,11 @@ module StrictMultiKeyring { && (generator.None? ==> && output.value.generatorKeyring.None?) - //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-multi-keyrings.md#aws-kms-multi-keyring - //= type=implication - //# If there is a set of child identifiers then a set of [AWS KMS Keyring] - //# (aws-kms-keyring.md) MUST be created for each AWS KMS key identifier - //# by initializing each keyring with + //= aws-encryption-sdk-specification/framework/aws-kms/aws-kms-multi-keyrings.md#aws-kms-multi-keyring + //= type=implication + //# If there is a set of child identifiers then a set of [AWS KMS Keyring] + //# (aws-kms-keyring.md) MUST be created for each AWS KMS key identifier + //# by initializing each keyring with && (awsKmsKeys.Some? ==> && |awsKmsKeys.value| == |output.value.childKeyrings| @@ -100,7 +100,7 @@ module StrictMultiKeyring { && var awsKmsChild := childKeyring as AwsKmsKeyring.AwsKmsKeyring; // AWS KMS key identifier && awsKmsChild.awsKmsKey == awsKmsKeys.value[index] - // The input list of AWS KMS grant tokens + // The input list of AWS KMS grant tokens && (grantTokens.Some? ==> awsKmsChild.grantTokens == grantTokens.value)) && (awsKmsKeys.None? ==> diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy index 8cac0c59f9..cd4cf4aaa2 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/MultiKeyring.dfy @@ -255,9 +255,9 @@ module {:options "-functionSyntax:4"} MultiKeyring { || Verified?(generatorKeyring.value) || generatorKeyring.value is MultiKeyring ) { - //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt - //# - If the generator keyring returns encryption materials missing a - //# plaintext data key, OnEncrypt MUST fail. + //= aws-encryption-sdk-specification/framework/multi-keyring.md#onencrypt + //# - If the generator keyring returns encryption materials missing a + //# plaintext data key, OnEncrypt MUST fail. :- Need( Materials.EncryptionMaterialsHasPlaintextDataKey(onEncryptOutput.value.materials), Types.AwsCryptographicMaterialProvidersException( @@ -303,11 +303,11 @@ module {:options "-functionSyntax:4"} MultiKeyring { || Verified?(child) || child is MultiKeyring ) { - // We have to explicitly check for this because our child and generator keyrings are of type - // IKeyring, rather than VerifiableKeyring. - // If we knew we would always have VerifiableKeyrings, we would get this for free. - // However, we want to support customer implementations of keyrings which may or may - // not perform valid transitions. + // We have to explicitly check for this because our child and generator keyrings are of type + // IKeyring, rather than VerifiableKeyring. + // If we knew we would always have VerifiableKeyrings, we would get this for free. + // However, we want to support customer implementations of keyrings which may or may + // not perform valid transitions. :- Need( Materials.EncryptionMaterialsHasPlaintextDataKey(onEncryptOutput.value.materials), diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy index 624741c0f8..3d65cd2512 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Keyrings/RawAESKeyring.dfy @@ -414,20 +414,20 @@ module RawAESKeyring { SequenceIsSafeBecauseItIsInMemory(keyName); var keyname_size := |keyName| as uint64; && |info| as uint64 == Add4(keyname_size, AUTH_TAG_LEN_LEN as uint64, IV_LEN_LEN as uint64, wrappingAlgorithm.ivLength as uint64) - // The key name obtained from the encrypted data key's key provider information has a value equal to this keyring's key name. + // The key name obtained from the encrypted data key's key provider information has a value equal to this keyring's key name. && info[..keyname_size] == keyName - //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#authentication-tag-length - //= type=implication - //# This value MUST match the authentication tag length of the keyring's - //# configured wrapping algorithm + //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#authentication-tag-length + //= type=implication + //# This value MUST match the authentication tag length of the keyring's + //# configured wrapping algorithm && SeqToUInt32(info[keyname_size..keyname_size + AUTH_TAG_LEN_LEN as uint64]) == 128 && 128 == wrappingAlgorithm.tagLength as uint32 * 8 && SeqToUInt32(info[keyname_size + AUTH_TAG_LEN_LEN as uint64 .. keyname_size + AUTH_TAG_LEN_LEN as uint64 + IV_LEN_LEN as uint64]) == wrappingAlgorithm.ivLength as uint32 - //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#iv-length - //= type=implication - //# This value MUST match the IV length of the keyring's - //# configured wrapping algorithm + //= aws-encryption-sdk-specification/framework/raw-aes-keyring.md#iv-length + //= type=implication + //# This value MUST match the IV length of the keyring's + //# configured wrapping algorithm && SeqToUInt32(info[keyname_size + AUTH_TAG_LEN_LEN as uint64 .. keyname_size + AUTH_TAG_LEN_LEN as uint64 + IV_LEN_LEN as uint64]) == 12 } diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Materials.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Materials.dfy index b221e1b4f2..bc3079fa35 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Materials.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographicMaterialProviders/src/Materials.dfy @@ -38,11 +38,11 @@ module Materials { && var suite := AS.GetSuite(input.algorithmSuiteId); && res.value.algorithmSuite == suite && (!suite.signature.None? <==> EC_PUBLIC_KEY_FIELD in res.value.encryptionContext) - //= aws-encryption-sdk-specification/framework/structures.md#signing-key - //= type=implication - //# If the - //# algorithm suite does not contain an asymmetric signing algorithm, the signing key - //# MUST NOT be present. + //= aws-encryption-sdk-specification/framework/structures.md#signing-key + //= type=implication + //# If the + //# algorithm suite does not contain an asymmetric signing algorithm, the signing key + //# MUST NOT be present. && (suite.signature.None? <==> res.value.signingKey.None?) //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-1 //= type=implication @@ -101,11 +101,11 @@ module Materials { && var suite := AS.GetSuite(input.algorithmSuiteId); && res.value.algorithmSuite == suite && (suite.signature.None? <==> EC_PUBLIC_KEY_FIELD !in input.encryptionContext) - //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-2 - //= type=implication - //# The mapped value - //# from the reserved key `aws-crypto-public-key` SHOULD be the signature - //# verification key stored on the [decryption materials](#decryption-materials). + //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-2 + //= type=implication + //# The mapped value + //# from the reserved key `aws-crypto-public-key` SHOULD be the signature + //# verification key stored on the [decryption materials](#decryption-materials). && var verificationKey := DecodeVerificationKey(input.encryptionContext); && ( verificationKey.Success? && verificationKey.value.Some? @@ -221,30 +221,30 @@ module Materials { && AS.AlgorithmSuite?(encryptionMaterials.algorithmSuite) && var suite := encryptionMaterials.algorithmSuite; && (suite.signature.None? <==> encryptionMaterials.signingKey.None?) - //= aws-encryption-sdk-specification/framework/structures.md#plaintext-data-key - //= type=implication - //# The plaintext data key MUST: - //# - Fit the specification for the [key derivation algorithm](algorithm- - //# suites.md#key-derivation-algorithm) included in this decryption - //# material's [algorithm suite](#algorithm-suite). + //= aws-encryption-sdk-specification/framework/structures.md#plaintext-data-key + //= type=implication + //# The plaintext data key MUST: + //# - Fit the specification for the [key derivation algorithm](algorithm- + //# suites.md#key-derivation-algorithm) included in this decryption + //# material's [algorithm suite](#algorithm-suite). && (encryptionMaterials.plaintextDataKey.Some? ==> AS.GetEncryptKeyLength(suite) as uint64 == |encryptionMaterials.plaintextDataKey.value| as uint64) - //= aws-encryption-sdk-specification/framework/structures.md#encrypted-data-keys - //= type=implication - //# If the plaintext data key is not included in this set of encryption - //# materials, this list MUST be empty. + //= aws-encryption-sdk-specification/framework/structures.md#encrypted-data-keys + //= type=implication + //# If the plaintext data key is not included in this set of encryption + //# materials, this list MUST be empty. && (encryptionMaterials.plaintextDataKey.None? ==> |encryptionMaterials.encryptedDataKeys| as uint64 == 0) - //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-1 - //= type=implication - //# If an [encryption material](#encryption-materials) contains a [signing key] - //# (#signing-key), the [encryption context](#encryption-context) SHOULD - //# include the reserved key `aws-crypto-public-key`. - // - //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-1 - //= type=implication - //# If an [encryption - //# material](#encryption-materials) does not contains a [signing key] - //# (#signing-key), the [encryption context](#encryption-context) SHOULD - //# NOT include the reserved key `aws-crypto-public-key`. + //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-1 + //= type=implication + //# If an [encryption material](#encryption-materials) contains a [signing key] + //# (#signing-key), the [encryption context](#encryption-context) SHOULD + //# include the reserved key `aws-crypto-public-key`. + // + //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-1 + //= type=implication + //# If an [encryption + //# material](#encryption-materials) does not contains a [signing key] + //# (#signing-key), the [encryption context](#encryption-context) SHOULD + //# NOT include the reserved key `aws-crypto-public-key`. && (!suite.signature.None? <==> EC_PUBLIC_KEY_FIELD in encryptionMaterials.encryptionContext) //= aws-encryption-sdk-specification/framework/structures.md#signing-key @@ -256,17 +256,17 @@ module Materials { // But at this time existence is deemed acceptable. && (suite.signature.ECDSA? <==> encryptionMaterials.signingKey.Some?) && (!suite.signature.None? <==> EC_PUBLIC_KEY_FIELD in encryptionMaterials.encryptionContext) - //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-keys - //= type=implication - //# If the algorithm suite does contain a symmetric signing algorithm, this list MUST have length equal to the [encrypted data key list](#encrypted-data-keys). + //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-keys + //= type=implication + //# If the algorithm suite does contain a symmetric signing algorithm, this list MUST have length equal to the [encrypted data key list](#encrypted-data-keys). && (suite.symmetricSignature.HMAC? && encryptionMaterials.symmetricSigningKeys.Some? ==> |encryptionMaterials.symmetricSigningKeys.value| as uint64 == |encryptionMaterials.encryptedDataKeys| as uint64) && (suite.symmetricSignature.HMAC? ==> || encryptionMaterials.symmetricSigningKeys.Some? || (|encryptionMaterials.encryptedDataKeys| as uint64 == 0 && encryptionMaterials.symmetricSigningKeys.None?)) - //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-keys - //= type=implication - //# If the algorithm suite does not contain a symmetric signing algorithm, this list MUST NOT be included in the materials. + //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-keys + //= type=implication + //# If the algorithm suite does not contain a symmetric signing algorithm, this list MUST NOT be included in the materials. && (suite.symmetricSignature.None? ==> encryptionMaterials.symmetricSigningKeys.None?) //= aws-encryption-sdk-specification/framework/structures.md#required-encryption-context-keys @@ -436,18 +436,18 @@ module Materials { //# suites.md#encryption-algorithm) included in this decryption //# material's [algorithm suite](#algorithm-suite-1). && (decryptionMaterials.plaintextDataKey.Some? ==> AS.GetEncryptKeyLength(suite) as uint64 == |decryptionMaterials.plaintextDataKey.value| as uint64) - //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-2 - //= type=implication - //# If a [decryption materials](#decryption-materials) contains a [verification key] - //# (#verification-key), the [encryption context](#encryption-context) SHOULD - //# include the reserved key `aws-crypto-public-key`. - // - //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-2 - //= type=implication - //# If a [decryption materials](#decryption-materials) does not contain a - //# [verification key](#verification-key), the [encryption context] - //# (#encryption-context) SHOULD NOT include the reserved key `aws-crypto- - //# public-key`. + //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-2 + //= type=implication + //# If a [decryption materials](#decryption-materials) contains a [verification key] + //# (#verification-key), the [encryption context](#encryption-context) SHOULD + //# include the reserved key `aws-crypto-public-key`. + // + //= aws-encryption-sdk-specification/framework/structures.md#encryption-context-2 + //= type=implication + //# If a [decryption materials](#decryption-materials) does not contain a + //# [verification key](#verification-key), the [encryption context] + //# (#encryption-context) SHOULD NOT include the reserved key `aws-crypto- + //# public-key`. && (!suite.signature.None? <==> EC_PUBLIC_KEY_FIELD in decryptionMaterials.encryptionContext) //= aws-encryption-sdk-specification/framework/structures.md#verification-key @@ -459,16 +459,16 @@ module Materials { // But at this time existence is deemed acceptable. && (suite.signature.ECDSA? <==> decryptionMaterials.verificationKey.Some?) && (!suite.signature.None? <==> EC_PUBLIC_KEY_FIELD in decryptionMaterials.encryptionContext) - //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-key - //= type=implication - //# If the algorithm suite does contain a symmetric signing algorithm, - //# the symmetric signing key MUST also be included in the materials - //# if and only if the materials also include a [plaintext data key](#plaintext-data-key-1). + //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-key + //= type=implication + //# If the algorithm suite does contain a symmetric signing algorithm, + //# the symmetric signing key MUST also be included in the materials + //# if and only if the materials also include a [plaintext data key](#plaintext-data-key-1). && (!suite.symmetricSignature.None? ==> (decryptionMaterials.plaintextDataKey.Some? <==> decryptionMaterials.symmetricSigningKey.Some?)) - //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-key - //= type=implication - //# If the algorithm suite does not contain a symmetric signing algorithm, - //# the symmetric signing key MUST NOT be included in the materials. + //= aws-encryption-sdk-specification/framework/structures.md#symmetric-signing-key + //= type=implication + //# If the algorithm suite does not contain a symmetric signing algorithm, + //# the symmetric signing key MUST NOT be included in the materials. && (suite.symmetricSignature.None? ==> decryptionMaterials.symmetricSigningKey.None?) //= aws-encryption-sdk-specification/framework/structures.md#required-encryption-context-keys-1 diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/AwsCryptographyKeyStoreOperations.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/AwsCryptographyKeyStoreOperations.dfy index 5b6494a233..32a1c6bb29 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/AwsCryptographyKeyStoreOperations.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/AwsCryptographyKeyStoreOperations.dfy @@ -180,11 +180,11 @@ module AwsCryptographyKeyStoreOperations refines AbstractAwsCryptographyKeyStore && i.0.Success? && i.1.Success? && DDB.IsValid_AttributeName(Structure.ENCRYPTION_CONTEXT_PREFIX + i.0.value) - // Dafny requires that I *prove* that k == Encode(Decode(k)) - // Since UTF8 can be lossy in some implementations - // this is the simplest... - // A prove that ValidUTF8Seq(i) ==> Decode(i).Success? - // would improve the situation + // Dafny requires that I *prove* that k == Encode(Decode(k)) + // Since UTF8 can be lossy in some implementations + // this is the simplest... + // A prove that ValidUTF8Seq(i) ==> Decode(i).Success? + // would improve the situation && var encoded := UTF8.Encode(i.0.value); && encoded.Success? && i.2 == encoded.value diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeyStoreTable.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeyStoreTable.dfy index d0b8626b05..4f3bd77090 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeyStoreTable.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeyStoreTable.dfy @@ -33,9 +33,9 @@ module CreateKeyStoreTable { type keyStoreDescription = t: DDB.TableDescription | keyStoreHasExpectedConstruction?(t) witness * predicate method keyStoreHasExpectedConstruction?(t: DDB.TableDescription) { && t.AttributeDefinitions.Some? && t.KeySchema.Some? && t.TableName.Some? && t.TableArn.Some? - //= aws-encryption-sdk-specification/framework/branch-key-store.md#keyschema - //= type=implication - //# The following KeySchema MUST be configured on the table: + //= aws-encryption-sdk-specification/framework/branch-key-store.md#keyschema + //= type=implication + //# The following KeySchema MUST be configured on the table: && ToSet(t.AttributeDefinitions.value) >= ToSet(ATTRIBUTE_DEFINITIONS) && ToSet(t.KeySchema.value) >= ToSet(KEY_SCHEMA) } @@ -75,14 +75,14 @@ module CreateKeyStoreTable { //# - [KeySchema](#keyschema) as defined below. && CreateTableInput.TableName == tableName && CreateTableInput.KeySchema == KEY_SCHEMA - //= aws-encryption-sdk-specification/framework/branch-key-store.md#createkeystore - //= type=implication - //# If the operation fails to create table, the operation MUST fail. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#createkeystore + //= type=implication + //# If the operation fails to create table, the operation MUST fail. && (Seq.Last(ddbClient.History.CreateTable).output.Failure? ==> res.Failure?) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#createkeystore - //= type=implication - //# If the operation successfully creates a table, the operation MUST return the AWS DDB Table Arn - //# back to the caller. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#createkeystore + //= type=implication + //# If the operation successfully creates a table, the operation MUST return the AWS DDB Table Arn + //# back to the caller. && ( && Seq.Last(ddbClient.History.CreateTable).output.Success? && Seq.Last(ddbClient.History.CreateTable).output.value.TableDescription.Some? @@ -169,11 +169,11 @@ module CreateKeyStoreTable { res := Failure(Types.ComAmazonawsDynamodb(error)); } } else { - //= aws-encryption-sdk-specification/framework/branch-key-store.md#createkeystore - //# If the response is successful, this operation validates that the table has the expected - //# [KeySchema](#keyschema) as defined below. - //# If the [KeySchema](#keyschema) does not match - //# this operation MUST yield an error. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#createkeystore + //# If the response is successful, this operation validates that the table has the expected + //# [KeySchema](#keyschema) as defined below. + //# If the [KeySchema](#keyschema) does not match + //# this operation MUST yield an error. :- Need( && maybeDescribeTableResponse.value.Table.Some? && keyStoreHasExpectedConstruction?(maybeDescribeTableResponse.value.Table.value) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeys.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeys.dfy index 5b6a7199d3..992e1548bd 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeys.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/CreateKeys.dfy @@ -554,11 +554,11 @@ module {:options "/functionSyntax:4" } CreateKeys { //= type=implication //# The operation MUST call [AWS KMS API GenerateDataKeyWithoutPlaintext](https://docs.aws.amazon.com/kms/latest/APIReference/API_GenerateDataKeyWithoutPlaintext.html). generateHistory: KMS.DafnyCallEvent>, - reEncryptHistory: KMS.DafnyCallEvent>, - kmsClient: KMS.IKMSClient, - kmsConfiguration: Types.KMSConfiguration, - grantTokens: KMS.GrantTokenList, - decryptOnlyEncryptionContext: map + reEncryptHistory: KMS.DafnyCallEvent>, + kmsClient: KMS.IKMSClient, + kmsConfiguration: Types.KMSConfiguration, + grantTokens: KMS.GrantTokenList, + decryptOnlyEncryptionContext: map ) reads kmsClient.History requires KMSKeystoreOperations.HasKeyId(kmsConfiguration) && KmsArn.ValidKmsArn?(KMSKeystoreOperations.GetKeyId(kmsConfiguration)) diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/GetKeys.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/GetKeys.dfy index 8605e8efd8..3efbb8ff4b 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/GetKeys.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/GetKeys.dfy @@ -429,12 +429,12 @@ module GetKeys { predicate AwsKmsBranchKeyDecryption?( getItemHistory: DDB.DafnyCallEvent>, - decryptHistory: KMS.DafnyCallEvent>, - kmsClient: KMS.IKMSClient, - ddbClient: DDB.IDynamoDBClient, - kmsConfiguration: Types.KMSConfiguration, - grantTokens: KMS.GrantTokenList, - logicalKeyStoreName: string + decryptHistory: KMS.DafnyCallEvent>, + kmsClient: KMS.IKMSClient, + ddbClient: DDB.IDynamoDBClient, + kmsConfiguration: Types.KMSConfiguration, + grantTokens: KMS.GrantTokenList, + logicalKeyStoreName: string ) reads kmsClient.History reads ddbClient.History @@ -468,11 +468,11 @@ module GetKeys { //# except the logical table name //# MUST equal the value with the same key in the AWS DDB response item. && (forall k <- versionEncryptionContext.Keys - {Structure.TABLE_FIELD} - // Working around https://github.com/dafny-lang/dafny/issues/4214 - // that will make the following fail to compile - // :: match k - // case HIERARCHY_VERSION => versionEncryptionContext[Structure.HIERARCHY_VERSION] == versionItem[Structure.HIERARCHY_VERSION].N - // case _ => versionEncryptionContext[k] == versionItem[k].S) + // Working around https://github.com/dafny-lang/dafny/issues/4214 + // that will make the following fail to compile + // :: match k + // case HIERARCHY_VERSION => versionEncryptionContext[Structure.HIERARCHY_VERSION] == versionItem[Structure.HIERARCHY_VERSION].N + // case _ => versionEncryptionContext[k] == versionItem[k].S) :: if k == Structure.HIERARCHY_VERSION then versionEncryptionContext[Structure.HIERARCHY_VERSION] == versionItem[Structure.HIERARCHY_VERSION].N else @@ -507,9 +507,9 @@ module GetKeys { && var decryptRequest := decryptHistory.input; && decryptRequest.KeyId.Some? - //= aws-encryption-sdk-specification/framework/branch-key-store.md#aws-kms-branch-key-decryption - //= type=implication - //# - `KeyId`, if the KMS Configuration is Discovery, MUST be the `kms-arn` attribute value of the AWS DDB response item. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#aws-kms-branch-key-decryption + //= type=implication + //# - `KeyId`, if the KMS Configuration is Discovery, MUST be the `kms-arn` attribute value of the AWS DDB response item. && (kmsConfiguration.discovery? ==> decryptRequest.KeyId == Some(versionItem[Structure.KMS_FIELD].S)) //= aws-encryption-sdk-specification/framework/branch-key-store.md#aws-kms-branch-key-decryption diff --git a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Structure.dfy b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Structure.dfy index 39a82ed937..13c47d13a8 100644 --- a/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Structure.dfy +++ b/AwsCryptographicMaterialProviders/dafny/AwsCryptographyKeyStore/src/Structure.dfy @@ -41,25 +41,25 @@ module {:options "/functionSyntax:4" } Structure { //= type=implication //# - MUST have a `branch-key-id` attribute && (BRANCH_KEY_IDENTIFIER_FIELD in m) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context - //= type=implication - //# - MUST have a `type` attribute + //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context + //= type=implication + //# - MUST have a `type` attribute && (TYPE_FIELD in m) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context - //= type=implication - //# - MUST have a `create-time` attribute + //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context + //= type=implication + //# - MUST have a `create-time` attribute && (KEY_CREATE_TIME in m) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context - //= type=implication - //# - MUST have a `hierarchy-version` + //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context + //= type=implication + //# - MUST have a `hierarchy-version` && (HIERARCHY_VERSION in m) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context - //= type=implication - //# - MUST have a `tablename` attribute to store the logicalKeyStoreName + //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context + //= type=implication + //# - MUST have a `tablename` attribute to store the logicalKeyStoreName && (TABLE_FIELD in m) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context - //= type=implication - //# - MUST have a `kms-arn` attribute + //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context + //= type=implication + //# - MUST have a `kms-arn` attribute && (KMS_FIELD in m) && KMS.IsValid_KeyIdType(m[KMS_FIELD]) //= aws-encryption-sdk-specification/framework/branch-key-store.md#authenticating-a-keystore-item @@ -74,9 +74,9 @@ module {:options "/functionSyntax:4" } Structure { //= type=implication //# - The `branch-key-id` field MUST not be an empty string && (SequenceIsSafeBecauseItIsInMemory(m[BRANCH_KEY_IDENTIFIER_FIELD]); 0 < |m[BRANCH_KEY_IDENTIFIER_FIELD]| as uint64) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context - //= type=implication - //# - The `type` field MUST not be an empty string + //= aws-encryption-sdk-specification/framework/branch-key-store.md#encryption-context + //= type=implication + //# - The `type` field MUST not be an empty string && (SequenceIsSafeBecauseItIsInMemory(m[TYPE_FIELD]); 0 < |m[TYPE_FIELD]| as uint64) && (forall k <- m.Keys :: DDB.IsValid_AttributeName(k)) @@ -86,9 +86,9 @@ module {:options "/functionSyntax:4" } Structure { //# The ACTIVE encryption context MUST have a `version` attribute. && (BRANCH_KEY_ACTIVE_VERSION_FIELD in m <==> && m[TYPE_FIELD] == BRANCH_KEY_ACTIVE_TYPE) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#active-encryption-context - //= type=implication - //# The ACTIVE encryption context value of the `type` attribute MUST equal to `"branch:ACTIVE"`. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#active-encryption-context + //= type=implication + //# The ACTIVE encryption context value of the `type` attribute MUST equal to `"branch:ACTIVE"`. && (BRANCH_KEY_ACTIVE_VERSION_FIELD in m ==> //= aws-encryption-sdk-specification/framework/branch-key-store.md#active-encryption-context //= type=implication @@ -107,9 +107,9 @@ module {:options "/functionSyntax:4" } Structure { //= type=implication //# The Beacon key encryption context value of the `type` attribute MUST equal to `"beacon:ACTIVE"`. || m[TYPE_FIELD] == BEACON_KEY_TYPE_VALUE - //= aws-encryption-sdk-specification/framework/branch-key-store.md#decrypt-only-encryption-context - //= type=implication - //# The `type` attribute MUST stores the branch key version formatted like `"branch:version:"` + `version`. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#decrypt-only-encryption-context + //= type=implication + //# The `type` attribute MUST stores the branch key version formatted like `"branch:version:"` + `version`. || BRANCH_KEY_TYPE_PREFIX < m[TYPE_FIELD]) } @@ -124,12 +124,12 @@ module {:options "/functionSyntax:4" } Structure { ensures ToBranchKeyContext(output, encryptionContext[TABLE_FIELD]) == encryptionContext { map k <- encryptionContext.Keys + {BRANCH_KEY_FIELD} - {TABLE_FIELD} - // Working around https://github.com/dafny-lang/dafny/issues/4214 - // that will make the following fail to compile - // :: match k - // case HIERARCHY_VERSION => DDB.AttributeValue.N(encryptionContext[HIERARCHY_VERSION]) - // case BRANCH_KEY_FIELD => DDB.AttributeValue.B(encryptedKey) - // case _ => DDB.AttributeValue.S(encryptionContext[k]) + // Working around https://github.com/dafny-lang/dafny/issues/4214 + // that will make the following fail to compile + // :: match k + // case HIERARCHY_VERSION => DDB.AttributeValue.N(encryptionContext[HIERARCHY_VERSION]) + // case BRANCH_KEY_FIELD => DDB.AttributeValue.B(encryptedKey) + // case _ => DDB.AttributeValue.S(encryptionContext[k]) :: k := if k == HIERARCHY_VERSION then DDB.AttributeValue.N(encryptionContext[HIERARCHY_VERSION]) else if k == BRANCH_KEY_FIELD then @@ -145,12 +145,12 @@ module {:options "/functionSyntax:4" } Structure { requires BranchKeyItem?(item) { map k <- item.Keys - {BRANCH_KEY_FIELD} + {TABLE_FIELD} - // Working around https://github.com/dafny-lang/dafny/issues/4214 - // that will make the following fail to compile - // match k - // case HIERARCHY_VERSION => item[k].N - // case TABLE_FIELD => logicalKeyStoreName - // case _ => item[k].S + // Working around https://github.com/dafny-lang/dafny/issues/4214 + // that will make the following fail to compile + // match k + // case HIERARCHY_VERSION => item[k].N + // case TABLE_FIELD => logicalKeyStoreName + // case _ => item[k].S :: k := if k == HIERARCHY_VERSION then item[k].N else if k == TABLE_FIELD then @@ -177,9 +177,9 @@ module {:options "/functionSyntax:4" } Structure { //= type=implication //# - [Branch Key](./structures.md#branch-key) MUST be the [decrypted branch key material](#aws-kms-branch-key-decryption) && output.value.branchKey == plaintextKey - //= aws-encryption-sdk-specification/framework/branch-key-store.md#branch-key-materials-from-authenticated-encryption-context - //= type=implication - //# - [Branch Key Id](./structures.md#branch-key-id) MUST be the `branch-key-id` + //= aws-encryption-sdk-specification/framework/branch-key-store.md#branch-key-materials-from-authenticated-encryption-context + //= type=implication + //# - [Branch Key Id](./structures.md#branch-key-id) MUST be the `branch-key-id` && output.value.branchKeyIdentifier == encryptionContext[BRANCH_KEY_IDENTIFIER_FIELD] && var versionInformation @@ -201,9 +201,9 @@ module {:options "/functionSyntax:4" } Structure { //# The version string MUST start with `branch:version:`. && BRANCH_KEY_TYPE_PREFIX < versionInformation && UTF8.Encode(versionInformation[|BRANCH_KEY_TYPE_PREFIX|..]).Success? - //= aws-encryption-sdk-specification/framework/branch-key-store.md#branch-key-materials-from-authenticated-encryption-context - //= type=implication - //# The remaining string encoded as UTF8 bytes MUST be the Branch Key version. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#branch-key-materials-from-authenticated-encryption-context + //= type=implication + //# The remaining string encoded as UTF8 bytes MUST be the Branch Key version. && output.value.branchKeyVersion == UTF8.Encode(versionInformation[|BRANCH_KEY_TYPE_PREFIX|..]).value //= aws-encryption-sdk-specification/framework/branch-key-store.md#branch-key-materials-from-authenticated-encryption-context @@ -266,17 +266,17 @@ module {:options "/functionSyntax:4" } Structure { :: && UTF8.Decode(k).Success? && UTF8.Decode(output.value[k]).Success? - //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context-from-authenticated-encryption-context - //= type=implication - //# For every key in the [encryption context](./structures.md#encryption-context-3) - //# the string `aws-crypto-ec:` + the UTF8 decode of this key - //# MUST exist as a key in the authenticated encryption context. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context-from-authenticated-encryption-context + //= type=implication + //# For every key in the [encryption context](./structures.md#encryption-context-3) + //# the string `aws-crypto-ec:` + the UTF8 decode of this key + //# MUST exist as a key in the authenticated encryption context. && (ENCRYPTION_CONTEXT_PREFIX + UTF8.Decode(k).value in encryptionContext) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context-from-authenticated-encryption-context - //= type=implication - //# Also, the value in the [encryption context](./structures.md#encryption-context-3) for this key - //# MUST equal the value in the authenticated encryption context - //# for the constructed key. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context-from-authenticated-encryption-context + //= type=implication + //# Also, the value in the [encryption context](./structures.md#encryption-context-3) for this key + //# MUST equal the value in the authenticated encryption context + //# for the constructed key. && encryptionContext[ENCRYPTION_CONTEXT_PREFIX + UTF8.Decode(k).value] == UTF8.Decode(output.value[k]).value { // Get all keys that start with the prefix OR are the prefix @@ -549,10 +549,10 @@ module {:options "/functionSyntax:4" } Structure { && decryptOnly[k] == active[k] == beacon[k] ) && active[BRANCH_KEY_ACTIVE_VERSION_FIELD] == decryptOnly[TYPE_FIELD] - //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context - //= type=implication - //# If custom [encryption context](./structures.md#encryption-context-3) - //# is associated with the branch key these values MUST be added to the AWS KMS encryption context. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context + //= type=implication + //# If custom [encryption context](./structures.md#encryption-context-3) + //# is associated with the branch key these values MUST be added to the AWS KMS encryption context. && (forall k <- encryptionContext :: //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context //= type=implication @@ -561,9 +561,9 @@ module {:options "/functionSyntax:4" } Structure { && (ENCRYPTION_CONTEXT_PREFIX + k in decryptOnly) && (ENCRYPTION_CONTEXT_PREFIX + k in active) && (ENCRYPTION_CONTEXT_PREFIX + k in beacon) - //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context - //= type=implication - //# Across all versions of a Branch Key, the custom encryption context MUST be equal. + //= aws-encryption-sdk-specification/framework/branch-key-store.md#custom-encryption-context + //= type=implication + //# Across all versions of a Branch Key, the custom encryption context MUST be equal. && encryptionContext[k] == decryptOnly[ENCRYPTION_CONTEXT_PREFIX + k] == active[ENCRYPTION_CONTEXT_PREFIX + k]